Exemple #1
0
 public override void Change()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiJob") != "OK"))
     {
         if (MyRule.AllowAccess)
         {
             DIC_JOB dICJOB    = new DIC_JOB();
             object  cellValue = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "JobCode");
             if (cellValue != null)
             {
                 base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                 if (!(dICJOB.Get(cellValue.ToString()) != "OK"))
                 {
                     this.DoHide();
                     xfmJobAdd _xfmJobAdd = new xfmJobAdd(Actions.Update, dICJOB);
                     _xfmJobAdd.Updated += new xfmJobAdd.UpdatedEventHander(this.frm_Updated);
                     _xfmJobAdd.Added   += new xfmJobAdd.AddedEventHander(this.frm_Added);
                     _xfmJobAdd.ShowDialog();
                 }
                 else
                 {
                     this.DoHide();
                     XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                 }
             }
         }
         else
         {
             MyRule.Notify();
         }
     }
 }
Exemple #2
0
 protected override void Add()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiJob") != "OK"))
     {
         if (MyRule.AllowAdd)
         {
             xfmJobAdd _xfmJobAdd = new xfmJobAdd(Actions.Add);
             _xfmJobAdd.Added += new xfmJobAdd.AddedEventHander(this.frm_Added);
             _xfmJobAdd.ShowDialog();
         }
         else
         {
             MyRule.Notify();
         }
     }
 }