Пример #1
0
 //Удаление выбранного менеджера
 private void delManagerBtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (managersTable.Rows.Count == 0)
         {
             MessageBox.Show("Нет записей для удаления!");
             return;
         }
         managersTable.DataSource = null;
         DBConnection.DeleteManager(managerID);
         DBConnection.GetManagers();
         managersTable.DataSource = DBConnection.dtManagers;
         if (DBConnection.dtManagers.Rows.Count > 0)
         {
             ReadManagersTableRow(0);
         }
     }
     catch (Exception ex)
     {
         exceptPanel.Visible = true;
         richTextBox1.Text   = ex.ToString();
     }
 }