Exemple #1
0
 private void SaveData(bool showConfirmMsg = true)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         if (ValidateBeforeSave())
         {
             if (!showConfirmMsg || rMessageBox.ShowConfirmation(this, MessageCode.CFM0001) == DialogResult.Yes)
             {
                 int ID = vmRpt.SaveWorkPlaceAir(wpaResult);
                 rMessageBox.ShowInfomation(this, MessageCode.INF0002);
                 this.IsDataChange = true;
                 wpaResult         = vmRpt.GetWorkPlaceAir(ID);
                 mode = ScreenMode.Edit;
                 RetriveData();
             }
         }
     }
     catch (Exception ex)
     {
         rMessageBox.ShowException(this, ex);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }