Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
        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);
        }