public override void Change() { if (!(MyRule.Get(MyLogin.RoleId, "bbiInformatic") != "OK")) { if (MyRule.AllowAccess) { DIC_INFORMATIC dICINFORMATIC = new DIC_INFORMATIC(); object cellValue = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "InformaticCode"); if (cellValue != null) { base.SetWaitDialogCaption("Đang kiểm tra dữ liệu...."); if (!(dICINFORMATIC.Get(cellValue.ToString()) != "OK")) { this.DoHide(); xfmInformaticAdd _xfmInformaticAdd = new xfmInformaticAdd(Actions.Update, dICINFORMATIC); _xfmInformaticAdd.Updated += new xfmInformaticAdd.UpdatedEventHander(this.frm_Updated); _xfmInformaticAdd.Added += new xfmInformaticAdd.AddedEventHander(this.frm_Added); _xfmInformaticAdd.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(); } } }
protected override void Add() { if (!(MyRule.Get(MyLogin.RoleId, "bbiInformatic") != "OK")) { if (MyRule.AllowAdd) { xfmInformaticAdd _xfmInformaticAdd = new xfmInformaticAdd(Actions.Add); _xfmInformaticAdd.Added += new xfmInformaticAdd.AddedEventHander(this.frm_Added); _xfmInformaticAdd.ShowDialog(); } else { MyRule.Notify(); } } }