private void SetAccountInfo() { if (!this.blNewFlag) { Model.Bu_MatchTb_Item info = modelObj as Model.Bu_MatchTb_Item; this.SetDataBind(info); } }
private void BtnAddItem_Click(object sender, EventArgs e) { FmMatchTbItem fm = new FmMatchTbItem(); fm.SelectValue += (obj) => { Model.Bu_MatchTb_Item item = obj as Model.Bu_MatchTb_Item; mDataGridItem.AddItem <Model.Bu_MatchTb_Item>(item); }; fm.ShowDialog(); }
private void BtnDeleteItem_Click(object sender, EventArgs e) { if (mDataGridItem.CurrentRow == null) { return; } Model.Bu_MatchTb_Item info = mDataGridItem.GetCurrentEntity() as Model.Bu_MatchTb_Item; string msg = string.Format("确定删除:{0},{1}?", info.Kind_Name, info.ItemFormula); if (Miles.Framework.UI.Function.Dialog.ShowQuestionYesNo(msg)) { mDataGridItem.DeleteCurrentItem <Model.Bu_MatchTb_Item>(); } }
private void BtnEditItem_Click(object sender, EventArgs e) { if (mDataGridItem.CurrentRow == null) { return; } Model.Bu_MatchTb_Item old = mDataGridItem.GetCurrentEntity() as Model.Bu_MatchTb_Item; FmMatchTbItem fm = new FmMatchTbItem(old); fm.SelectValue += (obj) => { Model.Bu_MatchTb_Item item = obj as Model.Bu_MatchTb_Item; mDataGridItem.EditCurrentItem <Model.Bu_MatchTb_Item>(item); }; fm.ShowDialog(); }
protected override bool BtnOkClick() { Dictionary <Control, string> dicEmptyCtrs = this.GetValidEmptyCtrs(); if (dicEmptyCtrs.Count > 0) { foreach (var ctr in dicEmptyCtrs.Keys) { Miles.Framework.UI.Function.MForm.SetToolTip(ctr, dicEmptyCtrs[ctr], 1000); return(false); } } Model.Bu_MatchTb_Item info = this.GetDataBind <Model.Bu_MatchTb_Item>(); Model.Info_mtl_item item = cmbMtlInfo1.SelectedItem as Model.Info_mtl_item; Model.Bu_MatchTb_Item update = Miles.Coro.Common.Utils.CopyToChild <Model.Info_mtl_item, Model.Bu_MatchTb_Item>(item); update.ItemFormula = info.ItemFormula; this.DoSelectValueEvent(update); return(true); }
public FmMatchTbItem(Model.Bu_MatchTb_Item info) : base(info) { InitializeComponent(); }