Beispiel #1
0
        private void FormLoad(object sender, EventArgs e)
        {
            #region 加载主窗体事件

            if (opState == OpState.Add)
            {
                model               = new Mould();
                model.dtEquipment   = dal.GetEqDetails("");
                model.MCId          = modelC.MCId;
                model.cMCCode       = modelC.Code;
                model.cMCName       = modelC.Name;
                model.cMaker        = Information.UserInfo.cUser_Name;
                lblModuleTitle.Text = "新增 - " + this.lblModuleTitle.Text;
            }
            else if (opState == OpState.Update)
            {
                model               = dal.Get(MId);
                model.cModifier     = Information.UserInfo.cUser_Name;
                oldMCode            = model.cMCode;
                lblModuleTitle.Text = "编辑 - " + this.lblModuleTitle.Text;
            }

            UIControl.SetStatus(tab_Main.AttachedControl, opState);
            UIBinding <Mould> .UIDataBinding(tab_Main.AttachedControl, model);

            #endregion
        }
Beispiel #2
0
        private void ReturnData(object sender, EventArgs e)
        {
            #region 新增业务数据

            string mid = (string)dtDetail.Rows[sGrid.CurrentRow.Index]["MId"];

            Result = dal.Get(mid);

            DialogResult = DialogResult.OK;

            #endregion
        }
Beispiel #3
0
        private void FormLoad(object sender, EventArgs e)
        {
            #region 加载主窗体事件

            model = dal.Get(MId);

            this.InitColumns();
            UIBinding <Mould> .UIDataBinding(panelEx1, model);

            Grid.DataSource = model.dtEquipment.DefaultView;

            model.dtEquipment.ColumnChanging += DtEquipment_ColumnChanging;

            #endregion
        }