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