예제 #1
0
 private void SetAccountInfo()
 {
     if (!this.blNewFlag)
     {
         Model.Bu_MatchTb_Item info = modelObj as Model.Bu_MatchTb_Item;
         this.SetDataBind(info);
     }
 }
예제 #2
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();
        }
예제 #3
0
        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>();
            }
        }
예제 #4
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();
        }
예제 #5
0
        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);
        }
예제 #6
0
 public FmMatchTbItem(Model.Bu_MatchTb_Item info)
     : base(info)
 {
     InitializeComponent();
 }