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