Пример #1
0
 public void Delete(object obj, EventArgs e)
 {
     try
     {
         if (m_stocktaking.ID > 0)
         {
             this.Cursor = Cursors.WaitCursor;
             if (KryptonMessageBox.Show("Are you sure to delete this record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
             {
                 this.Cursor = Cursors.Default; return;
             }
             r_stocktaking.Delete(m_stocktaking);
             ClearForm();
             setEnableForm(true);
             setEditMode(EditMode.New);
             textBoxCode.Focus();
             this.Cursor = Cursors.Default;
         }
     }
     catch (Exception x)
     {
         KryptonMessageBox.Show(x.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Пример #2
0
 private void Delete()
 {
     m_stRep.Delete(new StockTaking(3));
 }