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);
                        }
                    }
                }
            }
        }