Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 09-27-2016, 09:03 AM
tcsh tcsh is offline
Member
 
Join Date: Sep 2016
Posts: 37
Lightbulb Hello - some tips on my first Delphi software

Hey everyone,


Here's to me hoping I can find someone here willing to give me a few answers and point me in the right direction. Don't get me wrong, I'm not here asking for code or someone else to do it, I'm just fairly new to Delphi and I'm under a time constraint to get this software done faster since I'm having a lot of new orders daily. And no, I don't want to buy any of the available task management software out there since they don't meet my needs and are not fully customizable, I'd much rather try and do it myself. Just some quick tutorial links or the names of the components in Delphi that I need for the things I mentioned below and I can take it from there, much appreciated! Willing to learn!

I'm using RAD Studio 10 Seattle.

So I own a small business that's rapidly growing in orders and I'm in need of a Task Management system to handle all the orders. Consequently I've been trying to learn Delphi for a few months now and have managed to get familiar with the IDE and several entry things but I'm starting to hit the hard stuff, at least in my view, and I'm in need of some pointers to set on the right path.

What am I trying to do?

I'm trying to create a task management application to use for my business by me and my staff. Inside the application you would add new orders in a form style and assign the new order to a specific user (staff) to take it on and do it.

Starting from that I figured I need the following:

A login dialog/form to log in to the application - I've managed to do this.
I now enter the username and password in Form1 click on Login, it logs me in and it opens Form2.
I've also managed to add the logout button, a logo at login screen, password field shows up with ***** instead of plain text and the code to clear the username and password fields once I logout of the application + the error message in case you enter a wrong user/pass.

So that's basically done, my 1st dilemma regarding the login is this:

I currently have only 1 account, the admin one, my own.
I need to add 5 more separate accounts - 3 of which with not the same privileges.

How do I do this? Can anyone link an example / tutorial so I can go ahead and do the leg work?
Also the application will, once done, communicate to a mysql database on my website which will contain various tables with data like (customer name, address, shipping, etc) and those users will have button to process the orders (by process I mean edit tasks,orders,specific fields and so forth..) -

How do I create a login with multiple users for the same application with the functionality to basically modify and populate (also receive, obviously) data from the database in question? Basically connection to the database.

Ok, so, once the login thing is set up with the above stated I now want to add the following, in Form2 that currently opens after login:

A static top menu with the following items(buttons):

* Add new order/task
* All current orders/tasks
* Clients Archive
* General Archive

Explanation on the mentioned buttons:

* Add new order/task
- Basically a button and when you click on it it pops up a form with customized fields to enter info, like: Client Name, Client Orders details, Price, Method of shipping, Address, Contact Details - once you type in all the necessary info and click submit the form would send the data to the database and populate their respective tables.

1st question: What do I need to add/use in Delphi to add this form? I searched the net and found some very useful resources but I got confused between Forms, Frames, Sheets and Grids - no idea which is best for this.

2nd question: How do I connect that form inside delphi to send data to the database? What is the component in Delphi called?


* All current orders/tasks
- Once you click on this button a data table should load in the middle of the form containing columns and rows of data that has been retrieved from the database.

The respective columns would be the following:

Date and Time
Client Name
Order Details
Price
Which staff member is handling the order
Method of shipping/Address
State of order (in work, not yet handled by staff member, etc)

The data in these fields would come from the database which in turn would be populated when using the above mentioned Add new order/task button and filling out the respective form.

1st question: What kind of component do I need to use in Delphi to add the table/grid and set it up so that it's rows would be filled with the information from the database? What's it called?

2nd question: As I said the info in the fields would come from the database so it should be basically be fields that can't be edited from here, I'd like however the option to edit at least one of the fields, let's say the Order Details - in case I need to add some last minute fresh info. This would of course need to send the newly added info to the database and display it here also, so how do I do it? What's the component called?

3rd question: How can I sort the information in this table by date? I mentioned I will add a date and time field for when the order was added, I'd like to be able to click on it and once i do that the list should sort from oldest to newest entry's. That's the only clickable field I need in this section. How do I do that? What's the component called?


* Clients Archive
- A button that once clicked draws a table full of data that it imports from the database. The table would contain the following fields and subsequent info:

Client name
Client Email
Client Phone
and a notes field where I add something like, he's a douche, or something lol.

Data in the fields would be populated from the database and I want to add just 2 things here:

Once I click a client name it pops up a content box that shows me all his orders in a simple format, as in (1 on every row):

Date of order
Order details
Price

If he has 5 orders over time, I would have 5 rows in that popup, displaying that information, also pulled from the database.

2nd thing is a searchable field, where I type in a client name and it searches for him, if he finds him he would show up on the above mentioned table and I can click him to see his history. (this feature is for when the list is going to get huge)

* General Archive
- A button that once clicked shows a table / list of ALL COMPLETED orders. Once I complete an order from the earlier mentioned task list I click on a button to set it as a Complete order and basically change it's state, which would ship it to the General Archive and archive it.

The thing I need here is just the search field as mentioned above, same functionality. Data would be pulled, obviously, from the database.

A few sketches so you can have an idea of how the application would eventually look like:







Sorry about the Picasso style of drawing, I was in a hurry lol.

Thanks again and sorry for the heavy reading, I welcome and appreciate any and all reply's, regardless if the reply is just for 1 of the questions or all of them - thanks!

Last edited by tcsh; 09-28-2016 at 03:10 AM.
  #2  
Old 09-27-2016, 10:58 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 314
Default

Good to see a new person on the forum.

From my experience, spending a few hours a day in Delphi is the way to learn. It is really like learning Japanese. You learn to say hello, then good by etc, then after a few months, you string a few sentences together, and after many years, you become fluent. Delphi is no different.

Your program is a bit like trying to being fluent before you have got the sentences or syntax correct.

My suggestion is, ask each issue in a separate thread. Eg How do I set privileges on forms.

Can you run it single user to start with ?

PS what database are you using ?
  #3  
Old 09-28-2016, 03:19 AM
tcsh tcsh is offline
Member
 
Join Date: Sep 2016
Posts: 37
Default

Quote:
Originally Posted by Marsheng View Post
Good to see a new person on the forum.

From my experience, spending a few hours a day in Delphi is the way to learn. It is really like learning Japanese. You learn to say hello, then good by etc, then after a few months, you string a few sentences together, and after many years, you become fluent. Delphi is no different.

Your program is a bit like trying to being fluent before you have got the sentences or syntax correct.

My suggestion is, ask each issue in a separate thread. Eg How do I set privileges on forms.

Can you run it single user to start with ?

PS what database are you using ?
Hello there, good to be here.
I've just edited the post since I was using color white for a few things and they didn't show, being a white background on the forum. I imagine that caused some confusion and incoherence as to what I wrote so It should be fine now.

As per your comments, indeed, it does take time. I'm trying to jump ahead on this software as it would be better to get faster than later. I do understand stuff at a high rate once I find some logical and well written sources to read from so that's why I'm trying forums at this point.
I didn't open specific threads for each issue/step since I thought that would clog up too much and wouldn't be looked kindly upon.

I assume you're asking if I can for now stick to the single user I use to login and have managed to create, sure, I can do that and focus on the other things.

I'm currently using XAMPP for the database, xampp uses MariaDB and I acces it via phpmyadmin.
Just for testing purposes until I get the software ready, then I'll move it to a mysql database on my hosting.


Managed to create the database, added 3 tables (orders, client archive and general archive) all with the required (and above stated) columns and some data added to the rows for testing.

It should suffice for now, I'm currently trying to figure out how do I retrieve that data (the information in the rows of the orders table) from the db to a form in my software inside delphi and displaying it. After that I plan on tackling the Add new order button which as I said would be a form where I input information and send it to the db once done, there it would need to add a new row in the orders table with the information.

thanks for your reply!
  #4  
Old 09-28-2016, 05:30 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 314
Default

Quote:
How do I retrieve that data (the information in the rows of the orders table) from the db to a form in my software inside delphi and displaying it

Have you used a DBGrid as yet ?

For my programs I use a popup on the grid with the options. Add, delete edit record.

Popup is a DBGrid property.

I'm not sure why you just don't go straight to MySql.

Cheers Wallace.
  #5  
Old 09-28-2016, 05:37 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 314
Default

Here is something I wrote 7 years ago and still using it today.

https://www.youtube.com/watch?v=loTPukdPe8w

Last edited by Marsheng; 09-28-2016 at 05:38 AM. Reason: Wrong link.
  #6  
Old 09-28-2016, 09:21 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default

I can see what you are writing. You must be having a problem with your browser.
__________________
Regards,
Abdulaziz Jasser
  #7  
Old 09-28-2016, 09:23 AM
tcsh tcsh is offline
Member
 
Join Date: Sep 2016
Posts: 37
Default

Quote:
Originally Posted by Jasser View Post
I can see what you are writing. You must be having a problem with your browser.
testing with a new post after your reply
later edit: seems to work now, it didn't previously.
Said it's held for moderation and when I tried posting the same exact post again it said it's too identical to the last one, that's why I was asking, thanks.


later edit to reply to Marsheng

Quote:
Originally Posted by Marsheng View Post
Here is something I wrote 7 years ago and still using it today.

https://www.youtube.com/watch?v=loTPukdPe8w

Out of habbit I generaly develop stuff localy then switch it to wherever I'm hosting, that's why I'm using the xampp database now, but I guess you do have a point and I'll probably switch over to mysql.

Nope, haven't used DBGrid as of yet, that what I was asking, component names to get familiar with fast and use them in this software I'm trying to make, thanks for the name, going to read up on it and try to use it now.

Regarding your video, awesome software with a few modifications it would be perfect for my needs.
*begging for source code* ^_^

Last edited by tcsh; 09-28-2016 at 09:27 AM.
  #8  
Old 09-28-2016, 05:58 PM
tcsh tcsh is offline
Member
 
Join Date: Sep 2016
Posts: 37
Default

Quick update:

Managed to figure out how to use TDBGrid.

I've successfully made use of:

ActionManager
ActionMainMenuBar
SqlConnection
SqlQuery
DataSet
DataSource

Installed mysql server and testing on that.
Works like a charm!

It's connecting and retrieving the row and data from the specified table and displaying it on the grid in the form

Tackling the add new order button now..
  #9  
Old 09-28-2016, 09:23 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 314
Default

I use forms to enter data into the table not DBGrids.

On the DBGrid properties, Options set Row Select to True. That stops it form from being editable on the GBGrid.
  #10  
Old 09-29-2016, 09:04 AM
tcsh tcsh is offline
Member
 
Join Date: Sep 2016
Posts: 37
Default

Quote:
Originally Posted by Marsheng View Post
I use forms to enter data into the table not DBGrids.

On the DBGrid properties, Options set Row Select to True. That stops it form from being editable on the GBGrid.
Yes, I used a form with TLabel and TEdit also and the corresponding sql syntax's, works like a charm.

Here is a video I made with what I've done so far since I started this topic:

https://youtu.be/gMUibVjxRZI

Pretty excited!

My main issue now is how do I make it work like yours? ^_^
I've really enjoyed your 'trickle down' idea.
Selecting a client from the list in the 1st DBGrid and showing up all orders with details (order history for that client I presume) in the 2nd DBGrid and additional options in the 3rd DBGrid.

I'd like to implement a similar design if that's ok.
Can you provide any indications in this regard? maybe some code parts for that that I can use/modify or a run down on what you used so I can start reading?

Thanks a bunch!

Last edited by tcsh; 09-29-2016 at 09:13 AM.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 01:03 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.