コード例 #1
0
        public static LinkedList GetOCAPParameter(DataTable dt, int iRow)
        {
            LinkedList _llstParam = new LinkedList();

            if (dt == null)
            {
                return(_llstParam);
            }

            _llstParam.Add(Definition.CONDITION_KEY_PARAM_ALIAS, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_PARAM_ALIAS, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_LOT_ID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_LOT_ID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_SUBSTRATE_ID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_SUBSTRATE_ID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_CASSETTE_SLOT, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_CASSETTE_SLOT, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_RECIPE_ID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_RECIPE_ID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_PRODUCT_ID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_PRODUCT_ID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_OPERATION_ID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_OPERATION_ID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_EQP_ID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_EQP_ID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_MODULE_NAME, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_MODULE_NAME, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_STEP_ID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_STEP_ID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_CONTEXT_LIST, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_CONTEXT_LIST, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_OOC_PROBLEM, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_OOC_PROBLEM, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_OOC_CAUSE, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_OOC_CAUSE, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_OOC_SOLUTION, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_OOC_SOLUTION, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_OOC_TRX_SPC_RAWID, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_OOC_TRX_SPC_RAWID, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_CONTEXT_KEY, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_CONTEXT_KEY, iRow, dt));
            _llstParam.Add(Definition.CONDITION_KEY_MODEL_NAME, CommonPageUtil.ColumnsContains(Definition.CONDITION_KEY_MODEL_NAME, iRow, dt));
            _llstParam.Add(Definition.CHART_COLUMN.TIME, CommonPageUtil.ColumnsContains(Definition.CHART_COLUMN.TIME, iRow, dt));

            return(_llstParam);
        }
コード例 #2
0
 public static DataTable GetDataRowSelect(DataTable _dt, LinkedList _llstCondition)
 {
     if (DataUtil.IsNullOrEmptyDataTable(_dt))
     {
         return(null);
     }
     DataRow[] drSelect = _dt.Select(CommonPageUtil.GetDataRowSelectString(_llstCondition));
     return(DataUtil.DataTableImportRow(drSelect));
 }
コード例 #3
0
ファイル: SPCModel.cs プロジェクト: aliceshin/origine
        internal DataTable GetRawData(string startDtts, string endDtts, string chartID)
        {
            if (_ws == null)
            {
                _ws = new WebServiceController <eSPCWebService.eSPCWebService>().Create();
            }

            LinkedList llstCondition = new LinkedList();

            llstCondition.Add(Definition.CONDITION_KEY_START_DTTS, startDtts);
            llstCondition.Add(Definition.CONDITION_KEY_END_DTTS, endDtts);
            llstCondition.Add(Definition.CONDITION_KEY_MODEL_CONFIG_RAWID, chartID);

            DataSet ds = _ws.GetSPCControlChartData(llstCondition.GetSerialData());

            return(CommonPageUtil.CLOBnBLOBParsing(ds, llstCondition, false, false, false));
        }
コード例 #4
0
 public static DataTable CLOBnBLOBParsing(DataSet _ds, LinkedList _llstWhere, bool bDataParsing, bool bMoCVD, bool includingToggleData)
 {
     return(CommonPageUtil.Parsing(_ds, _llstWhere, bDataParsing, bMoCVD, includingToggleData));
 }
コード例 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="_ds"></param>
 /// <param name="_llstWhere"></param>
 /// <param name="bDataParsing"></param>
 /// <returns></returns>
 public static DataTable CLOBnBLOBParsing(DataSet _ds, LinkedList _llstWhere, bool bDataParsing)
 {
     return(CommonPageUtil.Parsing(_ds, _llstWhere, bDataParsing, false, false));
 }
コード例 #6
0
        private void CallDataTrxDataFirst(double dSearchPeriod)
        {
            DataSet              _ds            = null;
            DataTable            _dtChartData   = new DataTable();
            CreateChartDataTable _createChartDT = new CreateChartDataTable();

            try
            {
                LinkedList _llstSearchCondition = new LinkedList();
                _llstSearchCondition.Add(Definition.CONDITION_KEY_START_DTTS, CommonPageUtil.StartDate(this.bDtStart.Value.ToString(Definition.DATETIME_FORMAT)));
                _llstSearchCondition.Add(Definition.CONDITION_KEY_END_DTTS, CommonPageUtil.EndDate(this.bDtEnd.Value.ToString(Definition.DATETIME_FORMAT)));
                _llstSearchCondition.Add(Definition.CONDITION_KEY_MODEL_CONFIG_RAWID, ChartVariable.MODEL_CONFIG_RAWID);
                if (!string.IsNullOrEmpty(ChartVariable.CONTEXT_LIST))
                {
                    _llstSearchCondition.Add(Definition.CONDITION_KEY_CONTEXT_KEY_LIST, ChartVariable.CONTEXT_LIST);
                }

                //Cancle기능 추가
                EESProgressBar.ShowProgress(this, this._lang.GetMessage(Definition.LOADING_DATA), true);

                AsyncCallHandler ach = new AsyncCallHandler(EESProgressBar.AsyncCallManager);

                object objDataSet = ach.SendWait(_wsSPC, "GetATTSPCControlChartData", new object[] { _llstSearchCondition.GetSerialData() });

                EESProgressBar.CloseProgress(this);

                if (objDataSet != null)
                {
                    _ds = (DataSet)objDataSet;
                }
                else
                {
                    MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("INFORMATION_NODATA"));
                    return;
                }

                ChartVariable.dateTimeStart = this.bDtStart.Value;
                ChartVariable.dateTimeEnd   = this.bDtEnd.Value;

                if (DataUtil.IsNullOrEmptyDataSet(_ds))
                {
                    DataSet DTTSTemp = _wsSPC.GetATTLastTRXDataDTTs(ChartVariable.MODEL_CONFIG_RAWID);

                    string temp = "";
                    foreach (DataRow dr in DTTSTemp.Tables[0].Rows)
                    {
                        temp = dr[0].ToString();
                    }

                    if (temp.Length != 0)
                    {
                        foreach (DataRow dr in DTTSTemp.Tables[0].Rows)
                        {
                            DateTime dt = (DateTime)dr[0];
                            this.bDtEnd.Value = dt;

                            if (!double.IsNaN(dSearchPeriod))
                            {
                                this.bDtStart.Value = dt.AddDays(dSearchPeriod);
                            }
                            else
                            {
                                this.bDtStart.Value = dt.AddDays(-7);
                            }
                        }
                        this.CallDataTrxData();
                    }
                    else
                    {
                        MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("INFORMATION_NODATA"));
                        return;
                    }
                }
                else
                {
                    this.MsgShow("Drawing Chart... Can't Cancel!!!");

                    _dtChartData = CommonPageUtil.CLOBnBLOBParsing(_ds, _llstSearchCondition, false);

                    if (!DataUtil.IsNullOrEmptyDataTable(_dtChartData))
                    {
                        _dtChartData = DataUtil.DataTableImportRow(_dtChartData.Select(null, Definition.CHART_COLUMN.TIME));
                        ChartVariable.DEFAULT_CHART     = _dtChartData.Rows[0][BISTel.eSPC.Common.COLUMN.DEFAULT_CHART_LIST].ToString();
                        ChartVariable.MAIN_YN           = _dtChartData.Rows[0][BISTel.eSPC.Common.COLUMN.MAIN_YN].ToString();
                        ChartVariable.complex_yn        = "Y";
                        ChartVariable.CHART_PARENT_MODE = BISTel.eSPC.Common.CHART_PARENT_MODE.SPC_CONTROL_CHART;
                        ChartVariable.dtResource        = _dtChartData;
                        _createChartDT.COMPLEX_YN       = ChartVariable.complex_yn;
                        ChartVariable.dtParamData       = _createChartDT.GetMakeDataTable(_dtChartData);
                        ChartVariable.lstRawColumn      = _createChartDT.lstRawColumn;
                        ChartVariable.lstDefaultChart.Clear();
                        ChartVariable.lstDefaultChart = CommonPageUtil.DefaultChartSplit(ChartVariable.DEFAULT_CHART);

                        List <string> rawIDs = new List <string>();
                        if (_dtChartData.Columns.Contains(Definition.CHART_COLUMN.OCAP_RAWID))
                        {
                            bool bPOcap  = _dtChartData.Columns.Contains(Definition.CHART_COLUMN.P_OCAP_LIST);
                            bool bPNOcap = _dtChartData.Columns.Contains(Definition.CHART_COLUMN.PN_OCAP_LIST);
                            bool bCOcap  = _dtChartData.Columns.Contains(Definition.CHART_COLUMN.C_OCAP_LIST);
                            bool bUOcap  = _dtChartData.Columns.Contains(Definition.CHART_COLUMN.U_OCAP_LIST);

                            foreach (DataRow dr in _dtChartData.Rows)
                            {
                                string rawid = dr[Definition.CHART_COLUMN.OCAP_RAWID].ToString();

                                string sTemp = rawid.Replace(";", "");

                                if (sTemp.Length > 0)
                                {
                                    string[] ids = rawid.Split(';');
                                    foreach (string id in ids)
                                    {
                                        if (string.IsNullOrEmpty(id))
                                        {
                                            continue;
                                        }
                                        if (!rawIDs.Contains(id))
                                        {
                                            rawIDs.Add(id);
                                        }
                                    }
                                }

                                if (bPOcap)
                                {
                                    rawid = dr[Definition.CHART_COLUMN.P_OCAP_LIST].ToString();

                                    sTemp = rawid.Replace("^", "").Replace(";", "");
                                    if (sTemp.Length > 0)
                                    {
                                        string[] ids = rawid.Replace(";", "^").Split('^');
                                        foreach (string id in ids)
                                        {
                                            if (string.IsNullOrEmpty(id))
                                            {
                                                continue;
                                            }
                                            if (!rawIDs.Contains(id))
                                            {
                                                rawIDs.Add(id);
                                            }
                                        }
                                    }
                                }

                                if (bPNOcap)
                                {
                                    rawid = dr[Definition.CHART_COLUMN.PN_OCAP_LIST].ToString();

                                    sTemp = rawid.Replace("^", "");
                                    if (sTemp.Length > 0)
                                    {
                                        string[] ids = rawid.Split('^');
                                        foreach (string id in ids)
                                        {
                                            if (string.IsNullOrEmpty(id))
                                            {
                                                continue;
                                            }
                                            if (!rawIDs.Contains(id))
                                            {
                                                rawIDs.Add(id);
                                            }
                                        }
                                    }
                                }

                                if (bCOcap)
                                {
                                    rawid = dr[Definition.CHART_COLUMN.C_OCAP_LIST].ToString();

                                    sTemp = rawid.Replace("^", "");
                                    if (sTemp.Length > 0)
                                    {
                                        string[] ids = rawid.Split('^');
                                        foreach (string id in ids)
                                        {
                                            if (string.IsNullOrEmpty(id))
                                            {
                                                continue;
                                            }
                                            if (!rawIDs.Contains(id))
                                            {
                                                rawIDs.Add(id);
                                            }
                                        }
                                    }
                                }

                                if (bUOcap)
                                {
                                    rawid = dr[Definition.CHART_COLUMN.U_OCAP_LIST].ToString();

                                    sTemp = rawid.Replace("^", "");
                                    if (sTemp.Length > 0)
                                    {
                                        string[] ids = rawid.Split('^');
                                        foreach (string id in ids)
                                        {
                                            if (string.IsNullOrEmpty(id))
                                            {
                                                continue;
                                            }
                                            if (!rawIDs.Contains(id))
                                            {
                                                rawIDs.Add(id);
                                            }
                                        }
                                    }
                                }
                            }
                            if (rawIDs.Count == 0)
                            {
                                rawIDs.Add("");
                            }

                            LinkedList llstTmpOcapComment = new LinkedList();
                            llstTmpOcapComment.Add(Definition.CONDITION_KEY_OOC_TRX_SPC_RAWID, rawIDs.ToArray());
                            llstTmpOcapComment.Add(Definition.CONDITION_KEY_START_DTTS, (this.bDtStart.Value.AddHours(-12)).ToString(Definition.DATETIME_FORMAT_MS));
                            llstTmpOcapComment.Add(Definition.CONDITION_KEY_END_DTTS, (this.bDtEnd.Value.AddHours(12)).ToString(Definition.DATETIME_FORMAT_MS));

                            byte[] baData = llstTmpOcapComment.GetSerialData();
                            _dsOcapComment       = _wsSPC.GetOCAPCommentList_New(baData);
                            ChartVariable.dtOCAP = _dsOcapComment.Tables[0];
                        }
                    }
                    this.pnlChart.Controls.Clear();
                    this.InitializeSPCChart();
                    this.MsgClose();
                }
            }
            catch (Exception ex)
            {
                EESProgressBar.CloseProgress(this);
                if (ex is OperationCanceledException || ex is TimeoutException)
                {
                    MSGHandler.DisplayMessage(MSGType.Error, ex.Message, null, null, true);
                }
                else
                {
                    LogHandler.ExceptionLogWrite(Definition.APPLICATION_NAME, ex);
                    MSGHandler.DisplayMessage(MSGType.Error, ex.Message, null, null, true);
                }
            }
            finally
            {
                if (_createChartDT != null)
                {
                    _createChartDT = null;
                }
                if (_dtChartData != null)
                {
                    _dtChartData.Dispose();
                }
                if (_ds != null)
                {
                    _ds.Dispose();
                }
            }
        }
コード例 #7
0
        public void InitializeCondition()
        {
            CreateChartDataTable _createChartDT = new CreateChartDataTable();

            try
            {
                double dSearchPeriod = double.NaN;

                this.bapSearch.Visible = true;
                if (this.ChartVariable.CHART_PARENT_MODE == BISTel.eSPC.Common.CHART_PARENT_MODE.MODELING)
                {
                    ArrayList arrSearchCondition = this.mInitialization.GetSearchPeriod(Definition.PAGE_KEY_SPC_ATT_CONTROL_CHART_UC);
                    if (arrSearchCondition != null && arrSearchCondition.Count == 2)
                    {
                        string sSearchType  = arrSearchCondition[0].ToString();
                        string sSearchValue = arrSearchCondition[1].ToString();

                        bool bResult = double.TryParse(sSearchValue, out dSearchPeriod);

                        if (bResult)
                        {
                            dSearchPeriod = 0 - dSearchPeriod;
                            if (sSearchType.ToUpper() == "DAY")
                            {
                                this.bDtStart.Value = ChartVariable.dateTimeEnd.AddDays(dSearchPeriod);
                                this.bDtEnd.Value   = ChartVariable.dateTimeEnd;
                            }
                            else
                            {
                                this.bDtStart.Value = ChartVariable.dateTimeStart;
                                this.bDtEnd.Value   = ChartVariable.dateTimeEnd;
                            }
                        }
                        else
                        {
                            this.bDtStart.Value = ChartVariable.dateTimeStart;
                            this.bDtEnd.Value   = ChartVariable.dateTimeEnd;
                        }
                    }
                    else
                    {
                        this.bDtStart.Value = ChartVariable.dateTimeStart;
                        this.bDtEnd.Value   = ChartVariable.dateTimeEnd;
                    }
                }
                else
                {
                    this.bDtStart.Value = ChartVariable.dateTimeStart;
                    this.bDtEnd.Value   = ChartVariable.dateTimeEnd;
                }

                ChartVariable.dateTimeStart = this.bDtStart.Value;
                ChartVariable.dateTimeEnd   = this.bDtEnd.Value;

                if (ChartVariable.CHART_PARENT_MODE == BISTel.eSPC.Common.CHART_PARENT_MODE.MODELING)
                {
                    if (string.IsNullOrEmpty(ChartVariable.MODEL_CONFIG_RAWID))
                    {
                        this.MsgClose();
                        MSGHandler.DisplayMessage(MSGType.Warning, "SPC_INFO_SELECT_MODEL", null, null);
                        return;
                    }
                    CallDataTrxDataFirst(dSearchPeriod);
                    this.MsgClose();
                    return;
                }
                else
                {
                    if (ChartVariable.llstInfoCondition[Definition.CONDITION_KEY_EQP_ID] != null)
                    {
                        ChartVariable.EQP_ID = _comUtil.GetConditionString(ChartVariable.llstInfoCondition, Definition.CONDITION_KEY_EQP_ID, Definition.CONDITION_KEY_EQP_ID);
                    }

                    if (ChartVariable.llstInfoCondition[Definition.CONDITION_KEY_PRODUCT_ID] != null)
                    {
                        ChartVariable.PRODUCT_ID = _comUtil.GetConditionString(ChartVariable.llstInfoCondition, Definition.CONDITION_KEY_PRODUCT_ID, Definition.CONDITION_KEY_PRODUCT_ID);
                    }

                    if (ChartVariable.llstInfoCondition[Definition.CONDITION_KEY_LOT_ID] != null)
                    {
                        ChartVariable.LOT_ID = _comUtil.GetConditionString(ChartVariable.llstInfoCondition, Definition.CONDITION_KEY_LOT_ID, Definition.CONDITION_KEY_LOT_ID);
                    }

                    if (ChartVariable.llstInfoCondition[Definition.CONDITION_KEY_OPERATION_ID] != null)
                    {
                        ChartVariable.OPERATION_ID = _comUtil.GetConditionString(ChartVariable.llstInfoCondition, Definition.CONDITION_KEY_OPERATION_ID, Definition.CONDITION_KEY_OPERATION_ID);
                    }

                    if (ChartVariable.llstInfoCondition[Definition.CONDITION_KEY_SUBSTRATE_ID] != null)
                    {
                        ChartVariable.SUBSTRATE_ID = _comUtil.GetConditionString(ChartVariable.llstInfoCondition, Definition.CONDITION_KEY_SUBSTRATE_ID, Definition.CONDITION_KEY_SUBSTRATE_ID);
                    }

                    _createChartDT.COMPLEX_YN = Definition.VARIABLE_Y;
                    if (ChartVariable.CHART_PARENT_MODE == BISTel.eSPC.Common.CHART_PARENT_MODE.PPK_REPORT)
                    {
                        if (DataUtil.IsNullOrEmptyDataTable(ChartVariable.dtParamData))
                        {
                            this.MsgClose();
                            MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage("INFORMATION_NODATA"));
                            this.Close();
                            return;
                        }
                        if (ChartVariable.lstRawColumn.Count == 0)
                        {
                            ChartVariable.lstRawColumn = _createChartDT.CallRefCol(ChartVariable.dtParamData);
                        }
                    }
                    else
                    {
                        if (DataUtil.IsNullOrEmptyDataTable(ChartVariable.dtResource))
                        {
                            this.MsgClose();
                            MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage("INFORMATION_NODATA"));
                            return;
                        }
                        ChartVariable.dtParamData  = _createChartDT.GetMakeDataTable(ChartVariable.dtResource);
                        ChartVariable.lstRawColumn = _createChartDT.lstRawColumn;
                        _createChartDT             = null;
                    }

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

                    this.InitializeSPCChart();
                }
            }
            catch (Exception ex)
            {
                this.MsgClose();
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
            finally
            {
                this.MsgClose();
                _createChartDT = null;
            }
        }