Пример #1
0
 protected override void Delete()
 {
     if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) != DialogResult.OK)
     {
         return;
     }
     // try
     {
         DataRowView dr = this.bindingSource1.Current as DataRowView;
         this.departmentManager.Delete(dr.Row.ItemArray[0].ToString());
         this.data = departmentManager.GetAll();
     }
     //catch
     //{
     //    MessageBox.Show(Properties.Resources.DeleteError, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     //}
 }