Beispiel #1
0
 public override void Change()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiRank") != "OK"))
     {
         if (MyRule.AllowAccess)
         {
             DIC_SALARY_RANK dICSALARYRANK = new DIC_SALARY_RANK();
             object          cellValue     = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "RankCode");
             if (cellValue != null)
             {
                 base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                 if (!(dICSALARYRANK.Get(cellValue.ToString()) != "OK"))
                 {
                     this.DoHide();
                     xfmRankAdd _xfmRankAdd = new xfmRankAdd(Actions.Update, dICSALARYRANK);
                     _xfmRankAdd.Updated += new xfmRankAdd.UpdatedEventHander(this.frm_Updated);
                     _xfmRankAdd.Added   += new xfmRankAdd.AddedEventHander(this.frm_Added);
                     _xfmRankAdd.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();
         }
     }
 }
Beispiel #2
0
 protected override void Add()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiRank") != "OK"))
     {
         if (MyRule.AllowAdd)
         {
             xfmRankAdd _xfmRankAdd = new xfmRankAdd(Actions.Add);
             _xfmRankAdd.Added += new xfmRankAdd.AddedEventHander(this.frm_Added);
             _xfmRankAdd.ShowDialog();
         }
         else
         {
             MyRule.Notify();
         }
     }
 }