public override void Change() { if (!(MyRule.Get(MyLogin.RoleId, "bbiJob") != "OK")) { if (MyRule.AllowAccess) { DIC_GROUP_RATE dICGROUPRATE = new DIC_GROUP_RATE(); object cellValue = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "GroupRateCode"); if (cellValue != null) { base.SetWaitDialogCaption("Đang kiểm tra dữ liệu...."); if (!(dICGROUPRATE.Get(cellValue.ToString()) != "OK")) { this.DoHide(); xfmGroupRateAdd _xfmGroupRateAdd = new xfmGroupRateAdd(Actions.Update, dICGROUPRATE); _xfmGroupRateAdd.Updated += new xfmGroupRateAdd.UpdatedEventHander(this.frm_Updated); _xfmGroupRateAdd.Added += new xfmGroupRateAdd.AddedEventHander(this.frm_Added); _xfmGroupRateAdd.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, "bbiJob") != "OK")) { if (MyRule.AllowAdd) { xfmGroupRateAdd _xfmGroupRateAdd = new xfmGroupRateAdd(Actions.Add); _xfmGroupRateAdd.Added += new xfmGroupRateAdd.AddedEventHander(this.frm_Added); _xfmGroupRateAdd.ShowDialog(); } else { MyRule.Notify(); } } }
private void glkGroupRate_ButtonClick(object sender, ButtonPressedEventArgs e) { { if (e.Button.Kind == ButtonPredefines.Plus) { string name = (sender as GridLookUpEdit).Name; if (name != null) { if (name != "glkGroupRate") { goto Label0; } xfmGroupRateAdd _xfmGroupRateAdd = new xfmGroupRateAdd(Actions.Add); _xfmGroupRateAdd.Added += new xfmGroupRateAdd.AddedEventHander((object s, DIC_GROUP_RATE i) => (new DIC_GROUP_RATE()).AddGridLookupEdit(this.glkGroupRate)); _xfmGroupRateAdd.ShowDialog(); } Label0 :; } } }