Пример #1
0
 protected override void Change()
 {
     base.Change();
     if (MyRule.IsAccess("bbiProcessAdvance"))
     {
         HRM_PROCESS_ADVANCE hRMPROCESSADVANCE = new HRM_PROCESS_ADVANCE();
         object focusedRowCellValue            = this.gbList.GetFocusedRowCellValue("AdvanceID");
         if (focusedRowCellValue != null)
         {
             base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
             if (!(hRMPROCESSADVANCE.Get(new Guid(focusedRowCellValue.ToString())) != "OK"))
             {
                 this.DoHide();
                 xfmAdvanceAdd _xfmAdvanceAdd = new xfmAdvanceAdd(Actions.Update, hRMPROCESSADVANCE);
                 _xfmAdvanceAdd.Updated += new xfmAdvanceAdd.UpdatedEventHander(this.frm_Updated);
                 _xfmAdvanceAdd.Added   += new xfmAdvanceAdd.AddedEventHander(this.frm_Added);
                 _xfmAdvanceAdd.ShowDialog();
             }
             else
             {
                 this.DoHide();
                 XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
         }
     }
 }
Пример #2
0
 protected override void Add()
 {
     base.Add();
     if (MyRule.IsAdd("bbiProcessAdvance"))
     {
         xfmAdvanceAdd _xfmAdvanceAdd = new xfmAdvanceAdd(Actions.Add, "");
         _xfmAdvanceAdd.Added += new xfmAdvanceAdd.AddedEventHander(this.frm_Added);
         _xfmAdvanceAdd.ShowDialog();
     }
 }