void mDataGridNvl_CurrentRowChanged(object sender, EventArgs e) { if (this.mDataGridNvl.CurrentRow == null) { this.DoSelectValueEvent(null); return; } Model.Info_tmp info = mDataGridNvl.GetCurrentEntity() as Model.Info_tmp; this.DoSelectValueEvent(info); }
void btnEdit_Click(object sender, EventArgs e) { if (mDataGridNvl.CurrentRow == null) { return; } Model.Info_tmp info = mDataGridNvl.GetCurrentEntity() as Model.Info_tmp; //int id = (int)d_OrderType.ComboBox.SelectedValue; FmTmpInfo fm = new FmTmpInfo(info); //fm.SetOrderType(id); fm.SelectValue += new Miles.Framework.UI.Forms.FmCustomInfo.SelectValueHandler(fmEdit_SelectValue); fm.ShowDialog(); }
void btnDelete_Click(object sender, EventArgs e) { if (mDataGridNvl.CurrentRow == null) { return; } Model.Info_tmp info = mDataGridNvl.GetCurrentEntity() as Model.Info_tmp; if (Miles.Framework.UI.Function.Dialog.ShowWarningYesNo("确定要删除:" + info.Tmp_Name + "信息?")) { if (tmpManager.Remove(info)) { mDataGridNvl.DeleteCurrentItem <Model.Info_tmp>(); } } }
public FmTmpInfo(Model.Info_tmp info) : base(info) { InitializeComponent(); }
void fmEdit_SelectValue(object obj) { Model.Info_tmp info = obj as Model.Info_tmp; mDataGridNvl.EditCurrentItem <Model.Info_tmp>(info); }
void fmAdd_SelectValue(object obj) { Model.Info_tmp info = obj as Model.Info_tmp; mDataGridNvl.AddItem <Model.Info_tmp>(info); }