Example #1
0
 private void dgvRefSurveys_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
 {
     // prompt user that they are deleting records
     if (MessageBox.Show("Are you sure you want to delete this Reference Survey record?", "Confirm Delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         // delete records
         SurveyCheckRefSurvey rec = (SurveyCheckRefSurvey)dgvRefSurveys.Rows[e.Row.Index].DataBoundItem;
         DBAction.DeleteSurveyCheckRef(rec.ID);
     }
 }