Duration: 2 Hours
Total Marks: 30
- Create a new Winform project.
- Create a MDI form as following. [2 marks]
- Create Menu as: [2 marks]
File (Login, View Orders, Exit)
- When the user click on the: [2 marks]
– Login menu item, show the Login form.
– View Orders menu item, show the Orders form.
– About menu item, show the About form.
– Exit menu item, end the program.
- Create Login form as following: [2 marks]
- When the user clicked the OK button. The following validations must be performed: [3 marks]
– The Textboxes can not be blank.
– If the User name is “aptech” and Password is “winform” then show a message box to welcome and then close the Login form.
– If the User name or Password is not correct, clear all textboxes and show a message to inform the user.
- Create the MDI child Orders form as below: [3 marks]
Using NorthWind database which is available in SQL server, write code to performs the tasks as following:
– When the form is loaded, populate Combobox with CompanyName from Customers table. (4 marks)
– When the user select a customer from Combobox, all Orders (from Orders table with OrderID, OrderDate and ShipCountry fields) of that customer must be shown in the DataGrid on the left of the form. [5marks]
– When the user select an Order from the Orders list, all details (ProductName, UnitPrice, Quantity and Amount fields (Amount=UnitPrice*Quantity)) of that order must be shown in the DataGrid on the right of the form. [5 marks]
- Create About form as: [1 marks]
Insert the images into the form (any image) and the Close button.
Write code to close the form when the user click on the Close button. [1 marks]