Exemplo n.º 1
0
        public void BindLueData()
        {
            DataSet dsBind = _spcEntity.GetSpcControlPlan();

            //车间
            dtWeaks = InsertBlankRow(dsBind.Tables[FMM_LOCATION_FIELDS.DATABASE_TABLE_NAME]);
            this.lueWeaks.Properties.DataSource    = dtWeaks;
            this.lueWeaks.Properties.DisplayMember = FMM_LOCATION_FIELDS.FIELD_LOCATION_NAME;
            this.lueWeaks.Properties.ValueMember   = FMM_LOCATION_FIELDS.FIELD_LOCATION_KEY;

            lueWeaks.Properties.BestFit();
            //工序
            dtSteps = InsertBlankRow(dsBind.Tables[POR_ROUTE_OPERATION_VER_FIELDS.DATABASE_TABLE_NAME]);
            this.lueSteps.Properties.DataSource    = dtSteps;
            this.lueSteps.Properties.DisplayMember = POR_ROUTE_OPERATION_VER_FIELDS.FIELD_ROUTE_OPERATION_NAME;
            this.lueSteps.Properties.ValueMember   = POR_ROUTE_OPERATION_VER_FIELDS.FIELD_ROUTE_OPERATION_VER_KEY;
            lueSteps.Properties.BestFit();
            if (dsBind.Tables[POR_ROUTE_OPERATION_VER_FIELDS.DATABASE_TABLE_NAME].Rows.Count > 0)
            {
                lueSteps.ItemIndex = -1;
            }
            //参数
            dtParams = InsertBlankRow(dsBind.Tables[BASE_PARAMETER_FIELDS.DATABASE_TABLE_NAME]);
            this.lueParames.Properties.DataSource    = dtParams;
            this.lueParames.Properties.DisplayMember = BASE_PARAMETER_FIELDS.FIELD_PARAM_NAME;
            this.lueParames.Properties.ValueMember   = BASE_PARAMETER_FIELDS.FIELD_PARAM_KEY;
            lueParames.Properties.BestFit();
            if (dsBind.Tables[BASE_PARAMETER_FIELDS.DATABASE_TABLE_NAME].Rows.Count > 0)
            {
                lueParames.ItemIndex = -1;
            }
            //成品类型
            dtProductCode = InsertBlankRow(dsBind.Tables["PARTYPE"]);
            this.luePRODUCTCODE.Properties.DataSource    = dtProductCode;
            this.luePRODUCTCODE.Properties.DisplayMember = "TYPENAME";
            this.luePRODUCTCODE.Properties.ValueMember   = "TYPECODE";
            luePRODUCTCODE.Properties.BestFit();
            if (dsBind.Tables["PARTYPE"].Rows.Count > 0)
            {
                luePRODUCTCODE.ItemIndex = -1;
            }

            //控制图类型
            DataTable dtChart = ChartType.GetChartType();

            this.lueCONTROLTYPE.Properties.DataSource    = dtChart;
            this.lueCONTROLTYPE.Properties.DisplayMember = "TYPECODE";
            this.lueCONTROLTYPE.Properties.ValueMember   = "TYPECODE";
            lueCONTROLTYPE.ItemIndex = -1;
        }