Site Search

Program 4: Tool Tips, Help, and Data Controls

Student Learning Objectives

Assignment

MainForm (5K)

Create an Access database named Program4.mdd that includes one table (Courses) that stores information regarding computer science courses at CWU.

Create a C# Windows application with a MainForm with two buttons: (1) View All Course and (2) Add New Course

  1. Clicking on the View All Courses button should open a new form (non-modal) which contains a DataGridView displaying all the courses in an easily navigable table layout.
    • Note: I expect you to create the contents of this form using Visual Studio Designer and selecting the DataGridView from your Courses Data Source drop down list and dragging your Courses object from the Data Sources window onto this form.
    • Add a Close button to close this form and a Refresh button which refreshes the DataGridView from the database without closing the form.
  2. Clicking on the Add New Course button brings up a custom modal Dialog Box to add one new course to the database
    • Note: you are expected to create this form based on your own design and controls, this is not intended to be generated automatically from the Details view on the Courses Data Source
    • Include tool tips, context-sensitive help, and online help to aid users in using your dialog box
    • Include a OK button (which saves the user entered course data as a new row in the database and closes the modal dialog box, returning DialogResult.OK
    • Include a Cancel button which returns DialogResult.Cancel
    • Include a Help button that opens the user's default Web browser to a minimalist help page (use relative addressing)
    • Use alignment, layout, a logical tab, order and access keys to aid usability and accessibility

Adding a New Course

The dataSet.Courses object (in memory) has an AddCoursesRow method that you can use to add a row to the database. The parameters to the method are the field values (excluding the auto-increment primary key) for the new record

   this.program4DataSet.Courses.AddCoursesRow(dept, number, credits, title);

The AddCoursesRow method will add the row to the in-memory dataset. To save the changes, call the Update method for your coursesTableAdapter object

Submission Requirements

Grading Criteria

50 points maximum

The assignment will be scored using the following criteria: