/// <summary> /// Pulls the current data from the database and updates the incidence listing /// </summary> protected void FillData() { List <IncidentModel> incidences = IncidenceBL.GetIncidentList(); IncidentGrid.DataSource = incidences; IncidentGrid.DataBind(); }
/// <summary> /// Updates the incidence listing /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void IncidentRowUpdating(object sender, GridViewUpdateEventArgs e) { //Gets the user selected row GridViewRow row = (GridViewRow)IncidentGrid.Rows[e.RowIndex]; //Edits the row from the database IncidenceBL.EditStatus(Convert.ToInt32(row.Cells[0].Text)); //Reloads the data from the database (now presumably excluding the deleted value) FillData(); }