Esempio n. 1
0
        private void AddParamTypeNode(TreeNode node)
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.CATEGORY, Definition.CODE_CATEGORY_PARAM_TYPE);
            DataSet ds = this._wsSPC.GetCodeData(llstData.GetSerialData());

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sCode = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.CODE].ToString();
                string sDesc = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.CODE_NAME].ToString();

                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PARAM_TYPE, sCode, sDesc);
                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.PARAM_GROUP);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.PARAM_GROUP;
                if (!this.IsLastNode)
                {
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                node.Nodes.Add(btn);
            }
        }
Esempio n. 2
0
        private void AddStepNode(TreeNode tnCurrent, string sRecipeID, string sModuleID)
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, sModuleID);

            llstData.Add(Definition.DynamicCondition_Condition_key.PRODUCT_ID, this.ProductID);
            llstData.Add(Definition.DynamicCondition_Condition_key.RECIPE_ID, sRecipeID);

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetRecipeStep(baData);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sStep = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.STEP_ID].ToString();

                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.STEP, sStep, sStep);
                btn.IsVisibleCheckBox = true;
                btn.IsFolder          = false;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.STEP);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.STEP;

                tnCurrent.Nodes.Add(btn);
            }
        }
        private void RefreshTreeView()
        {
            this.bTreeView1.Nodes.Clear();

            if (string.IsNullOrEmpty(this.sEQPModel) &&
                string.IsNullOrEmpty(this.sAreaRawID))
            {
                return;
            }

            //spc-880 add Group
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.CONDITION_KEY_LINE_RAWID, sLineRawID);
            llstData.Add(Definition.CONDITION_KEY_AREA_RAWID, sAreaRawID);

            if (!string.IsNullOrEmpty(sEQPModel))
            {
                llstData.Add(Definition.CONDITION_KEY_EQP_MODEL, sEQPModel);
            }

            node = TreeDCUtil.CreateBTreeNode("SPC MODEL LIST", "SPC MODEL LIST", "SPC MODEL LIST");
            //node.Nodes.Add(BTreeView.CreateDummyNode());
            node.IsVisibleCheckBox = false;
            node.IsFolder          = true;
            node.IsVisibleNodeType = true;
            this.bTreeView1.Nodes.Add(node);
            AddChildNodes(node);
            this.bTreeView1.ExpandAll();
        }
Esempio n. 4
0
        public void AddRootNode(TreeNode node)
        {
            if (BTreeView.IsOnlyDummyNode((BTreeNode)node))
            {
                node.Nodes.Clear();
            }

            TreeNode tnCurrent = node;

            _treeNode = node;

            BTreeNode btnSum = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.TRACE_SUM_PARAM_TYPE, node.Name + _sModuleRawid, "TRACE SUMMARY");

            btnSum.IsVisibleCheckBox = true;
            btnSum.IsFolder          = true;
            btnSum.IsVisibleNodeType = true;
            btnSum.Nodes.Add(BTreeView.CreateDummyNode());

            tnCurrent.Nodes.Add(btnSum);

            BTreeNode btnEvent = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.EVENT_SUM_PARAM_TYPE, node.Name + _sModuleRawid, "EVENT SUMMARY");

            btnEvent.IsVisibleCheckBox = true;
            btnEvent.IsFolder          = true;
            btnEvent.IsVisibleNodeType = true;
            btnEvent.Nodes.Add(BTreeView.CreateDummyNode());

            tnCurrent.Nodes.Add(btnEvent);
        }
Esempio n. 5
0
        public void AddRootNode(TreeNode node)
        {
            if (BTreeView.IsOnlyDummyNode((BTreeNode)node))
            {
                node.Nodes.Clear();
            }

            TreeNode tnCurrent = node;

            _treeNode = node;

            DCValueOfTree dcValue = TreeDCUtil.GetDCValue(node);
            string        value   = string.Empty;

            if (this.UseDefaultCondition.Equals(Definition.YES))
            {
                value = dcValue.Value;//_sProductRawid;
            }
            else
            {
                value = dcValue.Value + "_ROOT";
            }

            BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.RECIPE_TYPE, value, "RECIPES");

            btn.IsVisibleCheckBox = false;
            btn.IsFolder          = true;
            btn.IsVisibleNodeType = true;
            btn.Nodes.Add(BTreeView.CreateDummyNode());

            tnCurrent.Nodes.Add(btn);
        }
Esempio n. 6
0
        private void AddSummaryParamNode(TreeNode tnCurrent, string groupRawid, string moduleID)
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.TYPE, ParameterType.TRACE_SUMMARY);
            llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, moduleID);
            llstData.Add(Definition.DynamicCondition_Condition_key.DCP_ID, this.DcpID);

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetParameter(baData);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            DataSet dsCheck = new DataSet();

            if (ds != null && ds.Tables.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string sParam = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.PARAM_ALIAS].ToString();
                    string sRawid = sParam + i.ToString();

                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.TRACE_SUM_PARAM, sRawid, sParam);
                    btn.IsVisibleCheckBox = true;
                    btn.IsFolder          = false;
                    btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.TRACE_SUM_PARAM);
                    btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.TRACE_SUM_PARAM;

                    tnCurrent.Nodes.Add(btn);
                }
            }
        }
Esempio n. 7
0
        private void AddParamNameNode(TreeNode tnCurrent)
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.LINE_RAWID, this.LineRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.AREA_RAWID, this.AreaRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.PARAM_TYPE_CD, this.ParamType);
            llstData.Add(Definition.DynamicCondition_Condition_key.OPERATION_ID, this.OperationID);

            DataSet ds = this._wsSPC.GetParamName(llstData.GetSerialData());

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sCode = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.PARAM_ALIAS].ToString();
                string sDesc = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.PARAM_ALIAS].ToString();

                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PARAM, sCode, sDesc);
                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.PARAMETER);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.PARAMETER;
                if (!this.IsLastNode)
                {
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                tnCurrent.Nodes.Add(btn);
            }
        }
Esempio n. 8
0
        private static BTreeNode GetTreeNodeFromDataRow(string contextID, DataRow dr)
        {
            BTreeNode node = TreeDCUtil.CreateBTreeNode(contextID, dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA].ToString(),
                                                        dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA].ToString());

            return(node);
        }
Esempio n. 9
0
        private void AddGroupNode(TreeNode tnCurrent, string value, string moduleRawid)
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.EQP_RAWID, moduleRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.PARENT, value);

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetParamGroup(baData);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            tnCurrent.Nodes.Clear();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sGroup = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.GROUP_NAME].ToString();
                string sRawid = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.RAWID].ToString();

                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Condition_key.GROUP + "_" + (tnCurrent.Level + 1), sRawid, sGroup);
                btn.IsVisibleCheckBox = true;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.PARAM_GROUP);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.PARAM_GROUP;
                btn.Nodes.Add(BTreeView.CreateDummyNode());

                tnCurrent.Nodes.Add(btn);
            }
        }
Esempio n. 10
0
        //added end SPC-915

        void AddChildNodes(BTreeNode node)
        {
            DCValueOfTree dcvalue = TreeDCUtil.GetDCValue(node);

            string[] paramAlias = null;

            if (isATT)
            {
                paramAlias = ws.GetATTParamListHavingSPCModel(sLineRawID, sAreaRawID, sEQPModel, dcvalue.Value);
            }
            else
            {
                paramAlias = ws.GetParamListHavingSPCModel(sLineRawID, sAreaRawID, sEQPModel, dcvalue.Value);
            }

            if (paramAlias == null)
            {
                return;
            }

            foreach (string param in paramAlias)
            {
                node.Nodes.Add(TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PARAM_ALIAS, param, param));
            }
        }
Esempio n. 11
0
        private void AddDcpNode(TreeNode tnCurrent, string dcpRawid)
        {
            if (tnCurrent.Nodes.Count > 0)
            {
                return;
            }

            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.EQP_ID, this.EqpID);
            llstData.Add(Definition.DynamicCondition_Condition_key.LINE_RAWID, this.LineRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.AREA_RAWID, this.AreaRawid);

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetDCP(baData);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                //[2009.04.27] CHANDLER - DCP_NAME => DCP_ID
                string sDcp   = ds.Tables[0].Rows[i][Definition.COL_DCP_ID].ToString();
                string sRawid = ds.Tables[0].Rows[i][Definition.COL_RAW_ID].ToString();
                string sState = ds.Tables[0].Rows[i][Definition.COL_DCP_STATE_CD].ToString();

                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.DCP_ID, sDcp, sDcp);

                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;

                if (!this.IsLastNode)
                {
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                if (this.IsShowCheck)
                {
                    btn.IsVisibleCheckBox = true;
                }

                if (sState.Length > 0 && sState == "ACT")
                {
                    btn.ForeColor = Color.Red;
                    btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.DCP_ACTIVE);
                    btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.DCP_ACTIVE;
                }
                else
                {
                    btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.DCP_DEACTIVE);
                    btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.DCP_DEACTIVE;
                }

                tnCurrent.Nodes.Add(btn);
            }
        }
Esempio n. 12
0
        private void AddEQPNode(TreeNode tnCurrent, string sEQPModelRawid)
        {
            if (tnCurrent.Nodes.Count > 0)
            {
                return;
            }

            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.LINE_RAWID, this.LineRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.AREA_RAWID, this.AreaRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.OPERATION_ID, this.OperationID);
            llstData.Add(Definition.DynamicCondition_Condition_key.PRODUCT_ID, this.ProductID);
            //llstData.Add(Definition.DynamicCondition_Condition_key.EQP_MODEL, sEQPModelRawid);

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetEQP(baData);


            BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.EQP_ID, "*", "*");

            btn.IsVisibleCheckBox = this.IsShowCheck;
            btn.IsFolder          = false;
            btn.IsVisibleNodeType = true;
            btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.EQP);
            btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.EQP;
            if (!this.IsLastNode)
            {
                btn.Nodes.Add(BTreeView.CreateDummyNode());
            }

            tnCurrent.Nodes.Add(btn);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sEQPID      = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.EQP_ID].ToString();
                string sModuelName = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.MODULE_NAME].ToString();

                btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.EQP_ID, sEQPID, sModuelName);
                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.EQP);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.EQP;
                if (!this.IsLastNode)
                {
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                tnCurrent.Nodes.Add(btn);
            }
        }
Esempio n. 13
0
        /// <summary>
        /// Search Type : Product
        /// </summary>
        /// <param name="tnCurrent"></param>
        /// <param name="rawid"></param>
        /// <param name="moduleID"></param>
        private void AddSearchProductsNode()
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.LINE_RAWID, this.LineRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.AREA_RAWID, this.AreaRawid);

            if (!string.IsNullOrEmpty(this.OperationID))
            {
                llstData.Add(Definition.DynamicCondition_Condition_key.OPERATION_ID, this.OperationID);
            }

            if (!string.IsNullOrEmpty(this.EqpID))
            {
                llstData.Add(Definition.DynamicCondition_Condition_key.EQP_ID, this.EqpID);
            }
            DataSet ds = this._wsSPC.GetSPCProduct(llstData.GetSerialData());


            BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PRODUCTS, "*", "*");

            btn.IsVisibleCheckBox = this.IsShowCheck;
            btn.IsFolder          = false;
            btn.IsVisibleNodeType = true;
            btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT);
            btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT;
            if (!this.IsLastNode)
            {
                btn.Nodes.Add(BTreeView.CreateDummyNode());
            }

            this.XTreeView.Nodes.Add(btn);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }


            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sPRODUCT_ID = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.PRODUCT_ID].ToString();

                btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PRODUCTS, sPRODUCT_ID, sPRODUCT_ID);
                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT;
                if (!this.IsLastNode)
                {
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                this.XTreeView.Nodes.Add(btn);
            }
        }
Esempio n. 14
0
        private void AddSPCModelNode(TreeNode tnCurrent)
        {
            if (tnCurrent.Nodes.Count > 0)
            {
                return;
            }

            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.CONDITION_KEY_LINE_RAWID, this.LineRawid);
            llstData.Add(Definition.CONDITION_KEY_AREA_RAWID, this.AreaRawid);

            if (!string.IsNullOrEmpty(this.EqpModelName))
            {
                llstData.Add(Definition.CONDITION_KEY_EQP_MODEL, getReplace(EqpModelName));
            }

            if (!string.IsNullOrEmpty(this.ParamTypeCD))
            {
                llstData.Add(Definition.DynamicCondition_Condition_key.PARAM_TYPE_CD, this.ParamTypeCD);
            }

            if (!string.IsNullOrEmpty(this.FilterValue))
            {
                llstData.Add("FILTER", this.FilterValue);
            }

            DataSet ds = _wsSPC.GetSPCModel(llstData.GetSerialData());

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sRawid        = ds.Tables[0].Rows[i][Definition.CONDITION_KEY_RAWID].ToString();
                string sSPCModelName = ds.Tables[0].Rows[i][Definition.CONDITION_KEY_SPC_MODEL_NAME].ToString();

                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPCMODEL, sRawid, sSPCModelName);
                ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.LOCATION_RAWID, ds.Tables[0].Rows[i][COLUMN.LOCATION_RAWID].ToString());
                ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.AREA_RAWID, ds.Tables[0].Rows[i][COLUMN.AREA_RAWID].ToString());
                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;
                //btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.EQP);
                //btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.EQP;
                if (!this.IsLastNode)
                {
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                tnCurrent.Nodes.Add(btn);
            }
        }
Esempio n. 15
0
        public void RefreshTreeView()
        {
            this.bTreeView1.Nodes.Clear();

            if (string.IsNullOrEmpty(this.sEQPModel) &&
                string.IsNullOrEmpty(this.sAreaRawID))
            {
                return;
            }

            if (isATT)
            {
                BTreeNode node = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PARAM_TYPE, "trs", "AttributeName");
                node.Nodes.Add(BTreeView.CreateDummyNode());
                this.bTreeView1.Nodes.Add(node);
                this.bTreeView1.ExpandAll();
            }
            else
            {
                LinkedList llstCondition = new LinkedList();
                if (isMET)
                {
                    llstCondition.Add(Definition.CONDITION_KEY_CATEGORY, Definition.CODE_CATEGORY_MET_PARAM_TYPE);
                }
                else
                {
                    llstCondition.Add(Definition.CONDITION_KEY_CATEGORY, Definition.CODE_CATEGORY_PARAM_TYPE);
                }
                DataSet ds = ws.GetCodeData(llstCondition.GetSerialData());

                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    return;
                }

                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    BTreeNode node = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PARAM_TYPE, row["CODE"].ToString(),
                                                                row["NAME"].ToString());
                    if (isMET)
                    {
                        node.Nodes.Add(BTreeView.CreateDummyNode());
                        this.bTreeView1.Nodes.Add(node);
                    }
                    else
                    {
                        if (node.Text != "METROLOGY")
                        {
                            node.Nodes.Add(BTreeView.CreateDummyNode());
                            this.bTreeView1.Nodes.Add(node);
                        }
                    }
                }
            }
        }
Esempio n. 16
0
        private void AddOperationNode()
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.LINE_RAWID, this.LineRawid);
            llstData.Add(Definition.DynamicCondition_Condition_key.AREA_RAWID, this.AreaRawid);
            //llstData.Add(Definition.DynamicCondition_Condition_key.CATEGORY, Definition.CODE_CATEGORY_SEARCH_TYPE);
            DataSet ds = this._wsSPC.GetSPCOperation(llstData.GetSerialData());

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }


            BTreeNode btn = null;


            btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.OPERATION, "*", "*");
            btn.IsVisibleCheckBox = this.IsShowCheck;
            btn.IsFolder          = false;
            btn.IsVisibleNodeType = true;
            btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.STEP);
            btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.STEP;
            if (!this.IsLastNode)
            {
                btn.Nodes.Add(BTreeView.CreateDummyNode());
            }

            this.XTreeView.Nodes.Add(btn);


            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sOperationID = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.OPERATION_ID].ToString();
                string sDesc        = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.CODE_DESCRIPTION].ToString();

                btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.OPERATION, sOperationID, sDesc);
                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.IsVisibleNodeType = true;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.STEP);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.STEP;
                if (!this.IsLastNode)
                {
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                this.XTreeView.Nodes.Add(btn);
            }
        }
Esempio n. 17
0
        private void AddRecipeNode(TreeNode tnCurrent, string productID, string moduleID)
        {
            LinkedList llstData = new LinkedList();

            if (productID == moduleID + "_0")
            {
                productID = "-1";
            }

            llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, moduleID);
            if (this.UseDefaultCondition.Equals(Definition.YES))
            {
                llstData.Add(Definition.DynamicCondition_Condition_key.PRODUCT_ID, productID);
            }

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetRecipe(baData);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sRecipe = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.RECIPE_ID].ToString();

                if (!IsShowRecipeWildcard)
                {
                    if (sRecipe == "*")
                    {
                        continue;
                    }
                }

                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.RECIPE, sRecipe, sRecipe);
                btn.IsVisibleCheckBox = this.IsShowCheck;
                btn.IsFolder          = false;
                btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.RECIPE);
                btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.RECIPE;
                if (_bStepNode || _bSpecGroupNode || _bMvaModelNode)
                {
                    btn.IsVisibleNodeType = true;
                    btn.Nodes.Add(BTreeView.CreateDummyNode());
                }

                tnCurrent.Nodes.Add(btn);
            }
        }
Esempio n. 18
0
        private void AddParamNode(TreeNode tnCurrent, string groupRawid, string moduleID)
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, moduleID);
            llstData.Add(Definition.DynamicCondition_Condition_key.EQP_PG_RAWID, groupRawid);
            llstData.Add(Definition.DynamicCondition_Search_key.DCP_ID, this.DcpID); //::

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetParamByGroup(baData);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            DataSet dsCheck = new DataSet();

            if (ds != null && ds.Tables.Count > 0 && this.IsCheckParamType)
            {
                dsCheck.Merge(ds.Tables[0].Select("data_type_cd IN ('FLT', 'INT')"));
                ds = dsCheck;
            }

            if (ds != null && ds.Tables.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string sRawid   = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.RAWID].ToString();
                    string sAlias   = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.PARAM_ALIAS].ToString();
                    string sVirtual = ds.Tables[0].Rows[i]["VIRTUAL_YN"].ToString();
                    string sType    = ds.Tables[0].Rows[i]["data_type_cd"].ToString();

                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Condition_key.PARAM, sRawid, sAlias);
                    btn.IsVisibleCheckBox = true;
                    btn.IsFolder          = false;
                    btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.TRACE_PARAM);
                    btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.TRACE_PARAM;
                    if (sVirtual == Definition.YES)
                    {
                        btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.VIRTUAL_PARAM);
                        btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.VIRTUAL_PARAM;
                    }

                    tnCurrent.Nodes.Add(btn);
                }
            }
        }
Esempio n. 19
0
        private void AddProductNode(TreeNode tnCurrent, string rawid, string moduleID)
        {
            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, moduleID);

            byte[]  baData = llstData.GetSerialData();
            DataSet ds     = _wsSPC.GetProduct(baData);

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }


            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sProduct = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.PRODUCT_ID].ToString();

                if (sProduct.Length > 0)
                {
                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PRODUCT, sProduct, sProduct);
                    btn.IsVisibleCheckBox = this.IsShowCheck;
                    btn.IsFolder          = false;
                    btn.IsVisibleNodeType = true;
                    btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT);
                    btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT;
                    btn.Nodes.Add(BTreeView.CreateDummyNode());

                    tnCurrent.Nodes.Add(btn);
                }
            }

            // Product이 없는 Recipe를 위한 Node를 추가
            BTreeNode btnTemp = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PRODUCT, "", "NON PRODUCTS");

            btnTemp.IsVisibleCheckBox = this.IsShowCheck;
            btnTemp.IsFolder          = false;
            btnTemp.IsVisibleNodeType = true;
            btnTemp.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT);
            btnTemp.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.PRODUCT;
            btnTemp.Nodes.Add(BTreeView.CreateDummyNode());
            tnCurrent.Nodes.Add(btnTemp);
        }
Esempio n. 20
0
        public void AddRootNode(TreeNode node)
        {
            if (BTreeView.IsOnlyDummyNode((BTreeNode)node))
            {
                node.Nodes.Clear();
            }

            TreeNode tnCurrent = node;

            DCValueOfTree dcValue = TreeDCUtil.GetDCValue(node);

            BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPEC_GROUP_TYPE, dcValue.Value, "SPEC GROUPS");

            btn.IsVisibleCheckBox = false;
            btn.IsFolder          = true;
            btn.IsVisibleNodeType = true;
            btn.Nodes.Add(BTreeView.CreateDummyNode());

            tnCurrent.Nodes.Add(btn);
        }
Esempio n. 21
0
        public void AddRootNode(TreeNode node)
        {
            if (BTreeView.IsOnlyDummyNode((BTreeNode)node))
            {
                node.Nodes.Clear();
            }

            TreeNode tnCurrent = node;

            _treeNode = node;

            BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.PRODUCT_TYPE, _sModuleRawid, "PRODUCTS");

            btn.IsVisibleCheckBox = false;
            btn.IsFolder          = true;
            btn.IsVisibleNodeType = true;
            btn.Nodes.Add(BTreeView.CreateDummyNode());

            tnCurrent.Nodes.Add(btn);
        }
Esempio n. 22
0
        public void AddRootNode(TreeNode node)
        {
            if (BTreeView.IsOnlyDummyNode((BTreeNode)node))
            {
                node.Nodes.Clear();
            }

            TreeNode tnCurrent = node;

            _treeNode = node;

            //if (tnCurrent.Nodes.Count > 0) return;

            BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Condition_key.TRACE_PARAM_TYPE, node.Name + _sModuleRawid, "TRACE");

            btn.IsVisibleCheckBox = true;
            btn.IsFolder          = true;
            btn.IsVisibleNodeType = true;
            btn.Nodes.Add(BTreeView.CreateDummyNode());

            tnCurrent.Nodes.Add(btn);
        }
Esempio n. 23
0
        private void AddSPCModelContextNode(TreeNode tnCurrent)
        {
            if (tnCurrent.Nodes.Count > 0)
            {
                return;
            }

            LinkedList llstData = new LinkedList();

            llstData.Add(Definition.DynamicCondition_Condition_key.MODEL_RAWID, this.ModelRawID);
            DataSet ds = _wsSPC.GetSPCModelContext(llstData.GetSerialData());

            if (ds == null || ds.Tables.Count <= 0)
            {
                return;
            }

            string        sOldRawID    = string.Empty;
            string        sContextList = string.Empty;
            StringBuilder sb           = new StringBuilder();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string sRawid        = ds.Tables[0].Rows[i][Definition.CONDITION_KEY_RAWID].ToString();
                string sParamAlias   = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.PARAM_ALIAS].ToString();
                string sMAIN_YN      = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.MAIN_YN].ToString();
                string sContextKey   = ds.Tables[0].Rows[i]["CONTEXT_KEY"].ToString();
                string sContextValue = ds.Tables[0].Rows[i]["CONTEXT_VALUE"].ToString();

                if (i == ds.Tables[0].Rows.Count - 1)
                {
                    if (!sMAIN_YN.Equals("Y"))
                    {
                        sb.AppendFormat("/{0}", sContextValue);
                    }
                }

                if ((i > 0 && sRawid != sOldRawID) || (i == ds.Tables[0].Rows.Count - 1))
                {
                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPC_MODEL_CONFIG_RAWID, sOldRawID, sb.ToString());
                    btn.IsVisibleCheckBox = this.IsShowCheck;
                    btn.IsFolder          = false;
                    btn.IsVisibleNodeType = true;
                    if (!this.IsLastNode)
                    {
                        btn.Nodes.Add(BTreeView.CreateDummyNode());
                    }

                    tnCurrent.Nodes.Add(btn);
                    sb = new StringBuilder();

                    //if (sMAIN_YN.Equals("Y"))
                    //    sb.AppendFormat("{0}/{1}/*", sParamAlias, sMAIN_YN);
                    //else
                    //    sb.AppendFormat("{0}/{1}", sParamAlias, sMAIN_YN);

                    if (sMAIN_YN.Equals("Y"))
                    {
                        sb.AppendFormat("{0}/*", sParamAlias);
                    }
                    else
                    {
                        sb.AppendFormat("{0}", sParamAlias);
                    }
                }

                if (i == 0)
                {
                    //if (sMAIN_YN.Equals("Y"))
                    //    sb.AppendFormat("{0}/{1}/*", sParamAlias, sMAIN_YN);
                    //else
                    //    sb.AppendFormat("{0}/{1}/{2}", sParamAlias, sMAIN_YN, sContextValue);

                    if (sMAIN_YN.Equals("Y"))
                    {
                        sb.AppendFormat("{0}/*", sParamAlias);
                    }
                    else
                    {
                        sb.AppendFormat("{0}/{1}", sParamAlias, sContextValue);
                    }
                }
                else
                {
                    //if (!sMAIN_YN.Equals("Y"))
                    //    sb.AppendFormat("/{0}", sContextValue);

                    if (!sMAIN_YN.Equals("Y"))
                    {
                        if (sb.Length.Equals(0))
                        {
                            sb.AppendFormat("{0}", sContextValue);
                        }
                        else
                        {
                            sb.AppendFormat("/{0}", sContextValue);
                        }
                    }
                }

                sOldRawID = sRawid;
            }
        }
Esempio n. 24
0
        private void AddModuleNode(TreeNode tnCurrent, string dcpRawid)
        {
            try
            {
                if (tnCurrent.Nodes.Count > 0)
                {
                    return;
                }

                LinkedList llstData = new LinkedList();

                llstData.Add(Definition.DynamicCondition_Condition_key.LINE_RAWID, this.LineRawid);
                llstData.Add(Definition.DynamicCondition_Condition_key.AREA_RAWID, this.AreaRawid);
                llstData.Add(Definition.DynamicCondition_Condition_key.EQP_ID, this.EqpID);
                llstData.Add(Definition.DynamicCondition_Condition_key.DCP_ID, this.DcpID);
                llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, this.EqpID);

                byte[]  baData = llstData.GetSerialData();
                DataSet ds     = _wsSPC.GetModuleByEQP(baData);

                if (ds == null || ds.Tables.Count <= 0)
                {
                    return;
                }

                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string sModule         = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.ALIAS].ToString();
                    string sModuleID       = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.MODULE_ID].ToString();
                    string sParentModuleID = ds.Tables[0].Rows[i]["parent_moduleid"].ToString();
                    string sRawID          = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.RAWID].ToString();

                    if (sParentModuleID == string.Empty)
                    {
                        _sMainModuleRawid = sModuleID;
                    }

                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.MODULE, sModuleID, sModule);
                    btn.IsVisibleCheckBox = this.IsShowCheck;
                    btn.IsFolder          = false;
                    btn.IsVisibleNodeType = true;
                    btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.MODULE);
                    btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.MODULE;
                    DCValueOfTree dcValue = TreeDCUtil.GetDCValue(btn);
                    dcValue.AdditionalValue.Add(Definition.DynamicCondition_Search_key.ADDTIONALVALUEDATA, sRawID);
                    dcValue.Tag = sModuleID;

                    if (this.IsLastNode)
                    {
                        if (_sMainModuleRawid != sModule)
                        {
                            if (llstData.Contains(Definition.DynamicCondition_Condition_key.MODULE_ID))
                            {
                                llstData[Definition.DynamicCondition_Condition_key.MODULE_ID] = sModuleID;
                            }
                            else
                            {
                                llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, sModuleID);
                            }

                            byte[]  data        = llstData.GetSerialData();
                            DataSet dsSubModule = _wsSPC.GetSubModuleByEQP(data);
                            if (dsSubModule.Tables.Count > 0 && dsSubModule.Tables[0].Rows.Count > 0)
                            {
                                btn.Nodes.Add(BTreeView.CreateDummyNode());
                            }
                        }
                    }
                    else
                    {
                        btn.Nodes.Add(BTreeView.CreateDummyNode());
                    }

                    tnCurrent.Nodes.Add(btn);
                }
            }
            catch (Exception ex)
            {
                EESUtil.DebugLog(ex);
            }
        }
Esempio n. 25
0
        private void AddSubModuleNode(TreeNode tnCurrent, string rawid)
        {
            try
            {
                if (rawid == this.EqpID)
                {
                    return;
                }

                LinkedList llstData = new LinkedList();

                llstData.Add(Definition.DynamicCondition_Condition_key.LINE_RAWID, this.LineRawid);
                llstData.Add(Definition.DynamicCondition_Condition_key.AREA_RAWID, this.AreaRawid);
                llstData.Add(Definition.DynamicCondition_Condition_key.EQP_ID, this.EqpID);
                llstData.Add(Definition.DynamicCondition_Condition_key.DCP_ID, this.DcpID);
                llstData.Add(Definition.DynamicCondition_Condition_key.MODULE_ID, rawid);

                byte[]  baData = llstData.GetSerialData();
                DataSet ds     = _wsSPC.GetSubModuleByEQP(baData);

                if (ds == null || ds.Tables.Count <= 0)
                {
                    return;
                }

                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string sRawid          = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.RAWID].ToString();
                    string sModule         = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.ALIAS].ToString();
                    string sModuleID       = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.MODULE_ID].ToString();
                    string sParentModuleID = ds.Tables[0].Rows[i]["parent_moduleid"].ToString();
                    string sLevel          = ds.Tables[0].Rows[i][Definition.DynamicCondition_Condition_key.MODULE_LEVEL].ToString();

                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.MODULE + "_" + sLevel, sModuleID, sModule);
                    btn.IsVisibleCheckBox = this.IsShowCheck;
                    btn.IsFolder          = false;
                    btn.IsVisibleNodeType = true;
                    btn.ImageIndexList.Add((int)ImageLoader.TREE_IMAGE_INDEX.MODULE);
                    btn.ImageIndex = (int)ImageLoader.TREE_IMAGE_INDEX.MODULE;

                    DCValueOfTree dcValue = TreeDCUtil.GetDCValue(btn);
                    dcValue.AdditionalValue.Add(Definition.DynamicCondition_Search_key.ADDTIONALVALUEDATA, sRawid);


                    if (this.IsLastNode)
                    {
                        llstData[Definition.DynamicCondition_Condition_key.MODULE_ID] = sModuleID;
                        byte[]  data        = llstData.GetSerialData();
                        DataSet dsSubModule = _wsSPC.GetSubModuleByEQP(data);
                        if (dsSubModule != null && dsSubModule.Tables.Count > 0 && dsSubModule.Tables[0].Rows.Count > 0)
                        {
                            btn.Nodes.Add(BTreeView.CreateDummyNode());
                        }
                    }
                    else
                    {
                        btn.Nodes.Add(BTreeView.CreateDummyNode());
                    }

                    tnCurrent.Nodes.Add(btn);
                }
            }
            catch (Exception ex)
            {
                BISTel.PeakPerformance.Client.CommonLibrary.LogHandler.ExceptionLogWrite(Definition.APPName, ex);
            }
        }
        void AddChildNodes(BTreeNode node)
        {
            DataSet ds      = null;
            DataSet dsGroup = null;

            #region previous
            //if (isATT)
            //{
            //    ds = ws.GetATTSPCModeList2(sLineRawID, sAreaRawID, "'" + sEQPModel + "'");
            //}
            //else
            //{
            //    LinkedList llParam = new LinkedList();
            //    llParam.Add(COLUMN.LOCATION_RAWID, sLineRawID);
            //    llParam.Add(COLUMN.AREA_RAWID, sAreaRawID);

            //    if(!String.IsNullOrEmpty(sEQPModel))
            //        llParam.Add(COLUMN.EQP_MODEL, sEQPModel);

            //if (node.Text != Definition.VARIABLE_UNASSIGNED_MODEL)
            //    llParam.Add(COLUMN.GROUP_NAME, node.Text);

            //LinkedList llstData = new LinkedList();
            //llstData.Add(Definition.CONDITION_KEY_LINE_RAWID, sLineRawID);
            //llstData.Add(Definition.CONDITION_KEY_AREA_RAWID, sAreaRawID);

            //dsGroup = this.ws.GetGroupList(llstData.GetSerialData());

            //if (isMET)
            //{
            //    //ds = ws.GetMETSPCModeList2(sLineRawID, sAreaRawID, "'" + sEQPModel + "'", "MET");
            //    ds = ws.GetSPCModelListbyGroup(llParam.GetSerialData(), true);

            //}
            //else
            //{
            //    //ds = ws.GetSPCModeList2(sLineRawID, sAreaRawID, "'" + sEQPModel + "'", "MET");
            //    ds = ws.GetSPCModelListbyGroup(llParam.GetSerialData(), false);
            //}
            //}

            //if(ds == null
            //    || ds.Tables.Count == 0)
            //    return;
            #endregion

            LinkedList llstData = new LinkedList();
            llstData.Add(Definition.CONDITION_KEY_LINE_RAWID, sLineRawID);
            llstData.Add(Definition.CONDITION_KEY_AREA_RAWID, sAreaRawID);

            if (!String.IsNullOrEmpty(sEQPModel))
            {
                llstData.Add(Definition.CONDITION_KEY_EQP_MODEL, sEQPModel);
            }

            if (isATT)
            {
                dsGroup = this.ws.GetATTGroupList(llstData.GetSerialData());
            }
            else
            {
                dsGroup = this.ws.GetGroupList(llstData.GetSerialData());
            }

            DataRow drModel = dsGroup.Tables[0].NewRow();
            drModel[COLUMN.GROUP_NAME] = Definition.VARIABLE_UNASSIGNED_MODEL;
            dsGroup.Tables[0].Rows.Add(drModel);

            foreach (DataRow row in dsGroup.Tables[0].Rows)
            {
                if (isATT)
                {
                    ds = ws.GetATTSPCModeList2(sLineRawID, sAreaRawID, "'" + sEQPModel + "'");
                }
                else
                {
                    LinkedList llParam = new LinkedList();
                    llParam.Add(COLUMN.LOCATION_RAWID, sLineRawID);
                    llParam.Add(COLUMN.AREA_RAWID, sAreaRawID);

                    if (!String.IsNullOrEmpty(sEQPModel))
                    {
                        llParam.Add(COLUMN.EQP_MODEL, "'" + sEQPModel + "'");
                    }

                    if (row[COLUMN.GROUP_NAME].ToString() != Definition.VARIABLE_UNASSIGNED_MODEL)
                    {
                        llParam.Add(COLUMN.GROUP_RAWID, row[COLUMN.RAWID].ToString());
                    }

                    if (isMET)
                    {
                        //ds = ws.GetMETSPCModeList2(sLineRawID, sAreaRawID, "'" + sEQPModel + "'", "MET");
                        ds = ws.GetSPCModelListbyGroup(llParam.GetSerialData(), true);
                    }
                    else
                    {
                        //ds = ws.GetSPCModeList2(sLineRawID, sAreaRawID, "'" + sEQPModel + "'", "MET");
                        ds = ws.GetSPCModelListbyGroup(llParam.GetSerialData(), false);
                    }
                }

                if (ds == null ||
                    ds.Tables.Count == 0)
                {
                    return;
                }

                if (this._Initialization.GetChartModeGrouping(Definition.PAGE_KEY_SPC_CONTROL_CHART_UC))
                {
                    LinkedList llstCondition = new LinkedList();
                    llstCondition.Add(Definition.CONDITION_KEY_CATEGORY, Definition.CODE_CATEGORY_CHART_MODE);
                    DataSet ds_chartmode = this.ws.GetCodeData(llstCondition.GetSerialData());

                    if (ds_chartmode == null || ds_chartmode.Tables[0].Rows.Count == 0)
                    {
                        return;
                    }
                    else
                    {
                        DataRow[] drSelect;

                        if (string.IsNullOrEmpty(row[COLUMN.RAWID].ToString()))
                        {
                            drSelect = ds.Tables[0].Select("GROUP_RAWID IS NULL", "SPC_MODEL_NAME ASC");
                        }
                        else
                        {
                            drSelect = ds.Tables[0].Select(string.Format("GROUP_RAWID = '{0}'", row[COLUMN.RAWID].ToString()), "SPC_MODEL_NAME ASC");
                        }

                        if (string.IsNullOrEmpty(row[COLUMN.RAWID].ToString()) && drSelect.Length == 0)
                        {
                            break;
                        }

                        groupNode = TreeDCUtil.CreateBTreeNode(row[COLUMN.GROUP_NAME].ToString(), row[COLUMN.GROUP_NAME].ToString(), row[COLUMN.GROUP_NAME].ToString());
                        groupNode.IsVisibleCheckBox = false;
                        groupNode.IsFolder          = true;
                        groupNode.IsVisibleNodeType = true;
                        ((DCValueOfTree)groupNode.Tag).ContextId = Definition.CONDITION_KEY_GROUP_NAME;
                        node.Nodes.Add(groupNode);

                        foreach (DataRow dRow in ds_chartmode.Tables[0].Rows)
                        {
                            DataRow[] drArrTemp;
                            if (String.IsNullOrEmpty(row[COLUMN.RAWID].ToString()))
                            {
                                drArrTemp = ds.Tables[0].Select(string.Format("CHART_MODE_CD = '{0}' AND GROUP_RAWID IS NULL", dRow["CODE"].ToString()));
                            }
                            else
                            {
                                drArrTemp = ds.Tables[0].Select(string.Format("CHART_MODE_CD = '{0}' AND GROUP_RAWID='{1}'", dRow["CODE"].ToString(), row[COLUMN.RAWID].ToString()));
                            }


                            if (drArrTemp.Length > 0)
                            {
                                BTreeNode chartNode = TreeDCUtil.CreateBTreeNode("CHART_MODE", dRow["CODE"].ToString(),
                                                                                 dRow["NAME"].ToString());
                                foreach (DataRow drTemp in drArrTemp)
                                {
                                    string sRawid        = drTemp[Definition.CONDITION_KEY_RAWID].ToString();
                                    string sSPCModelName = drTemp[Definition.CONDITION_KEY_SPC_MODEL_NAME].ToString();
                                    string sGroupRawid   = drTemp[COLUMN.GROUP_RAWID].ToString();

                                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPCMODEL, sRawid, sSPCModelName);
                                    ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.LOCATION_RAWID, drTemp[COLUMN.LOCATION_RAWID].ToString());
                                    ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.AREA_RAWID, drTemp[COLUMN.AREA_RAWID].ToString());
                                    btn.IsVisibleCheckBox = true;
                                    btn.IsFolder          = false;
                                    btn.IsVisibleNodeType = true;
                                    chartNode.Nodes.Add(btn);
                                }


                                groupNode.Nodes.Add(chartNode);
                            }
                        }

                        DataRow[] drArrnodefine = ds.Tables[0].Select("CHART_MODE_CD = 'NOT DEFINED'");

                        if (drArrnodefine.Length > 0)
                        {
                            BTreeNode node_nodefine = TreeDCUtil.CreateBTreeNode("CHART_MODE", "NOT DEFINED",
                                                                                 "NOT DEFINED");


                            foreach (DataRow drTemp in drArrnodefine)
                            {
                                string sRawid        = drTemp[Definition.CONDITION_KEY_RAWID].ToString();
                                string sSPCModelName = drTemp[Definition.CONDITION_KEY_SPC_MODEL_NAME].ToString();

                                BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPCMODEL, sRawid, sSPCModelName);
                                ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.LOCATION_RAWID, drTemp[COLUMN.LOCATION_RAWID].ToString());
                                ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.AREA_RAWID, drTemp[COLUMN.AREA_RAWID].ToString());
                                btn.IsVisibleCheckBox = true;
                                btn.IsFolder          = false;
                                btn.IsVisibleNodeType = true;
                                node_nodefine.Nodes.Add(btn);
                            }


                            groupNode.Nodes.Add(node_nodefine);
                        }
                    }

                    //added end
                }
                else
                {
                    DataRow[] drSelect;

                    if (string.IsNullOrEmpty(row[COLUMN.RAWID].ToString()))
                    {
                        drSelect = ds.Tables[0].Select("GROUP_RAWID IS NULL");
                    }
                    else
                    {
                        drSelect = ds.Tables[0].Select(string.Format("GROUP_RAWID = '{0}'", row[COLUMN.RAWID].ToString()));
                    }

                    if (string.IsNullOrEmpty(row[COLUMN.RAWID].ToString()) && drSelect.Length == 0)
                    {
                        break;
                    }

                    groupNode = TreeDCUtil.CreateBTreeNode(row[COLUMN.GROUP_NAME].ToString(), row[COLUMN.GROUP_NAME].ToString(), row[COLUMN.GROUP_NAME].ToString());
                    groupNode.IsVisibleCheckBox = false;
                    groupNode.IsFolder          = true;
                    groupNode.IsVisibleNodeType = true;
                    ((DCValueOfTree)groupNode.Tag).ContextId = Definition.CONDITION_KEY_GROUP_NAME;
                    node.Nodes.Add(groupNode);

                    if (drSelect.Length > 0)
                    {
                        foreach (DataRow dr in drSelect)
                        {
                            BTreeNode modelNode = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPCMODEL, dr[COLUMN.RAWID].ToString(), dr[COLUMN.SPC_MODEL_NAME].ToString());
                            ((DCValueOfTree)modelNode.Tag).AdditionalValue.Add(COLUMN.LOCATION_RAWID, sLineRawID);
                            ((DCValueOfTree)modelNode.Tag).AdditionalValue.Add(COLUMN.AREA_RAWID, sAreaRawID);
                            modelNode.IsVisibleCheckBox = true;
                            modelNode.IsFolder          = false;
                            modelNode.IsVisibleNodeType = true;
                            groupNode.Nodes.Add(modelNode);
                        }
                    }
                }
            }
        }
Esempio n. 27
0
        private void AddSPCModelNode()
        {
            DataSet ds      = null;
            DataSet dsGroup = new DataSet();

            if (this.dtArea == null)
            {
                LinkedList llstData = new LinkedList();

                llstData.Add(Definition.CONDITION_KEY_LINE_RAWID, this.LineRawid);
                llstData.Add(Definition.CONDITION_KEY_AREA_RAWID, this.AreaRawid);

                if (!string.IsNullOrEmpty(this.EqpModelName))
                {
                    llstData.Add(Definition.CONDITION_KEY_EQP_MODEL, EqpModelName);
                }

                if (!string.IsNullOrEmpty(this.ParamTypeCD))
                {
                    llstData.Add(Definition.DynamicCondition_Condition_key.PARAM_TYPE_CD, this.ParamTypeCD);
                }

                if (!string.IsNullOrEmpty(this.FilterValue))
                {
                    llstData.Add("FILTER", this.FilterValue);
                }

                if (this.LineRawid == null || this.LineRawid.Length == 0)
                {
                    return;
                }
                if (this.GetType().FullName == "BISTel.eSPC.Condition.Controls.Tree.XSPCModelTree")
                {
                    ds = _wsSPC.GetSPCModel(llstData.GetSerialData());
                }
                else if (this.GetType().FullName == "BISTel.eSPC.Condition.MET.Controls.Tree.XSPCModelTree")
                {
                    ds = _wsSPC.GetMETSPCModel(llstData.GetSerialData());
                }
                else if (this.GetType().FullName == "BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree")
                {
                    ds = _wsSPC.GetATTSPCModel(llstData.GetSerialData());
                }

                if (String.IsNullOrEmpty(this.ParamTypeCD))             //ATT
                {
                    dsGroup = _wsSPC.GetATTGroupList(llstData.GetSerialData());
                }

                else
                {
                    dsGroup = _wsSPC.GetGroupList(llstData.GetSerialData());
                }
            }
            else
            {
                List <string> lineRawids = new List <string>();
                List <string> areaRawids = new List <string>();

                foreach (DataRow dr in dtArea.Rows)
                {
                    areaRawids.Add(dr[DCUtil.VALUE_FIELD].ToString());
                    lineRawids.Add(dr[Definition.DynamicCondition_Search_key.LINE].ToString());
                }

                DataSet dsGroupList = new DataSet();

                for (int i = 0; i < dtArea.Rows.Count; i++)
                {
                    LinkedList llstData = new LinkedList();

                    llstData.Add(Definition.CONDITION_KEY_LINE_RAWID, lineRawids[i]);
                    llstData.Add(Definition.CONDITION_KEY_AREA_RAWID, areaRawids[i]);

                    if (String.IsNullOrEmpty(this.ParamTypeCD))
                    {
                        dsGroup = _wsSPC.GetATTGroupList(llstData.GetSerialData());
                    }

                    else
                    {
                        dsGroup = _wsSPC.GetGroupList(llstData.GetSerialData());
                    }

                    //if (dsGroupList.Tables.Count > 0)
                    //{
                    if (dsGroupList.Tables.Count == 0)
                    {
                        dsGroupList.Tables.Add(dsGroup.Tables[0].Copy());
                    }
                    else
                    {
                        dsGroupList.Tables[0].Merge(dsGroup.Tables[0].Copy());
                    }
                    //}
                }
                DataView dv = new DataView(dsGroupList.Tables[0]);
                dv.Sort = "GROUP_NAME ASC";
                dsGroup.Tables.Remove(dsGroup.Tables[0]);
                dsGroup.Tables.Add(dv.ToTable());

                ds = _wsSPC.GetSPCModelOfLines(lineRawids.ToArray(), areaRawids.ToArray(), EqpModelName, ParamTypeCD, FilterValue);
            }
            //SPC-1089 by stella - filter한 항목이 존재하지 않더라도 최상위 노드는 보이도록 수정.
            //if (ds == null || ds.Tables.Count <= 0 || ds.Tables[0].Rows.Count == 0)
            //{
            //    return;
            //}

            //SPC-880 by stella Group List 추가
            if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow[] drSelect = ds.Tables[0].Select("GROUP_RAWID IS NULL", "SPC_MODEL_NAME ASC");

                if (drSelect.Length > 0)
                {
                    DataRow drModel = dsGroup.Tables[0].NewRow();
                    drModel[COLUMN.GROUP_NAME] = Definition.VARIABLE_UNASSIGNED_MODEL;
                    dsGroup.Tables[0].Rows.Add(drModel);
                }
            }

            ArrayList arrGroup = new ArrayList();

            if (this.btnSPCModel == null)
            {
                this.btnSPCModel = TreeDCUtil.CreateBTreeNode("SPC MODEL LIST", "SPC MODEL LIST", "SPC MODEL LIST");
                btnSPCModel.IsVisibleCheckBox = false;
                btnSPCModel.IsFolder          = true;
                btnSPCModel.IsVisibleNodeType = true;
                this.XTreeView.Nodes.Add(btnSPCModel);
            }
            else
            {
                this.btnSPCModel.Nodes.Clear();
            }

            foreach (DataRow dr in dsGroup.Tables[0].Rows)
            {
                if (!arrGroup.Contains(dr[COLUMN.GROUP_NAME].ToString()))
                {
                    string    sGroupName = dr[COLUMN.GROUP_NAME].ToString();
                    DataRow[] drGroup    = dsGroup.Tables[0].Select(string.Format("GROUP_NAME = '{0}'", sGroupName), "GROUP_NAME ASC");

                    this.btnRoot = TreeDCUtil.CreateBTreeNode(dr[COLUMN.GROUP_NAME].ToString(), dr[COLUMN.GROUP_NAME].ToString(), dr[COLUMN.GROUP_NAME].ToString());
                    btnRoot.IsVisibleCheckBox = false;
                    btnRoot.IsFolder          = true;
                    btnRoot.IsVisibleNodeType = true;
                    ((DCValueOfTree)btnRoot.Tag).ContextId = Definition.CONDITION_KEY_GROUP_NAME;
                    btnSPCModel.Nodes.Add(btnRoot);

                    arrGroup.Add(btnRoot.Text);
                    //added by enkim chart mode group

                    //SPC-1292, KBLEE, ATT일 때와 아닐 때 각각의 xml file에서 설정값 불러오게 하기
                    bool isATTTree = this._Initialization.GetChartModeGrouping(Definition.PAGE_KEY_SPC_ATT_CONTROL_CHART_UC) &&
                                     this.GetType().FullName == "BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree";
                    bool isNormalTree = this._Initialization.GetChartModeGrouping(Definition.PAGE_KEY_SPC_CONTROL_CHART_UC) &&
                                        this.GetType().FullName != "BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree";

                    if (isATTTree || isNormalTree)
                    {
                        LinkedList llstCondition = new LinkedList();
                        llstCondition.Add(Definition.CONDITION_KEY_CATEGORY, Definition.CODE_CATEGORY_CHART_MODE);
                        DataSet ds_chartmode = _wsSPC.GetCodeData(llstCondition.GetSerialData());

                        if (ds_chartmode == null || ds_chartmode.Tables[0].Rows.Count == 0)
                        {
                            return;
                        }
                        else
                        {
                            //string sGroupName = dr[COLUMN.GROUP_NAME].ToString();
                            //DataRow[] drGroup = dsGroup.Tables[0].Select(string.Format("GROUP_NAME = '{0}'", sGroupName), "GROUP_NAME ASC");

                            foreach (DataRow dRow in drGroup)
                            {
                                foreach (DataRow row in ds_chartmode.Tables[0].Rows)
                                {
                                    DataRow[] drArrTemp;
                                    if (String.IsNullOrEmpty(dRow[COLUMN.RAWID].ToString()))
                                    {
                                        drArrTemp = ds.Tables[0].Select(string.Format("CHART_MODE_CD = '{0}' AND GROUP_RAWID IS NULL", row["CODE"].ToString()));
                                    }
                                    else
                                    {
                                        drArrTemp = ds.Tables[0].Select(string.Format("CHART_MODE_CD = '{0}' AND GROUP_RAWID='{1}'", row["CODE"].ToString(), dRow[COLUMN.RAWID].ToString()));
                                    }


                                    if (drArrTemp.Length > 0)
                                    {
                                        BTreeNode node = TreeDCUtil.CreateBTreeNode("CHART_MODE", row["CODE"].ToString(),
                                                                                    row["NAME"].ToString());

                                        foreach (DataRow drTemp in drArrTemp)
                                        {
                                            string sRawid        = drTemp[Definition.CONDITION_KEY_RAWID].ToString();
                                            string sSPCModelName = drTemp[Definition.CONDITION_KEY_SPC_MODEL_NAME].ToString();
                                            string sGroupRawid   = drTemp[COLUMN.GROUP_RAWID].ToString();

                                            BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPCMODEL, sRawid, sSPCModelName);
                                            ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.LOCATION_RAWID, drTemp[COLUMN.LOCATION_RAWID].ToString());
                                            ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.AREA_RAWID, drTemp[COLUMN.AREA_RAWID].ToString());
                                            btn.IsVisibleCheckBox = this.IsShowCheck;
                                            btn.IsFolder          = false;
                                            btn.IsVisibleNodeType = true;
                                            if (!this.IsLastNode)
                                            {
                                                btn.Nodes.Add(BTreeView.CreateDummyNode());
                                            }
                                            node.Nodes.Add(btn);
                                        }


                                        btnRoot.Nodes.Add(node);
                                    }
                                }

                                DataRow[] drArrnodefine = ds.Tables[0].Select("CHART_MODE_CD = 'NOT DEFINED'");

                                if (drArrnodefine.Length > 0)
                                {
                                    BTreeNode node_nodefine = TreeDCUtil.CreateBTreeNode("CHART_MODE", "NOT DEFINED",
                                                                                         "NOT DEFINED");


                                    foreach (DataRow drTemp in drArrnodefine)
                                    {
                                        string sRawid        = drTemp[Definition.CONDITION_KEY_RAWID].ToString();
                                        string sSPCModelName = drTemp[Definition.CONDITION_KEY_SPC_MODEL_NAME].ToString();

                                        BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPCMODEL, sRawid, sSPCModelName);
                                        ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.LOCATION_RAWID, drTemp[COLUMN.LOCATION_RAWID].ToString());
                                        ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.AREA_RAWID, drTemp[COLUMN.AREA_RAWID].ToString());
                                        btn.IsVisibleCheckBox = this.IsShowCheck;
                                        btn.IsFolder          = false;
                                        btn.IsVisibleNodeType = true;
                                        if (!this.IsLastNode)
                                        {
                                            btn.Nodes.Add(BTreeView.CreateDummyNode());
                                        }
                                        node_nodefine.Nodes.Add(btn);
                                    }


                                    btnRoot.Nodes.Add(node_nodefine);
                                }
                            }
                        }

                        //added end
                    }
                    else
                    {
                        foreach (DataRow row in drGroup)
                        {
                            string sGroupRawid = row[COLUMN.RAWID].ToString();

                            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                            {
                                string sRawid        = ds.Tables[0].Rows[i][Definition.CONDITION_KEY_RAWID].ToString();
                                string sSPCModelName = ds.Tables[0].Rows[i][Definition.CONDITION_KEY_SPC_MODEL_NAME].ToString();

                                if (sGroupRawid == ds.Tables[0].Rows[i][COLUMN.GROUP_RAWID].ToString())
                                {
                                    BTreeNode btn = TreeDCUtil.CreateBTreeNode(Definition.DynamicCondition_Search_key.SPCMODEL, sRawid, sSPCModelName);
                                    ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.LOCATION_RAWID, ds.Tables[0].Rows[i][COLUMN.LOCATION_RAWID].ToString());
                                    ((DCValueOfTree)btn.Tag).AdditionalValue.Add(COLUMN.AREA_RAWID, ds.Tables[0].Rows[i][COLUMN.AREA_RAWID].ToString());
                                    btn.IsVisibleCheckBox = this.IsShowCheck;
                                    btn.IsFolder          = false;
                                    btn.IsVisibleNodeType = true;
                                    if (!this.IsLastNode)
                                    {
                                        btn.Nodes.Add(BTreeView.CreateDummyNode());
                                    }

                                    btnRoot.Nodes.Add(btn);
                                }
                            }
                        }
                    }
                    btnRoot.ExpandAll();
                    //this.XTreeView.Nodes.Add(btnRoot);
                }
            }

            this.btnSPCModel.ExpandAll();
        }