示例#1
0
        public void InitializeCondition()
        {
            if (chart_parent_mode == CHART_PARENT_MODE.PPK_REPORT)
            {
                if (ChartVariable.dtParamData == null || ChartVariable.dtParamData.Rows.Count == 0)
                {
                    MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage("INFORMATION_NODATA"));
                    return;
                }
            }
            else
            {
                if (ChartVariable.dtResource == null || ChartVariable.dtResource.Rows.Count == 0)
                {
                    MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage("INFORMATION_NODATA"));
                    return;
                }

                CreateParamDataTable();
            }



            ChartVariable.lstDefaultChart.Clear();
            ChartVariable.lstDefaultChart = CommonPageUtil.DefaultChartSplit(ChartVariable.DEFAULT_CHART);

            Common.SPCChart spcControlChart = new BISTel.eSPC.Page.Common.SPCChart();
            spcControlChart.Dock          = System.Windows.Forms.DockStyle.Fill;
            spcControlChart.URL           = this.URL;
            spcControlChart.ChartVariable = ChartVariable;
            spcControlChart.sessionData   = this.SessionData;
            spcControlChart.Height        = this.pnlChart.Height;
            spcControlChart.InitializePage();
            this.pnlChart.Controls.Add(spcControlChart);
        }
示例#2
0
        public override void PageSearch(LinkedList llCondition)
        {
            InitializePage();

            DataTable dtSPCModelList = this.GetSPCModelList(llCondition);



            if (dtSPCModelList == null)
            {
                this.MsgClose();
                this.InitializePage();
                return;
            }
            EESProgressBar.ShowProgress(this, MSGHandler.GetMessage("PROCESS_LOADING_PAGE_DATA"), false);

            if (dtSPCModelList.Rows.Count > 0)
            {
                AddHeader(dtSPCModelList);

                this.bsprData.DataSet = dtSPCModelList;

                this.bsprData.ActiveSheet.Columns[0].Locked = false;
            }
            EESProgressBar.CloseProgress(this);
        }
示例#3
0
        private void bbtnList_ButtonClick(string name)
        {
            try
            {
                if (name.ToUpper() == Definition.ButtonKey.VIEW_CHART)
                {
                    this.ClickButtonChartView();
                }
                else if (name.ToUpper() == Definition.ButtonKey.EXPORT)
                {
                    this.ClickExportButton();
                }
                else if (name.ToUpper() == Definition.ButtonKey.SORT)
                {
                    if (this.bsprData.ActiveSheet.Rows.Count == 0)
                    {
                        MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage("INFORMATION_NODATA"));
                        return;
                    }


                    this.bsprData.ShowSortForm();
                }
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
        }
示例#4
0
        ///////////////////////////////////////////////////////////////////////////////////
        public virtual bool DrawSPCChart()
        {
            try
            {
                if (this.DataManager.RawDataTable.Rows.Count < 1)
                {
                    MSGHandler.DisplayMessage(MSGType.Warning, MultiLanguageHandler.getInstance().GetMessage("VMS_INFO_065"));
                    return(false);
                }

                ClearChart();
                InitChart();
                MakeDataSourceToDrawSPCChart();
                DrawChartWithSeriesInfo();
                ChangeSeriesStyle();
                MakeTipInfo();


                return(true);
            }
            catch
            {
                MsgClose();

                this.SPCChart.ClearChart();
                MSGHandler.DisplayMessage(MSGType.Error, "There is an empty or non-numeric value.");
                return(false);
            }
        }
示例#5
0
        private void Click_CHANGE_X_AXIS_Button()
        {
            ChangeXAxisPopup2 pop = new ChangeXAxisPopup2();

            pop.BaseAnalysisChart = this;
            pop.SPC_CHART_TYPE    = SPC_CHART_TYPE.ANALYSISCHART;
            pop.ShowDialog();
            DialogResult dResult = pop.ButtonResult;

            if (dResult.ToString().Equals("OK"))
            {
                string sColumn = pop.getXAxisColumn();
                if (sColumn == null)
                {
                    MSGHandler.DisplayMessage(MSGType.Warning, "SPC_INFO_SELECT_TYPE", null, null);
                    return;
                }

                if (sColumn.Equals("TIME"))
                {
                    //this.AnalysisChart.AxisDateTimeFormat = this.AxisDateTimeFormat;
                    this.AnalysisChart.ChangeXLabelColumnDefault(Definition.CHART_COLUMN.TIME2);
                }
                else if (sColumn.Equals("LOT_ID"))
                {
                    this.AnalysisChart.ChangeXLabelColumnDefault(Definition.CHART_COLUMN.LOT_ID);
                }
            }
            else
            {
                return;
            }
        }
        public void VersionHistoryClicked()
        {
            if (!(this.bSpread != null && this.bSpread.ActiveSheet.RowCount > 0))
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SEARCH_SPC_MODEL_LIST", null, null);
                return;
            }

            //int selectColumnIndex = GetColumnIndex("SELECT");
            //if(selectColumnIndex == -1)
            //    throw new Exception("There is no 'select' column.");

            ArrayList selectedList = bSpread.GetCheckedList(0);

            if (selectedList.Count != 1)
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_ONE_MODEL", null, null);
                return;
            }

            string modelID = this.bSpread.GetCellText((int)selectedList[0], GetColumnIndex(COLUMN.CHART_ID));

            if (VersionHistoryButtonClicked != null)
            {
                var args = new VersionHistoryButtonClickedEventArgs {
                    ModelID = modelID
                };
                VersionHistoryButtonClicked(this, args);
            }
        }
示例#7
0
        void bChkProduct_CheckCombo_Select_Legend(object sender, System.EventArgs e)
        {
            try
            {
                BCheckCombo bchkCbo = sender as BCheckCombo;
                if (bchkCbo == null)
                {
                    return;
                }

                if (bchkCbo.chkBox.SelectedItem != null)
                {
                    DataTable dt = (DataTable)bchkCbo.DataSource;
                    _comUtil.SetBCheckCombo(this.arrProductID, dt, bchkCbo);
                }
            }
            catch (System.Web.Services.Protocols.SoapException sex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, sex.Message);
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
        }
示例#8
0
        void bChkProduct_CheckCombo_Select(object sender, System.EventArgs e)
        {
            try
            {
                iSearch = 0;
                this.llstRemove(Definition.DynamicCondition_Search_key.SPC_MODEL_CONFIG_RAWID);
                this.llstRemove(Definition.DynamicCondition_Search_key.DATETIME_PERIOD);
                this.llstRemove(Definition.DynamicCondition_Search_key.DATETIME_FROM);
                this.llstRemove(Definition.DynamicCondition_Search_key.DATETIME_TO);
                this.llstRemove(Definition.DynamicCondition_Search_key.RESTRICT_SAMPLE_COUNT);
                this.llstRemove(Definition.DynamicCondition_Search_key.RESTRICT_SAMPLE_DAYS);
                this.llstRemove(Definition.DynamicCondition_Search_key.SEARCH_COUNT);

                BCheckCombo bchkCbo = sender as BCheckCombo;
                if (bchkCbo == null)
                {
                    return;
                }

                if (bchkCbo.SelectedValue != this.sProductID)
                {
                    this.sProductID = _comUtil.GetSelectedString(bchkCbo);
                }
                GetModelConfigRawID();
            }
            catch (System.Web.Services.Protocols.SoapException sex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, sex.Message);
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
        }
示例#9
0
        private void btnUnSelect_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.lstSKeySelected.SelectedItems == null || this.lstSKeySelected.SelectedItems.Count == 0)
                {
                    MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("DCP_NO_SELECT"));
                    return;
                }

                for (int i = 0; i < this.lstSKeySelected.SelectedItems.Count; i++)
                {
                    if (!this.lstSKeyUnSelected.Items.Contains(this.lstSKeySelected.SelectedItems[i].ToString()))
                    {
                        this.lstSKeyUnSelected.Items.Add(this.lstSKeySelected.SelectedItems[i].ToString());
                    }
                }

                for (int i = this.lstSKeySelected.SelectedItems.Count - 1; i >= 0; i--)
                {
                    this.lstSKeySelected.Items.Remove(this.lstSKeySelected.SelectedItems[i].ToString());
                }
            }
            catch
            {
            }
            finally
            {
            }
        }
示例#10
0
        public override void PageSearch(LinkedList llCondition)
        {
            InitializePage();

            if (!this.ApplyAuthory(llCondition))
            {
                MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("GENERAL_NOT_ENOUGHT_SUFFICIENT"), null, null, true);
                return;
            }

            if (llCondition[Definition.DynamicCondition_Search_key.PARAM_ALIAS] != null)
            {
                string value =
                    ((DataTable)llCondition[Definition.DynamicCondition_Search_key.PARAM_ALIAS]).Rows[0][Definition.CONDITION_SEARCH_KEY_VALUEDATA].ToString();
                this.btxtParamName.ReadOnly = false;
                this.btxtParamName.Text     = value;
                this.btxtParamName.ReadOnly = true;
            }

            //this.MsgShow(COMMON_MSG.Query_Data);

            this.ucSPCModelList.PageSearch(llCondition);

            this.ucSpcModelCompareResultUC.PageSearch(llCondition);

            //this.MsgClose();
        }
示例#11
0
        private void bcboOperation_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                this.llstRemove(Definition.DynamicCondition_Search_key.OPERATION);
                this.llstRemove(Definition.DynamicCondition_Search_key.PARAM);
                this.llstRemove(Definition.DynamicCondition_Search_key.PRODUCT);
                this.llstRemove(Definition.DynamicCondition_Search_key.EQP_ID);

                BComboBox bcbo = sender as BComboBox;
                if (bcbo.SelectedIndex > -1)
                {
                    this.sOperationID = this._llstOperation.GetValue(bcbo.SelectedIndex).ToString();
                }

                this.bcboParameter.Items.Clear();
                this.bChkProduct.Items.Clear();
                this.bchkEqpID.Items.Clear();
                PROC_BindParameter();
            }
            catch (System.Web.Services.Protocols.SoapException sex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, sex.Message);
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
        }
示例#12
0
        void bbtnOK_Click(object sender, EventArgs e)
        {
            //SPC-1297, KBLEE, START
            if (ValidateChange())
            {
                LinkedList llCheckItems = new LinkedList();
                this.SetOldCopyInfo(this.pnlContextLineFirst, llCheckItems, this._contextCount, this.chkAllContext);  //SPC-1349
                this.SetOldCopyInfo(this.pnlContextLineSecond, llCheckItems, this._contextCount, this.chkAllContext); //SPC-1349
                this.SetOldCopyInfo(this.pnlContextLineThird, llCheckItems, this._contextCount, this.chkAllContext);  //SPC-1349
                this.SetOldCopyInfo(this.btpnlRule, llCheckItems, this._ruleCount, this.chkAllRule);
                this.SetOldCopyInfo(this.btpnlOption, llCheckItems, this._optionCount, this.chkAllOption);
                this.SetOldCopyInfo(this.btpnlAutoCalculation, llCheckItems, this._autoCalcCount, this.chkAllAutoCalculation);
                this.SetOldCopyInfo(this.gbxAutoCalcItem, llCheckItems, this._autoCalcCount, this.chkAllAutoCalculation);

                this._oldSpcModelInfo = new SpcModelInfo_ForCopy(this._eqpModel, this._spcModelName, this._mainYN, this._configRawID, this._paramAlias, llCheckItems);

                _isClosedOK = true;
                _tempCount  = 0;

                this.Close();
            }
            else
            {
                MSGHandler.DisplayMessage(MSGType.Warning, "SPC_INFO_NO_CHANGED_ITEM", null, null);

                _isClosedOK = false;
                _tempCount  = 0;
            }
            //SPC-1297, KBLEE, END
        }
示例#13
0
        public override void PageSearch(BISTel.PeakPerformance.Client.CommonLibrary.LinkedList llCondition)
        {
            if (!llCondition.Contains(Definition.CONDITION_SEARCH_KEY_SPCMODEL))
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_OR_CREATE_MODEL", null, null);
                return;
            }
            InitializePage();

            if (!this.ApplyAuthory(llCondition))
            {
                MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("GENERAL_NOT_ENOUGHT_SUFFICIENT"), null, null, true);
                return;
            }

            this.spcModelUC1.PageSearch(llCondition);
            this.dataExportUC1.PageSearch(llCondition);
            this.exportResult1.PageSearch(llCondition);

            SPCModel[] spcModels = this.spcModelUC1.SpcModels;
            //SPC-1109 by stella
            if (spcModels != null)
            {
                this.dataExportUC1.SetSPCModels(spcModels);
            }
        }
示例#14
0
        private void CallDataTrxData()
        {
            DataSet _ds = null;

            try
            {
                LinkedList _llstSearchCondition = new LinkedList();
                _llstSearchCondition.Add(Definition.DynamicCondition_Condition_key.MODEL_CONFIG_RAWID, ChartVariable.MODEL_CONFIG_RAWID);
                _llstSearchCondition.Add(Definition.DynamicCondition_Condition_key.START_DTTS, this.bDtStart.Value.ToString("yyyy-MM-dd") + " 00:00:00");
                _llstSearchCondition.Add(Definition.DynamicCondition_Condition_key.END_DTTS, this.bDtEnd.Value.ToString("yyyy-MM-dd") + " 23:59:59");

                _ds = _wsSPC.GetDataTRXData(_llstSearchCondition.GetSerialData());
                if (_ds == null)
                {
                    MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage("INFORMATION_NODATA"));
                    return;
                }

                ChartVariable.dtResource = _ds.Tables[0];
                this.pnlChart.Controls.Clear();
                InitializeCondition();
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
            finally
            {
                _ds = null;
            }
        }
示例#15
0
        private void ClickSaveButton()
        {
            LinkedList _llstResult = this.checkCombo.llsResult;

            if (_llstResult.Count > 0)
            {
                _llstResultChart.Clear();
                foreach (DataRow dr in DataSetChart.Tables[0].Rows)
                {
                    string strCode = dr["CODE"].ToString();
                    string strDesc = dr["DESCRIPTION"].ToString();

                    for (int i = 0; i < _llstResult.Count; i++)
                    {
                        if (strCode.Equals(_llstResult.GetKey(i).ToString()))
                        {
                            _llstResultChart.Add(strCode, strDesc);
                        }
                    }
                }
                //MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage(Definition.MSG_KEY_SUCCESS_SAVE_CHANGE_DATA));
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                //선택된 Chart가 없습니다.
                MSGHandler.DisplayMessage(MSGType.Information, string.Format(MSGHandler.GetMessage("GENERAL_SELECT_OBJECT"), "Chart"));
            }
        }
示例#16
0
        ///////////////////////////////////////////////////////////////////////////////////
        //  User Defined Method.
        ///////////////////////////////////////////////////////////////////////////////////

        private void GetSearchCondition_Area()
        {
            _llstChartSearchCondition.Clear();
            _llstChartSearchCondition.Add(Definition.DynamicCondition_Condition_key.LINE, this._sessionData.Line);

            DataSet dsConditionData_Area = this._ws.GetArea(_llstChartSearchCondition.GetSerialData());

            DataTable dsCoData_Area = dsConditionData_Area.Tables[0];

            //SPC-797 Search By Area Duplicated Info Meassage
            if (dsCoData_Area != null)
            {
                List <string> lstAreas = new List <string>();
                foreach (DataRow dr in dsCoData_Area.Rows)
                {
                    string sArea = dr["AREA"].ToString();
                    if (lstAreas.Contains(sArea))
                    {
                        MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_DUPLICATE_AREA", null, null);
                        break;
                    }
                    lstAreas.Add(sArea);
                }
            }


            this.bcboArea.DataSource    = dsConditionData_Area.Tables[0];
            this.bcboArea.DisplayMember = "AREA";
            this.bcboArea.ValueMember   = "AREA_RAWID";
        }
示例#17
0
        public void SetParentValue(LinkedList llParentValue)
        {
            _btvCondition.Nodes.Clear();

            _llstParent = llParentValue;

            if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_AREA))
            {
                DataTable dtLine = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.LINE];
                _sLineRawid = DCUtil.GetValueData(dtLine);

                DataTable dtArea = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.AREA];
                _sAreaRawid = DCUtil.GetValueData(dtArea);


                if (dtArea.Rows.Count > 1)
                {
                    MSGHandler.DisplayMessage(MSGType.Information, string.Format(MSGHandler.GetMessage(Definition.MSG_KEY_ALLOW_SINGLE_ONE), _mlthandler.GetVariable(Definition.LABEL_KEY_AREA)));
                    return;
                }


                XSPCOperationTree spcOperationTree = new XSPCOperationTree(_btvCondition);
                spcOperationTree.LineRawid      = _sLineRawid;
                spcOperationTree.AreaRawid      = _sAreaRawid;
                spcOperationTree.IsShowCheck    = true;
                spcOperationTree.RecipeTypeCode = RecipeType.NONE;
                spcOperationTree.ParamTypeCode  = ParameterType.NONE;
                spcOperationTree.IsLastNode     = true;
                spcOperationTree.AddRootNode();
            }


            _btvCondition.CheckCountType = BTreeView.CheckCountTypes.Single;
        }
        internal void Compare(LinkedList llCondition)
        {
            _lastestCondition = llCondition;

            if (compareType == CompareType.Model)
            {
                string[] chartIDs = (string[])llCondition["CHART_ID"];

                if (chartIDs == null || chartIDs.Length < 1)
                {
                    MSGHandler.DisplayMessage(MSGType.Error, "SPC_INFO_NO_COMPARE_CHART_ID", null, null);
                    return;
                }
            }

            this.InitializeController();

            DataTable dtData = this._controller.GetComparedDataTable(llCondition);

            DisplayData(dtData);

            ApplyColor();

            ApplyDifferentValueColor();

            this.bsprData.Locked = true;
        }
示例#19
0
        void bchkEqpID_CheckCombo_Select(object sender, System.EventArgs e)
        {
            try
            {
                BCheckCombo bchkCbo = sender as BCheckCombo;
                if (bchkCbo == null)
                {
                    return;
                }

                if (bchkCbo.SelectedValue != this.sEQPID)
                {
                    this.sEQPID = _comUtil.GetSelectedString(this.bchkEqpID);
                    this.llstRemove(Definition.DynamicCondition_Search_key.PRODUCT);
                    PROC_BindProduct();
                }
            }
            catch (System.Web.Services.Protocols.SoapException sex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, sex.Message);
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
        }
        private void Copy()
        {
            int[] selectedColumns = GetSelectedColumns();
            if (selectedColumns.Length != 1)
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_ONE_SPC_MODEL", null, null);
                return;
            }

            Control con = this.Parent;

            while (con.Parent != null)
            {
                if (con is SPCModelCompareUC)
                {
                    break;
                }
                con = con.Parent;
            }

            if (((SPCModelCompareUC)con).copyPopup == null)
            {
                ((SPCModelCompareUC)con).copyPopup = new SPCCopySpec();
                ((SPCModelCompareUC)con).copyPopup.InitializeControl();
            }
            string chartId      = GetHeader(selectedColumns[0]);
            string mainYN       = GetMainYN(selectedColumns[0]);
            string spcModelName = GetSPCModelName(selectedColumns[0]);

            ((SPCModelCompareUC)con).copyPopup.SetCopyModelInfo(this._eqpModel, spcModelName, mainYN, chartId, this._paramAlias);
            ((SPCModelCompareUC)con).copyPopup.ShowDialog();
        }
示例#21
0
        void bChkProduct_CheckCombo_Select(object sender, System.EventArgs e)
        {
            try
            {
                BCheckCombo bchkCbo = sender as BCheckCombo;
                if (bchkCbo == null)
                {
                    return;
                }

                if (bchkCbo.SelectedValue != this.sProductID)
                {
                    this.sProductID = _comUtil.GetSelectedString(bchkCbo);
                    this.llstRemove(Definition.DynamicCondition_Search_key.PERIOD_PPK);
                    this.llstRemove(Definition.DynamicCondition_Search_key.SORTING_KEY);
                }
            }
            catch (System.Web.Services.Protocols.SoapException sex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, sex.Message);
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
        }
        private void Modify()
        {
            int[] selectedColumns = GetSelectedColumns();
            if (selectedColumns.Length == 0)
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_MODEL", null, null);
                return;
            }
            else if (selectedColumns.Length > 1)
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_ONE_SPC_MODEL", null, null);
                return;
            }

            string chartId = GetHeader(selectedColumns[0]);
            string mainYN  = GetMainYN(selectedColumns[0]);

            //SPC-1292, KBLEE, START
            LinkedList llGroupName = this._controller.GetGroupNameByChartID(chartId);

            if (llGroupName.Count > 0)
            {
                _groupName = llGroupName[BISTel.eSPC.Common.COLUMN.GROUP_NAME].ToString();
            }
            else
            {
                _groupName = Definition.VARIABLE_UNASSIGNED_MODEL;
            }
            //SPC-1292, KBLEE, END

            if (this._controller.Modify(this.sessionData, this.URL, port, _line, _area, _eqpModel, chartId, mainYN, _groupName) == DialogResult.OK)
            {
                RefreshData();
            }
        }
示例#23
0
        private void SetHistorySpreadData()
        {
            //RawID를 가지고 온다
            string sModelConfigRawID = this._sModelConfigRawID_Private;

            //LinkedList를 만든다
            LinkedList llstData = new LinkedList();

            llstData.Add(COLUMN.MODEL_CONFIG_RAWID, sModelConfigRawID);

            byte[] baData = llstData.GetSerialData();

            //웹서비스로 보내 DataSet을 받는다
            DataSet ds = this._ws.GetSPCModelHistoryInfo(baData);

            //스프레드 바인딩

            if (ds != null)
            {
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        this.bsprData_HistoryInfo.DataSet = ds;
                    }
                    else
                    {
                        MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_HISTORY_INFO_NOT_EXIST", null, null);
                        this._IsHistoryData_Pr = false;
                    }
                }
            }
        }
        private void ViewModel()
        {
            int[] selectedColumns = GetSelectedColumns();
            if (selectedColumns.Length == 0)
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_MODEL", null, null);
                return;
            }
            else if (selectedColumns.Length > 1)
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_ONE_SPC_MODEL", null, null);
                return;
            }

            string chartId = _lastestCondition["CHART_ID"].ToString();
            string version = GetHeader(selectedColumns[0]);

            if (version != null && version.Length > 0)
            {
                version = Convert.ToInt32(((Convert.ToDouble(version) - 1) * 100)).ToString();
            }
            string mainYN = GetMainYN(selectedColumns[0]);

            if (this._controller.ViewModel(this.sessionData, this.URL, port, _line, _area, _eqpModel, chartId, mainYN, version, _groupName) == DialogResult.OK)
            {
                if (modelModifiedEventHandler != null)
                {
                    modelModifiedEventHandler(this, null);
                }

                InitializePage();
            }
        }
示例#25
0
        private void Click_EXCEL_EXPORT_Button()
        {
            try
            {
                DataTable dt = this.dtDataSource.Copy();
                if (dt.Columns.Contains(Definition.CHART_COLUMN.TIME2))
                {
                    dt.Columns.Remove(Definition.CHART_COLUMN.TIME2);
                }

                this.bSpread1.ActiveSheet.RowCount    = 0;
                this.bSpread1.ActiveSheet.ColumnCount = 0;
                this.bSpread1.ClearHead();
                this.bSpread1.AddHeadComplete();
                this.bSpread1.UseSpreadEdit       = false;
                this.bSpread1.AutoGenerateColumns = true;
                this.bSpread1.DataSource          = dt;
                this.bSpread1_Sheet1.SheetName    = this.Name;
                this.bSpread1.Export(false);
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.ToString());
                EESUtil.DebugLog("BTeeChart", "ExportDataForExcel", ex);
            }
        }
示例#26
0
        private void ClickSaveButton()
        {
            LinkedList llstSave = new LinkedList();

            llstSave.Add(Definition.CONDITION_KEY_OOC_TRX_SPC_RAWID, _comUtil.NVL(llstSearchCondition[Definition.CONDITION_KEY_OOC_TRX_SPC_RAWID]));
            llstSave.Add(Definition.CONDITION_KEY_CONTEXT_LIST, _comUtil.NVL(llstSearchCondition[Definition.CONDITION_KEY_CONTEXT_LIST]));
            llstSave.Add(Definition.CONDITION_KEY_OOC_PROBLEM, this.btxtProblem.Text);
            llstSave.Add(Definition.CONDITION_KEY_OOC_CAUSE, this.btxtCause.Text);
            llstSave.Add(Definition.CONDITION_KEY_OOC_SOLUTION, this.btxtsolution.Text);
            llstSave.Add(Definition.CONDITION_KEY_USER_ID, this.SessionData.UserId);

            byte[] baData = llstSave.GetSerialData();

            bool bSuccess = this._wsSPC.SaveOCAP(baData);

            if (bSuccess)
            {
                llstSearchCondition.Remove(Definition.CONDITION_KEY_OOC_PROBLEM);
                llstSearchCondition.Remove(Definition.CONDITION_KEY_OOC_CAUSE);
                llstSearchCondition.Remove(Definition.CONDITION_KEY_OOC_SOLUTION);

                llstSearchCondition.Add(Definition.CONDITION_KEY_OOC_PROBLEM, this.btxtProblem.Text);
                llstSearchCondition.Add(Definition.CONDITION_KEY_OOC_CAUSE, this.btxtCause.Text);
                llstSearchCondition.Add(Definition.CONDITION_KEY_OOC_SOLUTION, this.btxtsolution.Text);


                MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage(Definition.GENERAL_SAVE_SUCCESS));
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage(Definition.GENERAL_SAVE_FAIL));
            }
        }
示例#27
0
        private void RemoveResultItem()
        {
            if (bsprResult.GetCheckedList((int)iResultColIdx.SELECT).Count == 0)
            {
                MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_ROWS", null, null);
                return;
            }

            DataSet   dsTemp         = ((DataSet)bsprResult.DataSet).Copy();
            DataTable dtTemp         = dsTemp.Tables[0];
            ArrayList alRemovedIndex = new ArrayList();

            for (int i = 0; i < bsprResult.ActiveSheet.RowCount; i++)
            {
                if (this.bsprResult.ActiveSheet.Cells[i, (int)iChamberColIdx.SELECT].Text == "True")
                {
                    DataRow drTemp = dtTemp.Rows[i];
                    alRemovedIndex.Add(drTemp);
                }
            }

            for (int i = 0; i < alRemovedIndex.Count; i++)
            {
                dtTemp.Rows.Remove((DataRow)alRemovedIndex[i]);
            }

            bsprResult.DataSet = dsTemp;

            for (int i = 0; i < this.bsprResult.ActiveSheet.RowCount; i++)
            {
                this.bsprResult.ActiveSheet.Cells[i, 0].Locked = false;
            }
        }
示例#28
0
        public override void PageSearch(LinkedList llCondition)
        {
            if (llCondition[Definition.DynamicCondition_Search_key.SPCMODEL] == null ||
                ((DataTable)llCondition[Definition.DynamicCondition_Search_key.SPCMODEL]).Rows.Count == 0)
            {
                InitializePage();
                return;
            }

            DataTable     spcmodels   = (DataTable)llCondition[Definition.DynamicCondition_Search_key.SPCMODEL];
            List <string> modelRawids = new List <string>();

            foreach (DataRow dr in spcmodels.Rows)
            {
                modelRawids.Add(dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA].ToString());
            }

            DataSet ds = this.controller.GetModelData(modelRawids.ToArray());

            if (DSUtil.GetResultInt(ds) != 0)
            {
                MSGHandler.DisplayMessage(MSGType.Error, DSUtil.GetResultMsg(ds));
                InitializePage();
                return;
            }

            BindingSpread();
        }
        public bool InputValidation()
        {
            bool result = true;

            double dDay  = 0;
            double dHour = 0;

            if (this.btxtRestrictDays.Text != null && this.btxtRestrictDays.Text.Length > 0)
            {
                dDay = double.Parse(this.btxtRestrictDays.Text);

                if (dDay > 30)
                {
                    MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_VALID_INPUT_DAY", null, null);
                    return(false);
                }
            }

            if (this.btxtRestrictHours.Text != null && this.btxtRestrictHours.Text.Length > 0)
            {
                dHour = double.Parse(this.btxtRestrictHours.Text);

                if (dHour > 100)
                {
                    MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_VALID_INPUT_HOUR", null, null);
                    return(false);
                }
            }

            return(result);
        }
示例#30
0
        public bool CheckDeleteData(DataSet ds, BasePopupFrm page, bool isShowMsg)
        {
            bool bCheck = false;

            if (ds.Tables.Contains("DELETE"))
            {
                bCheck = true;
            }

            if (bCheck)
            {
                return(true);
            }
            else
            {
                page.MsgClose();

                if (isShowMsg)
                {
                    MSGHandler.DisplayMessage(MSGType.Information, "VMS_NO_DELETE_DATA", null, null);
                }

                return(false);
            }
        }