Lab 6

Ticket Status Updates - OMIS 675

Edit the FormView to allow an analyst to update and close a help desk ticket - 10 points – Due by end of class 3/5. Google Doc version

Create a STATUS table

    1. Create a new table in your DB, called STATUS, with one column named ‘Status’. Data Type has to be nchar(15). Add two values in this table OPEN and CLOSED

Modify your existing Incident table

    1. In your existing incident table, add a column called NOTES. Make this a data type nvarchar(MAX) , It should allow Null values.

Modify your existing Tickets form

    1. Open your Tickets.aspx form in Visual Studio
    2. Delete the existing FormView, and the SQLDataSource that went with it.
    3. Add another FormView in the same place
    4. Configure the FormView to point to your Incident table and display all records
    5. Ensure sure that the INSERT, UPDATE, and DELETE statements will be generated. (Hint: ‘Advanced’ button )
    6. Re-Add the logic you created in lab 5 to ensure the FormView displays the selected record of the record selected in the Gridview (Hint: WHERE button)
    7. Go into the ‘Edit Template’ menu of your FormView, select the ‘EditItemTemplate’ display option
    1. Make the Notes textbox larger, and change the TextMode property to Multiline
    1. End Template Editing
    1. Save
    2. Visit your Tickets.ASPX page on the web, and enter a note on an existing ticket.
    3. Make sure your FormView is still changing when you select a different record in the GridView.

Add a dropdown list to the Incident table FormView to allow for status changes

    1. Enter the Edit Templates menu of your FormView again. Select the EditItemTemplate display option
    2. Replace the textbox next to Status with a dropdownlist control
    3. Configure the dropdownlist to be databound to the STATUS table you created in Part 1.
    4. Select Edit DataBindings...
    1. Create a two-way binding between the Status field and ‘SelectedValue’ property.
    1. OK. End the Edit Templates, Save.
    2. View the Events (lightning bolt) for your FormView. Double-click on the ItemUpdated field.

    1. Add this line to the code-behind to make the Gridview refresh when the server status is updated. GridView1.DataBind()
    2. View on the web. If you did this successfully, you will be able to Edit a record in the FormView and change the status from OPEN to CLOSED
    1. If your GridView is still working correctly, it should only display OPEN tickets.


10 Points for a working assignment

0 Points for a non working assignment