Exemplo n.º 1
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
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 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);

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

            gridControl1.DataSource = model.dtDetails;
        }
Exemplo n.º 5
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;
        }
Exemplo n.º 6
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;
            }
        }
Exemplo n.º 7
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
        }
Exemplo n.º 8
0
 //编辑
 private void Edit(object sender, EventArgs e)
 {
     this.opState = OpState.Update;
     UIControl.SetStatus(this, opState);
 }
Exemplo n.º 9
0
 private void btn_Edit_Click(object sender, EventArgs e)
 {
     this.opState = OpState.Update;
     UIControl.SetStatus(Head_Bar, tab_Main.AttachedControl, opState);
 }
Exemplo n.º 10
0
 //编辑
 private void Edit(object sender, EventArgs e)
 {
     this.opState = OpState.Update;
     UIControl.SetStatus(this, this.opState);
     //UIControl.SetStatus(bar1, bar2, pnlMain, gridView1, OpState.Update);
 }