Winforms Practical Exam 03

This is a Shopping Cart System.
The system will allow user to add new, edit, delete products and choose products to save in a shopping cart:

Database Schema

Figure 1: Database Schema

The database script has been generated for you at: Shoppingcart.sql .
Use it to create your local database.

Server: xxxxxxxx
Database: xxxxxxxx
User: xxxxxxx
Create your winforms project at the following folder on your local machine
D:\xxxxxxxxxx

Perform the following functions for the application:

  1. Create an MDI form with the Tools menu and 2 sub menus : Product Management and Shopping Cart as follow: [1 mark]
     

    Main Form

    Figure 2: Main Form

    – When user click the Product Management menu, show the Products form. [0.5 mark]
    – When user click the Shopping Cart menu, show the Shopping form. [0.5 mark]
    – Show dialog (Yes/No) to confirm  when user close the form. [1 mark]

  2. When Products form is opened. Design the following visual interfaces:
    Products management form

    Figure 3: Products management form

    – The Product ID text box is Disabled
    – Load all products in database and display all fields in the All Products data grid. [2 marks]
    – When user select a product in the data grid, fill all product information: ProductID, Product name, Price, Quantity to the text boxes above. [3 marks]
    – When user click Update button, update the current selected product with new values in text boxes. [3 marks]
    – When user click Add new button, add new product with product name, price … [3 marks]

  3. When the Shopping cart form is opened. Design the following visual interfaces
    Shopping form

    Figure 4: Shopping form

    – Fill all the products to the combo box Select product. [3 marks]
    – When user select a product in the combo box, display its price in the label Price [1 mark]
    – When user select a product in the combo box and enter a positive number in the quantity textbox then click Add to cart, add the product name to the list box and calculate total cost = quantity * price and set to the label Total cost [2 marks]
    – User can select a product in the list box then click Remove button to remove it from cart. Re calculate the total cost [2 marks]
    – If user click the Save button, insert all selected products in cart into the table Carts with quantity, total cost and [Date] = current date.  [2 marks]

  4. Use appropriate exception handling for the application. [1 mark]

Total: 25 marks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s