Beispiel #1
0
 public void Save(object sender, EventArgs e)
 {
     try
     {
         if (Valid())
         {
             this.Cursor = Cursors.WaitCursor;
             UpdateEntity();
             if (m_do.ID == 0)
             {
                 r_grn.Save(m_do);
             }
             else
             {
                 r_grn.Update(m_do);
             }
             KryptonMessageBox.Show("Transaction '" + m_do.CODE + "' Record has been saved", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
             textBoxCode.Text = m_do.CODE;
             setEnableForm(false);
             setEditMode(EditMode.View);
             textBoxCode.Focus();
             this.Cursor = Cursors.Default;
         }
     }
     catch (Exception x)
     {
         KryptonMessageBox.Show(x.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }