Пример #1
0
        private void RefreshUI()
        {
            if (opState == OpState.Add)
            {
                this.dtDetail = dal.GetTableByInv("");
                this.txtr_cInvCode.Clear();
                this.txtr_cInvName.Clear();
                this.txtr_cInvStd.Clear();
            }

            if (dtDetail != null && dtDetail.Rows.Count > 0)
            {
                var row = dtDetail.Rows[0];

                txtr_cInvCode.Text = row[txtr_cInvCode.Tag.ToString()].ToString();
                txtr_cInvName.Text = row[txtr_cInvName.Tag.ToString()].ToString();
                txtr_cInvStd.Text  = row[txtr_cInvStd.Tag.ToString()].ToString();
            }

            gridControl1.DataSource = dtDetail;

            UIControl.SetStatus(this.collapsibleSplitContainer1.Panel2, this.opState);
            UIControl.SetStatus(this, this.opState);

            if (opState == OpState.Add || opState == OpState.Update)
            {
                gridControl2.Enabled = false;
            }
            else
            {
                gridControl2.Enabled = true;
            }
        }
Пример #2
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
        }
Пример #3
0
        private void ReflashUI()
        {
            #region 刷新界面
            if (opState == OpState.Browse || opState == OpState.Audit)
            {
                bar2.Enabled        = bar3.Enabled = false;
                btn_upload.Enabled  = false;
                btn_delfile.Enabled = false;
                this.gridDetail.OptionsBehavior.Editable = false;
                this.gridDetail.OptionsBehavior.ReadOnly = true;
                this.gridRouter.OptionsBehavior.Editable = false;
                this.gridRouter.OptionsBehavior.ReadOnly = true;
            }
            else
            {
                bar2.Enabled        = bar3.Enabled = true;
                btn_upload.Enabled  = true;
                btn_delfile.Enabled = true;
                this.gridDetail.OptionsBehavior.Editable = true;
                this.gridDetail.OptionsBehavior.ReadOnly = false;
                this.gridRouter.OptionsBehavior.Editable = true;
                this.gridRouter.OptionsBehavior.ReadOnly = false;
            }

            UIControl.SetStatus(this, this.opState);
            #endregion
        }
Пример #4
0
        private void RefreshUI()
        {
            if (opState == OpState.Browse || opState == OpState.Audit)
            {
                if (model.iState == 0)
                {
                    this.opState = OpState.Browse;
                }
                else if (model.iState == 1)
                {
                    this.opState = OpState.Audit;
                }
            }

            UIControl.SetStatus(this, this.opState);

            this.txtr_QmCode.DataBindings.Clear();
            this.txtr_maker.DataBindings.Clear();
            this.dQmDate.DataBindings.Clear();

            this.txtr_QmCode.DataBindings.Add("Text", model, "QMRCode", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_maker.DataBindings.Add("Text", model, "cMaker", true, DataSourceUpdateMode.OnPropertyChanged);
            this.dQmDate.DataBindings.Add("Value", model, "dDate", true, DataSourceUpdateMode.OnPropertyChanged);

            gridControl1.DataSource = model.Details;
        }
Пример #5
0
        private void FormLoad(object sender, EventArgs e)
        {
            #region 加载主窗体事件

            InitGrid();

            if (opState == OpState.Add)
            {
                model = new Equipment();
                if (modelC != null)
                {
                    model.EQCId        = modelC.EQCId;
                    model.cEQCCode     = modelC.Code;
                    model.cEQCName     = modelC.Name;
                    model.cMaker       = Information.UserInfo.cUser_Name;
                    model.dtOperations = dal.GetDTable(0);
                }
                lblModuleTitle.Text = "新增 - " + this.lblModuleTitle.Text;
            }
            else if (opState == OpState.Update)
            {
                model               = dal.Get(EQId);
                model.cModifier     = Information.UserInfo.cUser_Name;
                oldEQCode           = model.cEQCode;
                lblModuleTitle.Text = "编辑 - " + this.lblModuleTitle.Text;
            }

            UIControl.SetStatus(tab_Main.AttachedControl, opState);

            UIBinding <Equipment> .UIDataBinding(panelEx1, model);

            Grid.DataSource = model.dtOperations;

            #endregion
        }
Пример #6
0
 private void Edit(object sender, EventArgs e)
 {
     #region 编辑
     this.opState = OpState.Update;
     UIControl.SetStatus(this, this.opState);
     //UIControl.SetStatus(bar1, bar2, pnlMain, gridView1, OpState.Update);
     #endregion
 }
Пример #7
0
 private void SetUIStatus(OpState op)
 {
     if (model != null)
     {
         UIBinding <MergeCard> .UIDataBinding(pnlMain, model);
     }
     UIControl.SetStatus(this, op);
     gridControl1.DataSource = model.dtDetails;
 }
Пример #8
0
        private void RefreshUI()
        {
            if (model != null)
            {
                UIBinding <Routing> .UIDataBinding(panelEx2, model);

                Grid.DataSource = model.DtRoutings;
            }

            UIControl.SetStatus(Head_Bar, panelEx1, opState);
        }
Пример #9
0
        private void FormLoad(object sender, EventArgs e)
        {
            #region 加载主窗体事件

            if (opState == OpState.Update)
            {
                oldCode             = model.QMItemCode;
                lblModuleTitle.Text = "编辑 - " + this.lblModuleTitle.Text;
            }

            UIControl.SetStatus(Head_Bar, tab_Main.AttachedControl, opState);

            UIBinding <QMItem> .UIDataBinding(panelEx1, model);

            #endregion
        }
Пример #10
0
        private void RefreshUI()
        {
            #region 刷新UI
            if (opState == OpState.Browse || opState == OpState.Audit)
            {
                if (model.iState == 0)
                {
                    this.opState = OpState.Browse;
                }
                else if (model.iState == 1)
                {
                    this.opState = OpState.Audit;
                }
            }

            UIControl.SetStatus(this, this.opState);

            this.txtr_cTVCode.DataBindings.Clear();
            this.txtr_whIn.DataBindings.Clear();
            this.txtr_whOut.DataBindings.Clear();
            this.txtr_maker.DataBindings.Clear();
            this.txtr_modifier.DataBindings.Clear();
            this.dTVDate.DataBindings.Clear();
            this.txtr_cAuditPsn.DataBindings.Clear();
            this.txtr_dAuditDate.DataBindings.Clear();
            this.txtr_dModifyDate.DataBindings.Clear();


            this.txtr_cTVCode.DataBindings.Add("Text", model, "cTVCode", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_whOut.DataBindings.Add("Text", model, "cOWhName", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_whIn.DataBindings.Add("Text", model, "cIWhName", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_maker.DataBindings.Add("Text", model, "cMaker", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_modifier.DataBindings.Add("Text", model, "cModifier", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_dModifyDate.DataBindings.Add("Text", model, "dModifyDate", true, DataSourceUpdateMode.OnPropertyChanged);
            this.dTVDate.DataBindings.Add("Value", model, "dTVDate", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_cAuditPsn.DataBindings.Add("Text", model, "cAuditPsn", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_dAuditDate.DataBindings.Add("Text", model, "dAuditDate", true, DataSourceUpdateMode.OnPropertyChanged);


            gridControl1.DataSource = model.Details;
            #endregion
        }
Пример #11
0
        private void RefreshUI()
        {
            if (opState == OpState.Browse || opState == OpState.Audit)
            {
                if (model.iState == 0)
                {
                    this.opState = OpState.Browse;
                }
                else if (model.iState == 1)
                {
                    this.opState = OpState.Audit;
                }
            }

            UIControl.SetStatus(this, this.opState);

            this.txtw_QmCode.DataBindings.Clear();
            this.txtr_vendor.DataBindings.Clear();
            this.txtr_maker.DataBindings.Clear();
            this.txtr_modifier.DataBindings.Clear();
            this.dQmDate.DataBindings.Clear();
            this.txtr_warehouse.DataBindings.Clear();
            this.txtr_cAuditPsn.DataBindings.Clear();
            this.txtr_dAuditDate.DataBindings.Clear();
            this.txtr_dModifyDate.DataBindings.Clear();
            this.txtr_cSource.DataBindings.Clear();


            this.txtr_cSource.DataBindings.Add("Text", model, "cSource", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtw_QmCode.DataBindings.Add("Text", model, "cCode", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_warehouse.DataBindings.Add("Text", model, "cWhName", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_maker.DataBindings.Add("Text", model, "cMaker", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_vendor.DataBindings.Add("Text", model, "cVenName", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_modifier.DataBindings.Add("Text", model, "cModifier", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_dModifyDate.DataBindings.Add("Text", model, "dModifyDate", true, DataSourceUpdateMode.OnPropertyChanged);
            this.dQmDate.DataBindings.Add("Value", model, "dDate", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_cAuditPsn.DataBindings.Add("Text", model, "cAuditPsn", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_dAuditDate.DataBindings.Add("Text", model, "dAuditDate", true, DataSourceUpdateMode.OnPropertyChanged);


            gridControl1.DataSource = model.Details;
        }
Пример #12
0
        private void RefreshUI()
        {
            if (opState == OpState.Browse || opState == OpState.Audit)
            {
                if (string.IsNullOrEmpty(model.cAuditPsn))
                {
                    this.opState = OpState.Browse;
                }
                else
                {
                    this.opState = OpState.Audit;
                }
            }

            UIControl.SetStatus(this, this.opState);

            UIBinding <MaterialPlan> .UIDataBinding(pnlMain, model);

            gridControl1.DataSource = model.dtDetails;
        }
Пример #13
0
        private void RefreshUI()
        {
            //if (opState == OpState.Browse || opState == OpState.Audit)
            //{
            //    if (model.iState == 0)
            //    {
            //        this.opState = OpState.Browse;
            //    }
            //    else if (model.iState == 1)
            //    {
            //        this.opState = OpState.Audit;
            //    }
            //}

            UIControl.SetStatus(this, this.opState);

            Common.UIBinding <MergeCard> .UIDataBinding(pnlMain, model);

            gridControl1.DataSource = model.dtDetails;
        }
Пример #14
0
        private void RefreshUI()
        {
            if (opState == OpState.Browse || opState == OpState.Audit)
            {
                if (model.iState == 0)
                {
                    this.opState = OpState.Browse;
                }
                else if (model.iState == 1)
                {
                    this.opState = OpState.Audit;
                }
            }

            UIControl.SetStatus(this, this.opState);

            this.txtr_QmCode.DataBindings.Clear();
            this.txtr_vendor.DataBindings.Clear();
            this.txtr_maker.DataBindings.Clear();
            this.txtr_modifier.DataBindings.Clear();
            this.dQmDate.DataBindings.Clear();
            this.txtr_modifyDate.DataBindings.Clear();
            this.txtr_cAuditPsn.DataBindings.Clear();
            this.txtr_dAuditDate.DataBindings.Clear();
            this.txtw_cMemo.DataBindings.Clear();

            this.txtr_QmCode.DataBindings.Add("Text", model, "QMCode", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_maker.DataBindings.Add("Text", model, "cMaker", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_vendor.DataBindings.Add("Text", model.Vendor, "cVenName", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_vendor.DataBindings.Add("Tag", model.Vendor, "cVenCode", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_modifier.DataBindings.Add("Text", model, "cModifier", true, DataSourceUpdateMode.OnPropertyChanged);
            this.dQmDate.DataBindings.Add("Value", model, "dDate", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_modifyDate.DataBindings.Add("Text", model, "dModifyDate", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_cAuditPsn.DataBindings.Add("Text", model, "cAuditPsn", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtr_dAuditDate.DataBindings.Add("Text", model, "dAuditDate", true, DataSourceUpdateMode.OnPropertyChanged);
            this.txtw_cMemo.DataBindings.Add("Text", model, "cMemo", true, DataSourceUpdateMode.OnPropertyChanged);


            bindingList             = new BindingList <QmReports>(model.Details);
            gridControl1.DataSource = bindingList;
        }
Пример #15
0
        private void RefreshUI()
        {
            if (model != null)
            {
                UIBinding <MaintenancePlan> .UIDataBinding(pnlMain, model);

                gridControl1.DataSource = model.DtBody;
            }

            UIControl.SetStatus(this.collapsibleSplitContainer1.Panel2, this.opState);
            UIControl.SetStatus(this, this.opState);

            if (opState == OpState.Add || opState == OpState.Update)
            {
                gridControl2.Enabled = false;
            }
            else
            {
                gridControl2.Enabled = true;
            }
        }
Пример #16
0
        private void FormLoad(object sender, EventArgs e)
        {
            #region 加载主窗体事件

            if (opState == OpState.Add)
            {
                model = new QMItemClass()
                {
                    cMaker = Information.UserInfo.cUser_Name
                };
                lblModuleTitle.Text = "新增 - " + this.lblModuleTitle.Text;
            }
            else if (opState == OpState.Update)
            {
                oldCode             = model.QMCCode;
                lblModuleTitle.Text = "编辑 - " + this.lblModuleTitle.Text;
            }

            UIControl.SetStatus(Head_Bar, tab_Main.AttachedControl, opState);

            UIBinding <QMItemClass> .UIDataBinding(panelEx1, model);

            #endregion
        }
Пример #17
0
 //编辑
 private void Edit(object sender, EventArgs e)
 {
     this.opState = OpState.Update;
     UIControl.SetStatus(this, opState);
 }
Пример #18
0
 private void btn_Edit_Click(object sender, EventArgs e)
 {
     this.opState = OpState.Update;
     UIControl.SetStatus(Head_Bar, tab_Main.AttachedControl, opState);
 }