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