/// <summary> /// delete a row in the database given the datarow that was deleted from the control and datatable /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Table_RowDeleted(object sender, DataRowChangeEventArgs e) { try { registrationDB.DeleteTableRow(e.Row); } catch (Exception ex) { MessageBox.Show(ex.Message); } //update view registrationDB.LoadDataTable(dataGridViewDepartmentMajorsCount.DataSource as DataTable); }
private void RegistrationTableRowDelete(DataRowChangeEventArgs e) { try { registrationDB.DeleteTableRow(e.Row); } catch (Exception ex) { MessageBox.Show(ex.Message); } // updata the lower control (a view) registrationDB.LoadDataTable(dataGridViewDepartmentMajorsCount.DataSource as DataTable); }