private void InitializeControl() { var modelContext = this._result.GetCtx <ModelDataContext>(); // ShopID ComboBox ComboHelper.AddDataToComboBox(this.shopIdComboBoxEdit, _result, SimInputData.InputName.StdStep, SimInputData.StdStepSchema.SHOP_ID, false); if (this.shopIdComboBoxEdit.Properties.Items.Contains("ARRAY")) { this.shopIdComboBoxEdit.SelectedIndex = this.shopIdComboBoxEdit.Properties.Items.IndexOf("ARRAY"); } //DateEdit Controls this.fromDateEdit.DateTime = ShopCalendar.SplitDate(_planStartTime); ComboHelper.ShiftName(this.shiftComboBoxEdit, _planStartTime); //// Set ProdInTatDic //_prodIdsInTatDic = new Dictionary<string, List<string>>(); //var dtTat = modelContext.Tat.Where(x => x.PRODUCT_TYPE == "Production") // .Select(x => new { SHOP_ID = x.SHOP_ID, PROD_ID = x.PRODUCT_ID }).Distinct(); //foreach (var row in dtTat) //{ // List<string> prodInTatList; // if (_prodIdsInTatDic.TryGetValue(row.SHOP_ID, out prodInTatList) == false) // _prodIdsInTatDic.Add(row.SHOP_ID, prodInTatList = new List<string>()); // prodInTatList.Add(row.PROD_ID); //} // ProductIDs SetProdIdCheckBox(); }
private void InitializeControl() { _isEndLoadDocument = false; //DateEdit Controls this.fromDateEdit.DateTime = ShopCalendar.SplitDate(_planStartTime); ComboHelper.ShiftName(this.shiftComboBoxEdit, _planStartTime); this.daySpinEdit.Value = _result.GetPlanPeriod(); // ShopID ComboBox ComboHelper.AddDataToComboBox(this.shopIdComboBoxEdit, _result, SimInputData.InputName.StdStep, SimInputData.StdStepSchema.SHOP_ID, false); // ProductIDs SetProdIdCheckBox(); // Step TAT Unit this.stepTatUnitComboBox.Properties.Items.Add("Sec"); this.stepTatUnitComboBox.Properties.Items.Add("Min"); this.stepTatUnitComboBox.Properties.Items.Add("Hour"); this.stepTatUnitComboBox.Properties.Items.Add("Day"); this.stepTatUnitComboBox.SelectedIndex = 1; // Total TAT Unit this.totalTatUnitComboBox.Properties.Items.Add("Sec"); this.totalTatUnitComboBox.Properties.Items.Add("Min"); this.totalTatUnitComboBox.Properties.Items.Add("Hour"); this.totalTatUnitComboBox.Properties.Items.Add("Day"); this.totalTatUnitComboBox.SelectedIndex = 3; }
private void InitializeControl() { var modelContext = this._result.GetCtx <ModelDataContext>(); // ShopID ComboBox ComboHelper.AddDataToComboBox(this.shopIdComboBoxEdit, _result, SimInputData.InputName.StdStep, SimInputData.StdStepSchema.SHOP_ID, false); if (this.shopIdComboBoxEdit.Properties.Items.Contains("ARRAY")) { this.shopIdComboBoxEdit.SelectedIndex = this.shopIdComboBoxEdit.Properties.Items.IndexOf("ARRAY"); } // ProductID CheckComboBox this.prodIdCheckedComboBoxEdit.Properties.Items.Clear(); var prodIDs = (from a in modelContext.Product select new { PRODUCT_ID = a.PRODUCT_ID }) .Distinct().OrderBy(x => x.PRODUCT_ID); foreach (var item in prodIDs) { this.prodIdCheckedComboBoxEdit.Properties.Items.Add(item.PRODUCT_ID.ToString()); } this.prodIdCheckedComboBoxEdit.CheckAll(); //DateEdit Controls this.fromDateEdit.DateTime = ShopCalendar.SplitDate(_planStartTime); ComboHelper.ShiftName(this.shiftComboBoxEdit, _planStartTime); }
private void InitializeControl() { //// ShopID ComboBox //ComboHelper.AddDataToComboBox(this.shopIdComboBoxEdit, _result, // SimInputData.InputName.StdStep, SimInputData.StdStepSchema.SHOP_ID, false); //if (this.shopIdComboBoxEdit.Properties.Items.Contains("ARRAY")) // this.shopIdComboBoxEdit.SelectedIndex = this.shopIdComboBoxEdit.Properties.Items.IndexOf("ARRAY"); //DateEdit Controls this.fromDateEdit.DateTime = ShopCalendar.SplitDate(_planStartTime.AddDays(-2)); ComboHelper.ShiftName(this.shiftComboBoxEdit, _planStartTime); }
protected void InitControl() { layoutControlItem8.Text = LotGanttChartData.LOT_ID; fromShiftComboBox.Value = Globals.GetResultPlanPeriod(_result) * ShopCalendar.ShiftCount;//ShopCalendar.ShiftCount * 7; _planStartTime = _result.StartTime; dateEdit1.DateTime = ShopCalendar.SplitDate(_planStartTime); ComboHelper.AddDataToComboBox(shopIDcomboBox, _result, LotGanttChartData.LOT_TABLE_NAME, LotGanttChartData.Lot.Schema.SHOP_ID, false); if (this.shopIDcomboBox.Properties.Items.Contains("ARRAY")) { this.shopIDcomboBox.SelectedIndex = this.shopIDcomboBox.Properties.Items.IndexOf("ARRAY"); } else { this.shopIDcomboBox.SelectedIndex = 0; } var cellWidth = Extensions.GetLocalSetting(this.ServiceProvider, _pageID + "ganttCellWidth"); var cellHeight = Extensions.GetLocalSetting(this.ServiceProvider, _pageID + "ganttCellHeight"); cellWidth = cellWidth == null?this.CellWidthSize.ToString() : cellWidth; cellHeight = cellHeight == null?this.CellHeightSize.ToString() : cellHeight; if (!string.IsNullOrEmpty(cellWidth)) { this.ganttSizeControl1.CellWidth = Convert.ToInt32(cellWidth); } if (!string.IsNullOrEmpty(cellHeight)) { this.ganttSizeControl1.CellHeight = Convert.ToInt32(cellHeight); } ComboHelper.ShiftName(shiftNameComboBox, _planStartTime); //lindIDcomboBox.SelectedIndexChanged += new EventHandler(cbeLine_SelectedIndexChanged); }
private void InitializeControl() { var modelContext = this._result.GetCtx <ModelDataContext>(); // ShopID ComboBox ComboHelper.AddDataToComboBox(this.shopIdComboBoxEdit, _result, SimInputData.InputName.StdStep, SimInputData.StdStepSchema.SHOP_ID, false); if (this.shopIdComboBoxEdit.Properties.Items.Contains("ARRAY")) { this.shopIdComboBoxEdit.SelectedIndex = this.shopIdComboBoxEdit.Properties.Items.IndexOf("ARRAY"); } // Area CheckComboBox _eqpGrpsInAreaDic = new Dictionary <string, List <string> >(); string filter = string.Format("{0} = '{1}'", SimInputData.ConstSchema.CATEGORY, "AREA_INFO"); DataTable dtConst = _result.LoadInput(SimInputData.InputName.Const, filter); if (dtConst != null) { List <string> eqpGrpsAllInAreaList = new List <string>(); foreach (DataRow drow in dtConst.Rows) { SimInputData.Const configConst = new SimInputData.Const(drow); if (this.areaChkBoxEdit.Properties.Items.Contains(configConst.Code) == false) { this.areaChkBoxEdit.Properties.Items.Add(configConst.Code); } string[] eqpGrps = configConst.Description.Split('@'); foreach (string eqpGrp in eqpGrps) { if (eqpGrpsAllInAreaList.Contains(eqpGrp) == false) { eqpGrpsAllInAreaList.Add(eqpGrp); } List <string> eqpGrpList; if (_eqpGrpsInAreaDic.TryGetValue(configConst.Code, out eqpGrpList) == false) { _eqpGrpsInAreaDic.Add(configConst.Code, eqpGrpList = new List <string>()); } if (eqpGrpList.Contains(eqpGrp) == false) { eqpGrpList.Add(eqpGrp); } } } if (this.areaChkBoxEdit.Properties.Items.Contains("OTHERS") == false) { this.areaChkBoxEdit.Properties.Items.Add("OTHERS"); } var eqpGrpInEqpList = modelContext.Eqp.Select(x => x.DSP_EQP_GROUP_ID).Distinct(); foreach (var eqpGrp in eqpGrpInEqpList) { if (eqpGrpsAllInAreaList.Contains(eqpGrp) == false) { List <string> eqpGrpList; if (_eqpGrpsInAreaDic.TryGetValue("OTHERS", out eqpGrpList) == false) { _eqpGrpsInAreaDic.Add("OTHERS", eqpGrpList = new List <string>()); } if (eqpGrpList.Contains(eqpGrp) == false) { eqpGrpList.Add(eqpGrp); } } } } if (this.areaChkBoxEdit.Properties.Items.Count > 0) { this.areaChkBoxEdit.CheckAll(); } _eqpGrpInEqpDic = new Dictionary <string, string>(); _eqpListbyEqpGrpDic = new Dictionary <string, List <string> >(); foreach (var row in modelContext.Eqp) { if (_eqpGrpInEqpDic.ContainsKey(row.SHOP_ID + row.EQP_ID) == false) { _eqpGrpInEqpDic.Add(row.SHOP_ID + row.EQP_ID, row.DSP_EQP_GROUP_ID); } List <string> eqpList; if (_eqpListbyEqpGrpDic.TryGetValue(row.SHOP_ID + row.DSP_EQP_GROUP_ID, out eqpList) == false) { _eqpListbyEqpGrpDic.Add(row.SHOP_ID + row.DSP_EQP_GROUP_ID, eqpList = new List <string>()); } if (eqpList.Contains(row.EQP_ID) == false) { eqpList.Add(row.EQP_ID); } } // EqpGroup CheckComboBox SetEqpGroupCheckBox(); //DateEdit Controls this.fromDateEdit.DateTime = ShopCalendar.SplitDate(_planStartTime); ComboHelper.ShiftName(this.shiftComboBoxEdit, _planStartTime); dayShiftSpinEdit.Value = 1; // _result.GetPlanPeriod(1); }
private void InitializeControl() { var modelContext = this._result.GetCtx <ModelDataContext>(); // ShopID ComboBox this.shopIdComboBoxEdit.Properties.Items.Add("ARRAY"); //this.shopIdComboBoxEdit.Properties.Items.Add("CF"); //this.shopIdComboBoxEdit.Properties.Items.Add("CELL"); if (this.shopIdComboBoxEdit.Properties.Items.Contains("ARRAY")) { this.shopIdComboBoxEdit.SelectedIndex = this.shopIdComboBoxEdit.Properties.Items.IndexOf("ARRAY"); } // ProductID CheckComboBox this.prodIdCheckedComboBoxEdit.Properties.Items.Clear(); var prodIDs = (from a in modelContext.Product select new { PRODUCT_ID = a.PRODUCT_ID }) .Distinct().OrderBy(x => x.PRODUCT_ID); foreach (var item in prodIDs) { this.prodIdCheckedComboBoxEdit.Properties.Items.Add(item.PRODUCT_ID.ToString()); } this.prodIdCheckedComboBoxEdit.CheckAll(); //DateEdit Controls this.fromDateEdit.DateTime = ShopCalendar.SplitDate(_planStartTime); ComboHelper.ShiftName(this.shiftComboBoxEdit, _planStartTime); // InOut Check Control this.inOutChkBoxEdit.Properties.Items.Add("IN"); this.inOutChkBoxEdit.Properties.Items.Add("OUT"); this.inOutChkBoxEdit.CheckAll(); // InOut StepID Info Contols this.arrayInTxtEdit.EditValue = "1200"; var arrayInStepInfo = modelContext.StdStep.Where(x => x.SHOP_ID == "ARRAY" && x.STEP_SEQ > 0 && x.STEP_DESC.Trim() == "Dense Unpacker + DCLN").FirstOrDefault(); if (arrayInStepInfo != null) { this.arrayInTxtEdit.EditValue = arrayInStepInfo.STEP_ID; } this.arrayOutTxtEdit.EditValue = "9900"; var arrayOutStepInfo = modelContext.StdStep.Where(x => x.SHOP_ID == "ARRAY" && x.STEP_DESC == "Shipping").LastOrDefault(); if (arrayOutStepInfo != null) { this.arrayOutTxtEdit.EditValue = arrayOutStepInfo.STEP_ID; } //this.cfInTxtEdit.EditValue = "F100-00"; //var cfInStepInfo = modelContext.StdStep.Where(x => x.SHOP_ID == "CF" && x.STEP_DESC == "Unpacker").FirstOrDefault(); //if (cfInStepInfo != null) // this.cfInTxtEdit.EditValue = cfInStepInfo.STEP_ID; //this.cfOutTxtEdit.EditValue = "F110-00"; //var cfOutStepInfo = modelContext.StdStep.Where(x => x.SHOP_ID == "CF" && x.STEP_DESC == "Shipping").LastOrDefault(); //if (cfOutStepInfo != null) // this.cfOutTxtEdit.EditValue = cfOutStepInfo.STEP_ID; }