Example #1
0
        private void ParseDataTable()
        {
            LinkedList _llstData        = new LinkedList();
            DataSet    dsContextType    = _wsSPC.GetContextType(_llstData.GetSerialData());
            LinkedList mllstContextType = SetContextType(dsContextType);

            mllstContextType.Add("RAW", null);
            mllstContextType.Add("RAW_USL", null);
            mllstContextType.Add("RAW_UCL", null);
            mllstContextType.Add("RAW_TARGET", null);
            mllstContextType.Add("RAW_LCL", null);
            mllstContextType.Add("RAW_LSL", null);
            mllstContextType.Add("PARAM_LIST", null);
            mllstContextType.Add("RAW_DTTS", null);
            if (!mllstContextType.Contains("EQP_ID"))
            {
                mllstContextType.Add("EQP_ID", null);
            }
            for (int i = 0; i < this._dtOriData.Columns.Count; i++)
            {
                if (!mllstContextType.Contains(this._dtOriData.Columns[i].ColumnName.ToUpper()))
                {
                    this._dtOriData.Columns.Remove(this._dtOriData.Columns[i].ColumnName);
                    i--;
                }
            }
        }
Example #2
0
        private void PROC_DataBinding()
        {
            this._bRemovedDuplicatedRow = false;
            ParseCLOB pclob = null;

            try
            {
                _dsOCAPList = new DataSet();

                EESProgressBar.ShowProgress(this, this._lang.GetMessage(Definition.LOADING_DATA), true);

                AsyncCallHandler ach = new AsyncCallHandler(EESProgressBar.AsyncCallManager);

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

                EESProgressBar.CloseProgress(this);

                this.bsprData.ActiveSheet.RowCount = 0;
                this.bsprData.DataSource           = null;

                //this.bsprData.ActiveSheet.FrozenColumnCount = 1;
                this.bsprData.ColFronzen = 1;

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

                if (DataUtil.IsNullOrEmptyDataSet(_dsOCAPList))
                {
                    MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("INFORMATION_NODATA"));
                    return;
                }

                EESProgressBar.ShowProgress(this, MSGHandler.GetMessage("PROCESS_LOADING_PAGE_DATA"), false);

                pclob = new ParseCLOB();

                LinkedList _llstData = new LinkedList();
                _llstData.Add(Definition.DynamicCondition_Condition_key.USE_YN, "Y");
                DataSet    dsContextType    = _wsSPC.GetContextType(_llstData.GetSerialData());
                LinkedList mllstContextType = CommonPageUtil.SetContextType(dsContextType);

                _dsOCAPList = pclob.DecompressOCAPDataTRXData(_dsOCAPList.Tables[0], mllstContextType, false);

                string strTempWhere = "";
                if (this._sFilterEQPID.Length > 0)
                {
                    strTempWhere += string.Format(" EQP_ID = '{0}'", this._sFilterEQPID);
                }

                if (this._sFilterModuleID.Length > 0)
                {
                    if (strTempWhere.Length > 0)
                    {
                        strTempWhere += string.Format(" AND MODULE_ID = '{0}'", this._sFilterModuleID);
                    }
                    else
                    {
                        strTempWhere += string.Format(" MODULE_ID = '{0}'", this._sFilterModuleID);
                    }
                }

                if (this._sFilterLot.Length > 0)
                {
                    if (strTempWhere.Length > 0)
                    {
                        strTempWhere += string.Format(" AND LOT_ID = '{0}'", this._sFilterLot);
                    }
                    else
                    {
                        strTempWhere += string.Format(" LOT_ID = '{0}'", this._sFilterLot);
                    }
                }

                if (this._sFilterSubStrate.Length > 0)
                {
                    if (strTempWhere.Length > 0)
                    {
                        strTempWhere += string.Format(" AND SUBSTRATE_ID = '{0}'", this._sFilterSubStrate);
                    }
                    else
                    {
                        strTempWhere += string.Format(" SUBSTRATE_ID = '{0}'", this._sFilterSubStrate);
                    }
                }

                if (this._sFilterRecipe.Length > 0)
                {
                    if (strTempWhere.Length > 0)
                    {
                        strTempWhere += string.Format(" AND RECIPE_ID = '{0}'", this._sFilterRecipe);
                    }
                    else
                    {
                        strTempWhere += string.Format(" RECIPE_ID = '{0}'", this._sFilterRecipe);
                    }
                }

                if (strTempWhere.Length > 0)
                {
                    DataRow[] drs = _dsOCAPList.Tables[0].Select(strTempWhere);

                    DataSet _dsOCAPList_Filter = _dsOCAPList.Clone();
                    foreach (DataRow drTemp in drs)
                    {
                        _dsOCAPList_Filter.Tables[0].ImportRow(drTemp);
                    }

                    if (DataUtil.IsNullOrEmptyDataSet(_dsOCAPList_Filter))
                    {
                        this.MsgClose();
                        MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("INFORMATION_NODATA"));
                        return;
                    }

                    this.bsprData.DataSource = _dsOCAPList_Filter;
                }
                else
                {
                    this.bsprData.DataSource = _dsOCAPList;
                }
            }
            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
            {
                EESProgressBar.CloseProgress(this);
                this._dsOCAPList.Dispose();
            }
        }