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