Thursday, September 20, 2007

Sample Code and Slide: Data Access

This sample uses the SQL provider to retrieve and manipulate data in an attached database (SQLExpress). This also demonstrates binding data to DataGridView and ComboBox controls.

To run the application, edit the AttachDbFilename value in the App.config file to point to the correct path of the database file. You can also copy the mdf/ldf files to a fixed location, e.g. "C:\", and set your AttachDbFilename value to "C:\Purchasing.mdf"

Download Code
Download Powerpoint Presentation

Wednesday, September 12, 2007

Final Program: Forms

Instruction: Submit this exercise on September 19, Wednesday. Compress the whole project located at "My Documents Path\Visual Studio 2005\Projects\Project Name" (default) or at the location you specified. Upload this file to ELMS. Also include the database design for your final project.

Continuing from exercise #8, create additional forms (a minimum of 3) for the transactions that your application will support. Each form should contain all fields necessary to process its corresponding transaction and should provide validation of its fields.

As an example, consider a Loans Management System which allows a group or a company to monitor all member loans. Possible transactions identified can include the following:
  • Loan Application - form to process member loan applications. Fields can include the transaction date, loan status, member information, loan type, loan cycle, loan amount, interest, mode of payment (monthly, weekly, etc) and terms of payment. Validation can be applied to numeric types like loan cycle, loan amount, and interest.
  • Loan Release - form to process loan disbursements. Fields can include the release date, loan status, and authorizing officer.
  • Loan Payment - form to process payments made by member. Fields can include the payment date, principal amount paid, interest amount paid, and cashier. Validation can be applied to numeric types.