Пример #1
0
        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();
        }
Пример #2
0
        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();
        }