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; }
public void BindLueData() { DataSet dsControlPlan = spcEntity.GetSPControlGridData(); dtControlPlan = dsControlPlan.Tables[SPC_CONTROL_PLAN_FIELD.DATABASE_TABLE_NAME]; lueControlCode.Properties.DisplayMember = SPC_CONTROL_PLAN_FIELD.FIELD_CONTROLCODE; lueControlCode.Properties.ValueMember = SPC_CONTROL_PLAN_FIELD.FIELD_CONTROLPLANID; lueControlCode.Properties.DataSource = dtControlPlan; DataSet dsBind = spcEntity.GetSpcControlPlan(); //车间 DataTable dtWeaks = dsBind.Tables[FMM_LOCATION_FIELDS.DATABASE_TABLE_NAME]; AddBlankRowToDataTable(dtWeaks); 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; if (dsBind.Tables[FMM_LOCATION_FIELDS.DATABASE_TABLE_NAME].Rows.Count > 0) { lueWeaks.ItemIndex = -1; } //工序 DataTable dtSteps = dsBind.Tables[POR_ROUTE_OPERATION_VER_FIELDS.DATABASE_TABLE_NAME]; AddBlankRowToDataTable(dtSteps); 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; if (dsBind.Tables[POR_ROUTE_OPERATION_VER_FIELDS.DATABASE_TABLE_NAME].Rows.Count > 0) { lueSteps.ItemIndex = -1; } //设备 dtEquipment = dsBind.Tables[EMS_EQUIPMENTS_FIELDS.DATABASE_TABLE_NAME]; cklRules.Enabled = false; //工艺路线 dtRoute = route.GetActivedRouteData().Tables[0]; dtRoute.TableName = POR_ROUTE_ROUTE_VER_FIELDS.DATABASE_TABLE_NAME; }