private void BtnAdd_Click(object sender, EventArgs e) { FmGenItem fmGenAdd = new FmGenItem(); fmGenAdd.SelectValue += (object obj) => { mDataGrid1.AddItem <Model.Info_fin_order_item>((Model.Info_fin_order_item)obj); }; fmGenAdd.ShowDialog(); }
private void BtnEdit_Click(object sender, EventArgs e) { if (mDataGrid1.CurrentRow == null) { return; } Model.Info_fin_order_item info = mDataGrid1.GetCurrentEntity() as Model.Info_fin_order_item; FmGenItem fmGenUpdate = new FmGenItem(info); fmGenUpdate.SelectValue += (object obj) => { mDataGrid1.EditCurrentItem <Model.Info_fin_order_item>((Model.Info_fin_order_item)obj); }; fmGenUpdate.ShowDialog(); }