Example #1
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     Models.students selectedRow = (Models.students)grvData.CurrentRow.DataBoundItem;
     database.Table(typeof(Models.students)).Delete(selectedRow);
     MessageBox.Show("Delete successfully. Refresh...");
     loadData();
 }
Example #2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (grvData.CurrentRow == null)
     {
         return;
     }
     Models.students selectedRow = (Models.students)grvData.CurrentRow.DataBoundItem;
     Views.students  updateForm  = new Views.students(selectedRow);
     updateForm.Show();
 }