Exemplo n.º 1
0
 public override void Change()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiEthnic") != "OK"))
     {
         if (MyRule.AllowAccess)
         {
             DIC_ETHNIC dICETHNIC = new DIC_ETHNIC();
             object     cellValue = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "EthnicCode");
             if (cellValue != null)
             {
                 base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                 if (!(dICETHNIC.Get(cellValue.ToString()) != "OK"))
                 {
                     this.DoHide();
                     xfmEthnicAdd _xfmEthnicAdd = new xfmEthnicAdd(Actions.Update, dICETHNIC);
                     _xfmEthnicAdd.Updated += new xfmEthnicAdd.UpdatedEventHander(this.frm_Updated);
                     _xfmEthnicAdd.Added   += new xfmEthnicAdd.AddedEventHander(this.frm_Added);
                     _xfmEthnicAdd.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();
         }
     }
 }