This sample improves the previous one by delegating all data access functions to a separate class named DBHelper. This also implements row filtering using the DefaultView property of a DataTable.
Download Code
This sample uses an MS Access database for persistent storage and adds reporting capabilities. This uses a different approach to retrieving and updating data by extending the DataSet class.
Download Code
To run both applications, set the ConnectionString value of the App.config file to the correct path of the databases. For the second example, Crystal Studio should be installed.
Showing posts with label samples. Show all posts
Showing posts with label samples. Show all posts
Friday, October 12, 2007
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
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
Tuesday, August 28, 2007
Sample Code and Slide: Regular Expressions
This sample demonstrates using regular expressions for matching patterns in a string, which can be used to perform form data validation. This also uses a listbox form control for displaying results.
Download Code
Download Powerpoint Presentation
Download Code
Download Powerpoint Presentation
Wednesday, August 8, 2007
Sample Code: Forms (Properties)
This sample demonstrates using some of the properties of the Form controls to control the application's behavior. This also demonstrates the use of classes to pass data between forms, accessible through a property.
Download Code
Download Code
Wednesday, August 1, 2007
Sample Code: Forms (Label, TextBox and Button)
This sample demonstrates the use of Label, Text and Button controls in a Windows Application. It also uses the MessageBox class for displaying messages in a separate Windows Form.
Download Code
Download Code
Saturday, July 28, 2007
Sample Codes: Arrays and Collections
Here are the sample codes demonstrating the concepts discussed for arrays and collections
Tuesday, July 10, 2007
Sample Code: Class Inheritance
This sample implements the inheritance hierarchy shown below

Download Code
Note: If clicking on this link doesn't work, copy the link location to a new browser window

Download Code
Note: If clicking on this link doesn't work, copy the link location to a new browser window
Subscribe to:
Posts (Atom)