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