6 - Order Section
When you click on the 'Order' tab, the 'MANAGE_ORDERS_FORM' will show up, which contains:
- 1 'jTable' with all customers.
- 1 'jTable' for products (showing products depending on the selected category in the combobox).
- 1 'jTable' to display the products you want to add to the order .
Watch A Full Order Section Demonstration
on the jtable for customers, if you select a row the customer id will be set into the jtextfield id.
Now, if you want to add products to the order, follow these steps:
1 - Select the category you want from the combobox.
2 - Click on the product you want to add, then click on the '>>>' button. Enter the quantity you want. Note that you cannot enter 0 or leave the box empty, and you cannot enter a quantity higher than what is available in the database.
If everything is okay, the selected product will be added to the order JTable with the quantity you want.
now lets add more products to the order table
- in the jtable you can see a column "Quantity X Price" where we calculate the total price for this product.
- on the bottom you can see the total amount of all products.
- The "Remove Product" button allows you to remove the selected product from the order table.
- The "Clear" button allows you to remove all products from the order table.
if all is good, click the "Insert Order" button to add the new order with the details into the database.
If you want to view all the orders, click on the 'Show All Orders' button, and the All_Orders_Form will appear with all the orders displayed in a jTable.
when you click on "Print Selected Order" the selected order will be printed into a text file.
7 - User Section
The last tab is for users, which is only accessible by the admin. When the user tab is clicked, the MANAGE_USERS_FORM will appear, displaying all users in a jtable.
- When you select a user from the JTable, all of their data will be populated into text fields, allowing you to edit or delete the information.
- And to add a new user, enter the user information and click on the 'Insert' button.