It then compares the usernames and passwords to those entered on the login form. Notice
how easy it is to call the stored procedure using IntelliSense and dot notation. Sweet.
If the login is successful, the main form is displayed (you saw that in Figure A-3). It doesn??™t really do
anything right now, so stop the application and add a new form to the project, naming it SelectProduct.
On this form add the following controls (again, those blank cells in the tables throughout this appendix
are blank on purpose because those objects on the form do not require that the object name to be changed
or the Text value set).
Object Type Name Text
Label Product Category
Label Products in
Button cmdNew New
319
Appendix A: Case Study
Object Type Name Text
Button cmdEdit Edit
Button cmdDelete Delete
ComboBox cboProductType
DataViewGrid grdProducts
This form, when laid out, should look something like Figure A-5.
Figure A-5
Now add the following code to the Load() event of the new SelectProduct form. Be sure to use the
correct username and password in the DataContext connection string.
Pages:
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498