示例#1
0
        void Tree_BeforeExpand(object sender, TreeViewCancelEventArgs e)
        {
            DCValueOfTree dcValue = TreeDCUtil.GetDCValue(e.Node); // TreeNode에서 DCValueOfTree값을 추출.

            if (dcValue == null)
            {
                return;
            }

            if (dcValue.ContextId == Definition.CONDITION_SEARCH_KEY_AREA)
            {
                e.Node.Nodes.Clear();

                string sLineRawid = string.Empty;
                string sAreaRawid = string.Empty;

                System.Collections.Generic.List <DCValueOfTree> lstPathValue = TreeDCUtil.GetDCValueOfAllParent(e.Node); // 상위 노드의 선택된 값들을 가져온다.
                for (int i = 0; i < e.Node.Level; i++)
                {
                    if (lstPathValue[i].ContextId.Contains(Definition.CONDITION_SEARCH_KEY_LINE))
                    {
                        sLineRawid = lstPathValue[i].Value;
                    }
                }


                XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);

                //dcpTree.EqpID = dcValue.Value;
                spcModelTree.LineRawid = sLineRawid;
                spcModelTree.AreaRawid = dcValue.Value;

                spcModelTree.IsShowCheck    = true;
                spcModelTree.RecipeTypeCode = RecipeType.NONE;
                spcModelTree.ParamTypeCode  = ParameterType.NONE;
                spcModelTree.IsLastNode     = true;

                spcModelTree.AddRootNode(e.Node);
            }
        }
示例#2
0
        public void SetParentValue(LinkedList llParentValue)
        {
            #region Condition Table 구조 Setting

            bool bUseComponent = Configuration.GetConfig("configuration/general/componentcondition").GetAttribute("isuse", false);

            if (llParentValue.Count == 0 && ComponentCondition.GetInstance().Count > 0 && bUseComponent)
            {
                DataTable dtTemp = new DataTable();
                dtTemp.Columns.Add(Definition.CONDITION_SEARCH_KEY_VALUEDATA);
                dtTemp.Columns.Add(Definition.CONDITION_SEARCH_KEY_DISPLAYDATA);
                dtTemp.Columns.Add(Definition.CONDITION_SEARCH_KEY_CHECKED);

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_SITE))
                {
                    DataTable dtSite = dtTemp.Clone();
                    dtSite.Columns.Add(Definition.CONDITION_KEY_SITE);

                    DataRow dr = dtSite.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SITE);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SITE);
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "F";
                    dr[Definition.CONDITION_KEY_SITE] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SITE);
                    dtSite.Rows.Add(dr);

                    llParentValue.Add(Definition.DynamicCondition_Search_key.SITE, dtSite);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_FAB))
                {
                    DataTable dtFab = dtTemp.Clone();
                    dtFab.Columns.Add(Definition.CONDITION_KEY_FAB);
                    dtFab.Columns.Add(Definition.CONDITION_SEARCH_KEY_SITE);

                    DataRow dr = dtFab.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FAB);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FAB);
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "F";
                    dr[Definition.CONDITION_KEY_FAB]         = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FAB);
                    dr[Definition.CONDITION_SEARCH_KEY_SITE] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SITE);
                    dtFab.Rows.Add(dr);

                    llParentValue.Add(Definition.DynamicCondition_Search_key.FAB, dtFab);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_LINE))
                {
                    DataTable dtLine = dtTemp.Clone();
                    dtLine.Columns.Add(Definition.CONDITION_KEY_LINE);
                    dtLine.Columns.Add(Definition.CONDITION_SEARCH_KEY_FAB);
                    dtLine.Columns.Add(Definition.CONDITION_SEARCH_KEY_SITE);

                    DataRow dr = dtLine.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_LINE_RAWID);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_LINE);
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "F";
                    dr[Definition.CONDITION_KEY_LINE]        = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_LINE);
                    dr[Definition.CONDITION_SEARCH_KEY_FAB]  = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FAB);
                    dr[Definition.CONDITION_SEARCH_KEY_SITE] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SITE);
                    dtLine.Rows.Add(dr);

                    llParentValue.Add(Definition.DynamicCondition_Search_key.LINE, dtLine);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_AREA))
                {
                    DataTable _dtArea = dtTemp.Clone();
                    _dtArea.Columns.Add(Definition.CONDITION_KEY_AREA);
                    _dtArea.Columns.Add(Definition.CONDITION_SEARCH_KEY_LINE);
                    _dtArea.Columns.Add(Definition.CONDITION_SEARCH_KEY_FAB);
                    _dtArea.Columns.Add(Definition.CONDITION_SEARCH_KEY_SITE);

                    DataRow dr = _dtArea.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_AREA_RAWID);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_AREA);
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "T";
                    dr[Definition.CONDITION_KEY_AREA]        = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_AREA);
                    dr[Definition.CONDITION_SEARCH_KEY_LINE] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_LINE_RAWID);
                    dr[Definition.CONDITION_SEARCH_KEY_FAB]  = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FAB);
                    dr[Definition.CONDITION_SEARCH_KEY_SITE] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SITE);
                    _dtArea.Rows.Add(dr);

                    llParentValue.Add(Definition.DynamicCondition_Search_key.AREA, _dtArea);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_EQPMODEL))
                {
                    DataTable dtEQPModel = dtTemp.Clone();
                    dtEQPModel.Columns.Add(Definition.CONDITION_KEY_EQPMODEL);
                    dtEQPModel.Columns.Add(Definition.CONDITION_SEARCH_KEY_AREA);
                    dtEQPModel.Columns.Add(Definition.CONDITION_SEARCH_KEY_LINE);
                    dtEQPModel.Columns.Add(Definition.CONDITION_SEARCH_KEY_FAB);
                    dtEQPModel.Columns.Add(Definition.CONDITION_SEARCH_KEY_SITE);

                    DataRow dr = dtEQPModel.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_EQPMODEL);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_EQPMODEL);
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "T";
                    dr[Definition.CONDITION_KEY_EQPMODEL]           = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_EQPMODEL);
                    dr[Definition.CONDITION_SEARCH_KEY_AREA]        = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_AREA_RAWID);
                    dr[Definition.CONDITION_SEARCH_KEY_LINE]        = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_LINE_RAWID);
                    dr[Definition.CONDITION_SEARCH_KEY_FAB]         = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FAB);
                    dr[Definition.CONDITION_SEARCH_KEY_SITE]        = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SITE);
                    dtEQPModel.Rows.Add(dr);

                    llParentValue.Add(Definition.CONDITION_SEARCH_KEY_EQPMODEL, dtEQPModel);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_FILTER))
                {
                    DataTable _dtFilter = new DataTable();
                    _dtFilter.Columns.Add(Definition.CONDITION_SEARCH_KEY_VALUEDATA);
                    _dtFilter.Columns.Add(Definition.CONDITION_SEARCH_KEY_DISPLAYDATA);

                    DataRow dr = _dtFilter.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FILTER);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_FILTER);
                    _dtFilter.Rows.Add(dr);

                    llParentValue.Add(Definition.CONDITION_KEY_FILTER, _dtFilter);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_SPC_MODEL_LIST))
                {
                    DataTable dtSPCModelList = dtTemp.Clone();

                    DataRow dr = dtSPCModelList.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = "SPC MODEL LIST";
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = "SPC MODEL LIST";
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "F";

                    dtSPCModelList.Rows.Add(dr);

                    llParentValue.Add("SPC MODEL LIST", dtSPCModelList);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_GROUP_NAME))
                {
                    DataTable dtGroup = dtTemp.Clone();
                    dtGroup.Columns.Add("SPC MODEL LIST");

                    DataRow dr = dtGroup.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_GROUP_NAME);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_GROUP_NAME);
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "F";
                    dr["SPC MODEL LIST"] = "SPC MODEL LIST";

                    dtGroup.Rows.Add(dr);

                    llParentValue.Add(Definition.CONDITION_KEY_GROUP_NAME, dtGroup);
                }

                if (ComponentCondition.GetInstance().Contains(Definition.CONDITION_SEARCH_KEY_SPCMODEL))
                {
                    DataTable dtSPCModel = dtTemp.Clone();
                    dtSPCModel.Columns.Add(Definition.CONDITION_KEY_LOCATION_RAWID);
                    dtSPCModel.Columns.Add(Definition.CONDITION_KEY_AREA_RAWID);
                    dtSPCModel.Columns.Add(Definition.CONDITION_KEY_GROUP_NAME);
                    dtSPCModel.Columns.Add("SPC MODEL LIST");

                    DataRow dr = dtSPCModel.NewRow();
                    dr[Definition.CONDITION_SEARCH_KEY_VALUEDATA]   = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_MODEL_CONFIG_RAWID);
                    dr[Definition.CONDITION_SEARCH_KEY_DISPLAYDATA] = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_SPCMODEL);
                    dr[Definition.CONDITION_SEARCH_KEY_CHECKED]     = "T";
                    dr[Definition.CONDITION_KEY_LOCATION_RAWID]     = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_LINE_RAWID);
                    dr[Definition.CONDITION_KEY_AREA_RAWID]         = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_AREA_RAWID);
                    dr[Definition.CONDITION_KEY_GROUP_NAME]         = ComponentCondition.GetInstance().GetValue(Definition.CONDITION_SEARCH_KEY_GROUP_NAME);
                    dr["SPC MODEL LIST"] = "SPC MODEL LIST";

                    dtSPCModel.Rows.Add(dr);

                    llParentValue.Add(Definition.CONDITION_SEARCH_KEY_SPCMODEL, dtSPCModel);
                }
            }

            #endregion

            _btvCondition.Nodes.Clear();

            _llstParent = llParentValue;


            DataTable dt = null;
            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.LINE))
            {
                dt          = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.LINE];
                _sLineRawid = DCUtil.GetValueData(dt);
            }

            DataTable dtArea = null;
            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.AREA))
            {
                dtArea           = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.AREA];
                this._sAreaRawid = DataUtil.GetConditionKeyDataList(dtArea, DCUtil.VALUE_FIELD);
            }

            DataTable dtFilter = null;
            this._sFilter = "";
            if (_llstParent.Contains(Definition.CONDITION_KEY_FILTER))
            {
                dtFilter      = (DataTable)_llstParent[Definition.CONDITION_KEY_FILTER];
                this._sFilter = DataUtil.GetConditionKeyDataList(dtFilter, DCUtil.VALUE_FIELD);
            }

            if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_PARAM_TYPE))
            {
                dt            = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.PARAM_TYPE];
                _sParamTypeCD = DCUtil.GetValueData(dt);

                _btvCondition.Nodes.Clear();
                if (this.GetType().FullName == "BISTel.eSPC.Condition.Controls.ComboTree.XSPCModelTreeControl")
                {
                    XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                    spcModelTree.LineRawid = _sLineRawid;
                    spcModelTree.AreaRawid = _sAreaRawid;
                    if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
                    {
                        spcModelTree.EqpModelName = _sEQPModelName;
                    }
                    spcModelTree.ParamTypeCD    = _sParamTypeCD;
                    spcModelTree.IsShowCheck    = true;
                    spcModelTree.RecipeTypeCode = RecipeType.NONE;
                    spcModelTree.ParamTypeCode  = ParameterType.NONE;
                    spcModelTree.FilterValue    = this._sFilter;
                    spcModelTree.IsLastNode     = true;
                    spcModelTree.AddRootNode();
                }
                else if (this.GetType().FullName == "BISTel.eSPC.Condition.MET.Controls.ComboTree.XSPCModelTreeControl")
                {
                    BISTel.eSPC.Condition.MET.Controls.Tree.XSPCModelTree spcModelTree = new BISTel.eSPC.Condition.MET.Controls.Tree.XSPCModelTree(_btvCondition);
                    spcModelTree.LineRawid = _sLineRawid;
                    spcModelTree.AreaRawid = _sAreaRawid;
                    if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
                    {
                        spcModelTree.EqpModelName = _sEQPModelName;
                    }
                    spcModelTree.ParamTypeCD    = _sParamTypeCD;
                    spcModelTree.IsShowCheck    = true;
                    spcModelTree.RecipeTypeCode = RecipeType.NONE;
                    spcModelTree.ParamTypeCode  = ParameterType.NONE;
                    spcModelTree.FilterValue    = this._sFilter;
                    spcModelTree.IsLastNode     = true;
                    spcModelTree.AddRootNode();
                }
                else if (this.GetType().FullName == "BISTel.eSPC.Condition.ATT.Controls.ComboTree.XSPCModelTreeControl")
                {
                    BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree spcModelTree = new BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree(_btvCondition);
                    spcModelTree.LineRawid = _sLineRawid;
                    spcModelTree.AreaRawid = _sAreaRawid;
                    if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
                    {
                        spcModelTree.EqpModelName = _sEQPModelName;
                    }
                    spcModelTree.ParamTypeCD    = _sParamTypeCD;
                    spcModelTree.IsShowCheck    = true;
                    spcModelTree.RecipeTypeCode = RecipeType.NONE;
                    spcModelTree.ParamTypeCode  = ParameterType.NONE;
                    spcModelTree.FilterValue    = this._sFilter;
                    spcModelTree.IsLastNode     = true;
                    spcModelTree.AddRootNode();
                }
            }
            if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
            {
                if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_EQPMODEL))
                {
                    _btvCondition.Nodes.Clear();

                    dt = (DataTable)_llstParent[Definition.CONDITION_SEARCH_KEY_EQPMODEL];
                    this._sEQPModelName = DataUtil.GetConditionKeyDataList(dt, DCUtil.VALUE_FIELD, true);
                    if (this.GetType().FullName == "BISTel.eSPC.Condition.Controls.ComboTree.XSPCModelTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.LineRawid      = _sLineRawid;
                        spcModelTree.AreaRawid      = _sAreaRawid;
                        spcModelTree.EqpModelName   = _sEQPModelName;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.FilterValue    = this._sFilter;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.MET.Controls.ComboTree.XSPCModelTreeControl")
                    {
                        BISTel.eSPC.Condition.MET.Controls.Tree.XSPCModelTree spcModelTree = new BISTel.eSPC.Condition.MET.Controls.Tree.XSPCModelTree(_btvCondition);
                        spcModelTree.LineRawid      = _sLineRawid;
                        spcModelTree.AreaRawid      = _sAreaRawid;
                        spcModelTree.EqpModelName   = _sEQPModelName;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.FilterValue    = this._sFilter;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.ATT.Controls.ComboTree.XSPCModelTreeControl")
                    {
                        BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree spcModelTree = new BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree(_btvCondition);
                        spcModelTree.LineRawid = _sLineRawid;
                        spcModelTree.AreaRawid = _sAreaRawid;
                        if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
                        {
                            spcModelTree.EqpModelName = _sEQPModelName;
                        }
                        spcModelTree.ParamTypeCD    = _sParamTypeCD;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.FilterValue    = this._sFilter;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                }
            }
            else
            {
                if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_AREA) || _llstParent.Contains(Definition.CONDITION_KEY_AREA))
                {
                    _btvCondition.Nodes.Clear();
                    if (this.GetType().FullName == "BISTel.eSPC.Condition.Controls.ComboTree.XSPCModelTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.LineRawid      = _sLineRawid;
                        spcModelTree.AreaRawid      = _sAreaRawid;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.FilterValue    = this._sFilter;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.MET.Controls.ComboTree.XSPCModelTreeControl")
                    {
                        BISTel.eSPC.Condition.MET.Controls.Tree.XSPCModelTree spcModelTree = new BISTel.eSPC.Condition.MET.Controls.Tree.XSPCModelTree(_btvCondition);
                        spcModelTree.LineRawid      = _sLineRawid;
                        spcModelTree.AreaRawid      = _sAreaRawid;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.FilterValue    = this._sFilter;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.ATT.Controls.ComboTree.XSPCModelTreeControl")
                    {
                        BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree spcModelTree = new BISTel.eSPC.Condition.ATT.Controls.Tree.XSPCModelTree(_btvCondition);
                        spcModelTree.LineRawid = _sLineRawid;
                        spcModelTree.AreaRawid = _sAreaRawid;
                        if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
                        {
                            spcModelTree.EqpModelName = _sEQPModelName;
                        }
                        spcModelTree.ParamTypeCD    = _sParamTypeCD;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.FilterValue    = this._sFilter;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                }
            }

            _btvCondition.CheckCountType = BTreeView.CheckCountTypes.Single;
        }
示例#3
0
        public void SetParentValue(LinkedList llParentValue)
        {
            _llstParent = llParentValue;
            DataTable dt = null;

            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.PARAM_TYPE))
            {
                dt            = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.PARAM_TYPE];
                _sParamTypeCD = DCUtil.GetValueData(dt);
            }

            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.SITE))
            {
                dt          = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.SITE];
                this._sSite = DCUtil.GetValueData(dt);
            }

            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.FAB))
            {
                dt    = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.FAB];
                _sFab = DCUtil.GetValueData(dt);
            }

            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.LINE))
            {
                dt          = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.LINE];
                _dtLine     = dt;
                _sLineRawid = DCUtil.GetValueData(dt);
            }
            else
            {
                _dtLine = null;
            }

            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.AREA))
            {
                dt          = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.AREA];
                _dtArea     = dt;
                _sAreaRawid = DataUtil.GetConditionKeyDataList(dt, DCUtil.VALUE_FIELD);
            }
            else
            {
                _dtArea = null;
            }

            DataTable dtFilter = null;

            this._sFilter = "";
            if (_llstParent.Contains("FILTER"))
            {
                dtFilter      = (DataTable)_llstParent["FILTER"];
                this._sFilter = DataUtil.GetConditionKeyDataList(dtFilter, DCUtil.VALUE_FIELD);
            }


            _btvCondition.Nodes.Clear();

            if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_PARAM_TYPE))
            {
                XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                spcModelTree.dtLine = _dtLine;
                spcModelTree.dtArea = _dtArea;
                if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
                {
                    spcModelTree.EqpModelName = _sEQPModelName;
                }
                spcModelTree.ParamTypeCD    = _sParamTypeCD;
                spcModelTree.IsShowCheck    = true;
                spcModelTree.RecipeTypeCode = RecipeType.NONE;
                spcModelTree.ParamTypeCode  = ParameterType.NONE;
                spcModelTree.IsLastNode     = true;
                spcModelTree.FilterValue    = _sFilter;
                spcModelTree.AddRootNode();

                ToolStripMenuItem tsmi_SelectAll = new ToolStripMenuItem();
                tsmi_SelectAll.Text = "Select All";
                ToolStripMenuItem tsmi_ClearAll = new ToolStripMenuItem();
                tsmi_ClearAll.Text = "Clear Selection";

                this._btvCondition.AddContextMenu(tsmi_SelectAll);
                this._btvCondition.AddContextMenu(tsmi_ClearAll);

                tsmi_SelectAll.Click += new EventHandler(tsmi_SelectAll_Click);
                tsmi_ClearAll.Click  += new EventHandler(tsmi_ClearAll_Click);
            }

            if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
            {
                if (_llstParent.Contains(Definition.DynamicCondition_Search_key.EQPMODEL))
                {
                    dt = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.EQPMODEL];
                    this._sEQPModelName = DataUtil.GetConditionKeyDataList(dt, DCUtil.VALUE_FIELD, true);
                    if (this.GetType().FullName == "BISTel.eSPC.Condition.Controls.ComboTree.XSPCModelsTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.dtLine         = _dtLine;
                        spcModelTree.dtArea         = _dtArea;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.EqpModelName   = _sEQPModelName;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.FilterValue    = _sFilter;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.MET.Controls.ComboTree.XSPCModelsTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.dtLine         = _dtLine;
                        spcModelTree.dtArea         = _dtArea;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.EqpModelName   = _sEQPModelName;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.FilterValue    = _sFilter;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.ATT.Controls.ComboTree.XSPCModelsTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.dtLine         = _dtLine;
                        spcModelTree.dtArea         = _dtArea;
                        spcModelTree.ParamTypeCD    = _sParamTypeCD;
                        spcModelTree.EqpModelName   = _sEQPModelName;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.FilterValue    = _sFilter;
                        spcModelTree.AddRootNode();
                    }
                    if (_btvCondition.CheckCountType == BTreeView.CheckCountTypes.Multi)
                    {
                        ToolStripMenuItem tsmi_SelectAll = new ToolStripMenuItem();
                        tsmi_SelectAll.Text = "Select All";
                        ToolStripMenuItem tsmi_ClearAll = new ToolStripMenuItem();
                        tsmi_ClearAll.Text = "Clear Selection";

                        this._btvCondition.AddContextMenu(tsmi_SelectAll);
                        this._btvCondition.AddContextMenu(tsmi_ClearAll);

                        tsmi_SelectAll.Click += new EventHandler(tsmi_SelectAll_Click);
                        tsmi_ClearAll.Click  += new EventHandler(tsmi_ClearAll_Click);
                    }
                }
            }
            else
            {
                if (_llstParent.Contains(Definition.DynamicCondition_Search_key.AREA))
                {
                    if (this.GetType().FullName == "BISTel.eSPC.Condition.Controls.ComboTree.XSPCModelsTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.dtLine         = _dtLine;
                        spcModelTree.dtArea         = _dtArea;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.FilterValue    = _sFilter;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.MET.Controls.ComboTree.XSPCModelsTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.dtLine         = _dtLine;
                        spcModelTree.dtArea         = _dtArea;
                        spcModelTree.ParamTypeCD    = "MET";
                        spcModelTree.FilterValue    = _sFilter;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                    else if (this.GetType().FullName == "BISTel.eSPC.Condition.ATT.Controls.ComboTree.XSPCModelsTreeControl")
                    {
                        XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                        spcModelTree.dtLine         = _dtLine;
                        spcModelTree.dtArea         = _dtArea;
                        spcModelTree.ParamTypeCD    = _sParamTypeCD;
                        spcModelTree.FilterValue    = _sFilter;
                        spcModelTree.IsShowCheck    = true;
                        spcModelTree.RecipeTypeCode = RecipeType.NONE;
                        spcModelTree.ParamTypeCode  = ParameterType.NONE;
                        spcModelTree.IsLastNode     = true;
                        spcModelTree.AddRootNode();
                    }
                    if (_btvCondition.CheckCountType == BTreeView.CheckCountTypes.Multi)
                    {
                        ToolStripMenuItem tsmi_SelectAll = new ToolStripMenuItem();
                        tsmi_SelectAll.Text = "Select All";
                        ToolStripMenuItem tsmi_ClearAll = new ToolStripMenuItem();
                        tsmi_ClearAll.Text = "Clear Selection";

                        this._btvCondition.AddContextMenu(tsmi_SelectAll);
                        this._btvCondition.AddContextMenu(tsmi_ClearAll);

                        tsmi_SelectAll.Click += new EventHandler(tsmi_SelectAll_Click);
                        tsmi_ClearAll.Click  += new EventHandler(tsmi_ClearAll_Click);
                    }
                }
            }
        }
        public void SetParentValue(LinkedList llParentValue)
        {
            _btvCondition.Nodes.Clear();

            _llstParent = llParentValue;
            DataTable dt = null;


            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.PARAM_TYPE))
            {
                dt            = (DataTable)_llstParent[Definition.DynamicCondition_Search_key.PARAM_TYPE];
                _sParamTypeCD = DCUtil.GetValueData(dt);
            }


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

            if (_llstParent.Contains(Definition.DynamicCondition_Search_key.AREA))
            {
                dt          = (DataTable)_llstParent[Definition.CONDITION_SEARCH_KEY_AREA];
                _sAreaRawid = DataUtil.GetConditionKeyDataList(dt, DCUtil.VALUE_FIELD);
            }


            if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_PARAM_TYPE))
            {
                _btvCondition.Nodes.Clear();
                XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                spcModelTree.LineRawid = _sLineRawid;
                spcModelTree.AreaRawid = _sAreaRawid;
                if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
                {
                    spcModelTree.EqpModelName = _sEQPModelName;
                }
                spcModelTree.ParamTypeCD    = _sParamTypeCD;
                spcModelTree.IsShowCheck    = false;
                spcModelTree.RecipeTypeCode = RecipeType.NONE;
                spcModelTree.ParamTypeCode  = ParameterType.NONE;
                spcModelTree.IsLastNode     = false;
                spcModelTree.AddRootNode();
            }
            if (this._sSPCModelLevel.Equals(Definition.CONDITION_KEY_EQP_MODEL))
            {
                if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_EQPMODEL))
                {
                    dt = (DataTable)_llstParent[Definition.CONDITION_SEARCH_KEY_EQPMODEL];
                    this._sEQPModelName = DataUtil.GetConditionKeyDataList(dt, DCUtil.VALUE_FIELD, true);

                    XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                    spcModelTree.LineRawid      = _sLineRawid;
                    spcModelTree.AreaRawid      = _sAreaRawid;
                    spcModelTree.EqpModelName   = _sEQPModelName;
                    spcModelTree.ParamTypeCD    = _sParamTypeCD;
                    spcModelTree.IsShowCheck    = false;
                    spcModelTree.RecipeTypeCode = RecipeType.NONE;
                    spcModelTree.ParamTypeCode  = ParameterType.NONE;
                    spcModelTree.IsLastNode     = false;
                    spcModelTree.AddRootNode();
                }
            }
            else
            {
                if (_llstParent.Contains(Definition.CONDITION_SEARCH_KEY_AREA))
                {
                    XSPCModelTree spcModelTree = new XSPCModelTree(_btvCondition);
                    spcModelTree.LineRawid      = _sLineRawid;
                    spcModelTree.AreaRawid      = _sAreaRawid;
                    spcModelTree.ParamTypeCD    = _sParamTypeCD;
                    spcModelTree.IsShowCheck    = false;
                    spcModelTree.RecipeTypeCode = RecipeType.NONE;
                    spcModelTree.ParamTypeCode  = ParameterType.NONE;
                    spcModelTree.IsLastNode     = false;
                    spcModelTree.AddRootNode();
                }
            }
        }