Esempio n. 1
0
        private void SetShopIDComboBox()
        {
            ComboHelper.AddDataToComboBox(this.ShopIDComboBox, _result, EqpGanttChartData.EQP_TABLE_NAME
                                          , EqpGanttChartData.Eqp.Schema.SHOP_ID, false);

            this.ShopIDComboBox.SelectedIndex = 0;
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        private void SetControl()
        {
            this.fromShiftComboBox.Value = Globals.GetResultPlanPeriod(_result) * ShopCalendar.ShiftCount;
            this.PlanStartTime           = _result.StartTime;

            this.dateEdit1.DateTime = PlanStartTime;
            this.dateEdit1.Properties.VistaDisplayMode = DevExpress.Utils.DefaultBoolean.True;
            this.dateEdit1.Properties.VistaEditTime    = DevExpress.Utils.DefaultBoolean.True;

            this.ShopIDComboBox.SelectedIndex = 0;



            ComboHelper.AddDataToComboBox(this.ShopIDComboBox, _result, EqpGanttChartData.STD_STEP_TABLE_NAME,
                                          EqpGanttChartData.Eqp.Schema.SHOP_ID, false);

            BindChkListEqpGroup(EqpGroupsCheckedBox.Properties.Items, this.TargetShopID);

            if (this.EqpGroupsCheckedBox.Properties.Items.Count > 0)
            {
                foreach (CheckedListBoxItem item in EqpGroupsCheckedBox.Properties.Items)
                {
                    item.CheckState = CheckState.Checked;
                }
            }
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        private void SetControl()
        {
            this.fromDateEdit.DateTime = _planStartTime;

            this.fromDateEdit.Properties.EditMask         = "yyyy-MM-dd HH:mm:ss";
            this.fromDateEdit.Properties.VistaDisplayMode = DevExpress.Utils.DefaultBoolean.True;
            this.fromDateEdit.Properties.VistaEditTime    = DevExpress.Utils.DefaultBoolean.True;

            dayShiftSpinEdit.Value = _result.GetPlanPeriod(1);

            // ShopID ComboBox
            ComboHelper.AddDataToComboBox(this.shopIdComboBoxEdit, _result,
                                          SimInputData.InputName.StdStep, SimInputData.StdStepSchema.SHOP_ID, false);

            if (this.shopIdComboBoxEdit.Properties.Items.Count > 0)
            {
                this.shopIdComboBoxEdit.SelectedIndex = 0;
            }

            // EqpGroup CheckComboBox
            SetControl_EqpGroup(this.TargetShopID);
        }
Esempio n. 8
0
        private void SetControls()
        {
            expandablePanel1.Text = EuData.TITLE;
            //label2.Text = EuData.QUERY_RANGE;

            dockPanel1.Text = EuData.CHART_TITLE;

            // ShopID ComboBox
            ComboHelper.AddDataToComboBox(this.shopIdComboBoxEdit, _result,
                                          SimInputData.InputName.Eqp, SimInputData.EqpSchema.SHOP_ID, false);


            SetAreaControl();

            this.fromDateEdit.Properties.VistaDisplayMode = DevExpress.Utils.DefaultBoolean.True;
            this.fromDateEdit.Properties.VistaEditTime    = DevExpress.Utils.DefaultBoolean.True;
            this.toDateEdit.Properties.VistaDisplayMode   = DevExpress.Utils.DefaultBoolean.True;
            this.toDateEdit.Properties.VistaEditTime      = DevExpress.Utils.DefaultBoolean.True;

            this.fromDateEdit.DateTime = _result.StartTime;                                                            //.Date; new DateTime(PlanStartTime.Year, PlanStartTime.Month, 1);
            this.toDateEdit.DateTime   = this.fromDateEdit.DateTime.AddDays(Globals.GetResultPlanPeriod(_result) - 1); //  this.fromDateEdit.DateTime.AddMonths(1).AddSeconds(-1);
        }
Esempio n. 9
0
        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);
        }