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