public string DisplaySubCate(DataTable dt, string igparentid)
    {
        string s          = "";
        string CountChild = "";
        string valueCb    = "";
        string link       = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            link       = LinkUpdateCreate(dt.Rows[i]["IGID"].ToString(), igparentid);
            CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");
            if (igidParent.Equals(igparentid))
            {
                valueCb = "";
            }
            else
            {
                valueCb = igparentid + "_";
            }
            s += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\" >";
            s += "<div class=\"FormatCellItemOther\">";
            s += "<div class=\"pdCellItemOther\">";
            s += "<div class=\"cot1\"><input id=\"CbGroup_" + igidParent + "_" + valueCb + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + igidParent + "_" + valueCb + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot2\" align=\"left\">";
            if (!CountChild.Equals("0"))
            {
                s += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
            }
            s += TxtLevel + "&nbsp;" + dt.Rows[i]["VGNAME"].ToString();
            s += "<div class=\"cbh0\"><!----></div>";
            s += "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString(), ItemsTSql.GetItemsByViapp(app)) + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot4\" align=\"center\">" + CountChild + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox\" onchange=\"UpdateOrderCate_Hotel('" + dt.Rows[i]["IGID"].ToString() + "','" + igparentid + "')\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot7\">";
            s += "<a href=\"" + link + "\"><span class='iconEdit'><!----></span></a>";
            s += "<a href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
            s += "</div>";
            s += "<div class=\"cbh0\"><!----></div>";
            s += "</div>";
            s += "</div>";

            if (i != dt.Rows.Count - 1)
            {
                s += "<div class=\"PdSpaceRow\"><div class=\"SpaceRowOther\"><!----></div></div>";
            }
            s += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
            s += GetSubCate(dt.Rows[i]["IGID"].ToString());
            s += "</div>";
            s += "</div>";
        }
        return(s);
    }
Exemplo n.º 2
0
    public string DisplayCate(DataTable dt)
    {
        string s          = "";
        string CountChild = "";
        string link       = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            link       = LinkUpdateCate(dt.Rows[i]["IGID"].ToString(), "");
            CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");

            s += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\">";
            s += "<div class=\"FormatCellItem\">";
            s += "<div class=\"pdCellItem\">";
            s += "<div class=\"cot1\"><input id=\"CbGroup_" + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot2\" align=\"left\">";
            if (!CountChild.Equals("0"))
            {
                s += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
            }
            s += dt.Rows[i]["VGNAME"].ToString();
            s += "<div class=\"cbh0\"><!----></div>";
            s += "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString(), ItemsTSql.GetItemsByViapp(Modul)) + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot4\" align=\"center\">" + GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "") + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox\" onchange=\"UpdateOrderCate_Product('" + dt.Rows[i]["IGID"].ToString() + "','0')\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot7\">";
            if (ProductConfig.KeyHienThiThuocTinhLocSanPham)
            {
                s += "<a title=\"Click để thêm các thuộc tính lọc cho danh mục này\" href=\"javascript:NewWindow_('cms/admin/Moduls/Product/Cate/PopUp/PopupAddFilterPropertiesToCategory.aspx?igid=" + dt.Rows[i]["IGID"].ToString() + "','ImageList','900','500','no','no')\"><span class='iconLocAdd'><!----></span></a>";
                s += "&nbsp;&nbsp;&nbsp;";
            }
            s         += "<a href=\"" + link + "\"><span class='iconEdit'><!----></span></a>";
            s         += "&nbsp;&nbsp;&nbsp;";
            s         += "<a href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
            s         += "</div>";
            s         += "<div class=\"cbh0\"><!----></div>";
            s         += "</div>";
            s         += "</div>";
            igidParent = dt.Rows[i]["IGID"].ToString();
            s         += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
            s         += GetSubCate(dt.Rows[i]["IGID"].ToString());
            s         += "</div>";
            if (i != dt.Rows.Count - 1)
            {
                s += "<div class=\"PdSpaceRow\"><div class=\"SpaceRow\"><!----></div></div>";
            }
            s += "</div>";
        }

        return(s);
    }
    public string DisplayCate(DataTable dt)
    {
        string s          = "";
        string CountChild = "";
        string link       = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            link       = LinkUpdateCate(dt.Rows[i]["IGID"].ToString(), "");
            CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");

            s += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\">";
            s += "<div class=\"FormatCellItem\">";
            s += "<div class=\"pdCellItem\">";
            s += "<div class=\"cot1 box-cb\"><input id=\"CbGroup_" + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot2\" align=\"left\">";
            if (!CountChild.Equals("0"))
            {
                s += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
            }
            s += dt.Rows[i]["VGNAME"].ToString();
            s += "<div class=\"cbh0\"><!----></div>";
            s += "</div>";

            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString(), ItemsTSql.GetItemsByViapp(app)) + "</div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot4\" align=\"center\">" + GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "") + "</div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox box-stt\" onchange=\"UpdateOrderCate_AboutUs('" + dt.Rows[i]["IGID"].ToString() + "','0')\" /></div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot7 box-cc\">";
            s         += "<a title='Click để xem và thêm mới " + AboutUsKeyword.AboutUs2 + " cho danh mục này' href=\"" + UrlExtension.WebisteUrl + "admin.aspx?uc=" + app + "&igid=" + dt.Rows[i]["IGID"] + "&suc=" + TypePage.Item + "\"><span class='iconItem plus'><!----></span></a>";
            s         += "&nbsp;&nbsp;&nbsp;";
            s         += "<a title='Click để chỉnh sửa danh mục này' href=\"" + link + "\"><span class='iconEdit'><!----></span></a>";
            s         += "&nbsp;&nbsp;";
            s         += "<a title='Click để xóa danh mục này' href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
            s         += "</div>";
            s         += "<div class=\"cbh0\"><!----></div>";
            s         += "</div>";
            s         += "</div>";
            igidParent = dt.Rows[i]["IGID"].ToString();
            s         += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
            s         += GetSubCate(dt.Rows[i]["IGID"].ToString());
            s         += "</div>";
            if (i != dt.Rows.Count - 1)
            {
                s += "<div class=\"PdSpaceRow\"><div class=\"SpaceRow\"><!----></div></div>";
            }
            s += "</div>";
        }

        return(s);
    }
Exemplo n.º 4
0
    public string DisplayCate(DataTable dt)
    {
        string s          = "";
        string CountChild = "";
        string link       = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            link       = LinkUpdateCate(dt.Rows[i]["IGID"].ToString(), "");
            CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");

            s += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\">";
            s += "<div class=\"FormatCellItem\">";
            s += "<div class=\"pdCellItem\">";
            s += "<div class=\"cot1 box-cb\"><input id=\"CbGroup_" + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot2\" align=\"left\">";
            if (!CountChild.Equals("0"))
            {
                s += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
            }
            s         += dt.Rows[i]["VGNAME"].ToString();
            s         += "<div class=\"cbh0\"><!----></div>";
            s         += "</div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString()) + "</div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot4\" align=\"center\">" + SetPosition(dt.Rows[i]["VGPARAMS"].ToString()) + "</div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox box-stt\" onchange=\"UpdateOrderGroupItem_Deal('" + dt.Rows[i]["IGID"].ToString() + "','0')\" /></div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
            s         += "<div class=\"splitc\">|</div>";
            s         += "<div class=\"cot7 box-cc\">";
            s         += "<a href=\"javascript:void(0)\" onclick=\"NewWindow_('" + LinkAddItemToGroup(dt.Rows[i]["IGID"].ToString(), dt.Rows[i]["IGPARENTSID"].ToString(), dt.Rows[i]["VGNAME"].ToString()) + "','ImageList','800','450','yes','yes')\"><span class=\"ImageFolderAddRecord\"><!----></span></a>";
            s         += "&nbsp;&nbsp;&nbsp;";
            s         += "<a href=\"" + link + "\"><span class='iconEdit'><!----></span></a>";
            s         += "&nbsp;&nbsp;&nbsp;";
            s         += "<a href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
            s         += "</div>";
            s         += "<div class=\"cbh0\"><!----></div>";
            s         += "</div>";
            s         += "</div>";
            igidParent = dt.Rows[i]["IGID"].ToString();
            s         += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
            s         += GetSubCate(dt.Rows[i]["IGID"].ToString());
            s         += "</div>";
            if (i != dt.Rows.Count - 1)
            {
                s += "<div class=\"PdSpaceRow\"><div class=\"SpaceRow\"><!----></div></div>";
            }
            s += "</div>";
        }

        return(s);
    }
    public string DisplayCate(DataTable dt)
    {
        string s          = "";
        string CountChild = "";
        string link       = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            link       = LinkUpdateCate(dt.Rows[i]["IGID"].ToString(), "");
            CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");

            s += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\">";
            s += "<div class=\"FormatCellItem\">";
            s += "<div class=\"pdCellItem\">";
            s += "<div class=\"cot1\"><input id=\"CbGroup_" + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot2\" align=\"left\">";
            if (!CountChild.Equals("0"))
            {
                s += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
            }
            s += dt.Rows[i]["VGNAME"].ToString();
            s += "<div class=\"cbh0\"><!----></div>";
            s += "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString()) + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot4\" align=\"center\">" + GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "") + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox\" onchange=\"UpdateOrderGroup_Website('" + dt.Rows[i]["IGID"].ToString() + "','0')\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot7\">";

            if (WebsiteConfig.HienThiThemHinhAnhHoatDong)
            {
                s +=
                    "<a title='Click để thêm hình ảnh hoạt động' href=\"javascript:NewWindow_('cms/admin/Moduls/Website/Cate/PopUp/AddPictureToCate.aspx?igid=" +
                    dt.Rows[i]["IGID"].ToString() +
                    "','ImageList','950','600','yes','yes')\"><span class='iconThemAnh'><!----></span></a>";
                s += "&nbsp;&nbsp;&nbsp;";
            }

            s         += "<a href=\"" + link + "\"><span class='iconEdit'><!----></span></a>";
            s         += "&nbsp;&nbsp;&nbsp;";
            s         += "<a href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
            s         += "</div>";
            s         += "<div class=\"cbh0\"><!----></div>";
            s         += "</div>";
            s         += "</div>";
            igidParent = dt.Rows[i]["IGID"].ToString();
            s         += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
            s         += GetSubCate(dt.Rows[i]["IGID"].ToString());
            s         += "</div>";
            if (i != dt.Rows.Count - 1)
            {
                s += "<div class=\"PdSpaceRow\"><div class=\"SpaceRow\"><!----></div></div>";
            }
            s += "</div>";
        }

        return(s);
    }
Exemplo n.º 6
0
    public string DisplayCate(DataTable dt)
    {
        string s          = "";
        string CountChild = "";
        string link       = "";

        string linkAddReply = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            link         = LinkUpdateCate(dt.Rows[i]["IGID"].ToString(), "");
            linkAddReply = "  ";

            CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");

            s += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\">";
            s += "<div class=\"FormatCellItem\">";
            s += "<div class=\"pdCellItem\">";
            s += "<div class=\"cot1\"><input id=\"CbGroup_" + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot2\" align=\"left\">";
            if (!CountChild.Equals("0"))
            {
                s += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
            }
            s += dt.Rows[i]["VGNAME"].ToString();
            s += "<div class=\"cbh0\"><!----></div>";
            s += "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString()) + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot4\" align=\"center\">" + GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "") + "</div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox\" onchange=\"UpdateOrderCate_SupportOnline('" + dt.Rows[i]["IGID"].ToString() + "','0')\" /></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
            s += "<div class=\"splitc\">|</div>";
            s += "<div class=\"cot7\">";
            s += "<a href=\"javascript:void(0)\" onclick=\"NewWindow_('cms/admin/Moduls/Other/Vote/PopUp/AddQuestion.aspx?igid=" +
                 dt.Rows[i]["IGID"].ToString() + "&title=" +
                 dt.Rows[i]["VGNAME"].ToString() + "','ImageList','800','450','yes','yes')\"><span class='iconChat'><!----></span></a>";
            s         += "&nbsp;&nbsp;&nbsp;";
            s         += "<a href=\"" + link + "\" title=\"Quản lý danh sách câu trả lời\"><span class='iconEdit'><!----></span></a>";
            s         += "&nbsp;&nbsp;&nbsp;";
            s         += "<a href=\"javascript:DeleteRecGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
            s         += "</div>";
            s         += "<div class=\"cbh0\"><!----></div>";
            s         += "</div>";
            s         += "</div>";
            igidParent = dt.Rows[i]["IGID"].ToString();
            s         += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
            s         += GetSubCate(dt.Rows[i]["IGID"].ToString());
            s         += "</div>";
            if (i != dt.Rows.Count - 1)
            {
                s += "<div class=\"PdSpaceRow\"><div class=\"SpaceRow\"><!----></div></div>";
            }
            s += "</div>";
        }

        return(s);
    }
    string GetAllModul()
    {
        string str = "";

        if (igparentidCurrent.Equals("0"))
        {
            DataTable dt = new DataTable();
            fields    = "*";
            condition = GroupsTSql.GetGroupsCondition(language, Modul, "", " IGENABLE <> '2' ");
            orderBy   = " IGORDER ASC ";
            dt        = Groups.GetGroups(top, fields, condition, orderBy);


            string CountChild = "";

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    link       = LinkUpdateCate(dt.Rows[i]["IGID"].ToString(), "");
                    CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");

                    str += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\">";
                    str += "<div class=\"FormatCellItem\">";
                    str += "<div class=\"pdCellItem\">";
                    str += "<div class=\"cot1\"><input id=\"CbGroup_" + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
                    str += "<div class=\"splitc\">|</div>";
                    str += "<div class=\"cot2\" align=\"left\">";
                    if (!CountChild.Equals("0"))
                    {
                        str += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
                    }
                    str       += dt.Rows[i]["VGNAME"].ToString();
                    str       += "<div class=\"cbh0\"><!----></div>";
                    str       += "</div>";
                    str       += "<div class=\"splitc\">|</div>";
                    str       += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString()) + "</div>";
                    str       += "<div class=\"splitc\">|</div>";
                    str       += "<div class=\"cot4\" align=\"center\">" + SetPosition(dt.Rows[i]["VGPARAMS"].ToString()) + "</div>";
                    str       += "<div class=\"splitc\">|</div>";
                    str       += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox\" onchange=\"UpdateOrderGroupItem_Content('" + dt.Rows[i]["IGID"].ToString() + "','0')\" /></div>";
                    str       += "<div class=\"splitc\">|</div>";
                    str       += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
                    str       += "<div class=\"splitc\">|</div>";
                    str       += "<div class=\"cot7\">";
                    str       += "<a href=\"" + link + "\"><span class='iconEdit'><!----></span></a>";
                    str       += "&nbsp;&nbsp;&nbsp;";
                    str       += "<a href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
                    str       += "</div>";
                    str       += "<div class=\"cbh0\"><!----></div>";
                    str       += "</div>";
                    str       += "</div>";
                    str       += "</div>";
                    igidParent = dt.Rows[i]["IGID"].ToString();
                    str       += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
                    str       += GetSubCate(dt.Rows[i]["IGID"].ToString());
                    str       += "</div>";
                    if (i != dt.Rows.Count - 1)
                    {
                        str += "<div class=\"PdSpaceRow\"><div class=\"SpaceRow\"><!----></div></div>";
                    }
                }
            }
        }
        else
        {
            str = GetSubCate(igparentidCurrent);
        }

        return(str);
    }
    string GetSubCate(string igparentid)
    {
        top       = "";
        fields    = " * ";
        condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVgapp(Modul),
                                              GroupsTSql.GetGroupsByVglang(language),
                                              GroupsTSql.GetGroupsByIgparentid(igparentid), " IGENABLE <> '2' ");
        orderBy = " IGORDER ASC ";
        DataTable dt = new DataTable();

        dt = Groups.GetGroups(top, fields, condition, orderBy);
        string str        = "";
        string CountChild = "";
        string valueCb    = "";

        if (dt.Rows.Count > 0)
        {
            str      += "<div id=\"CateOrder-" + igparentid + "\" >";
            TxtLevel += "...";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                link       = LinkUpdateCate(dt.Rows[i]["IGID"].ToString(), igparentid);
                CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");
                if (igidParent.Equals(igparentid))
                {
                    valueCb = "";
                }
                else
                {
                    valueCb = igparentid + "_";
                }

                str += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\" >";
                str += "<div class=\"FormatCellItemOther\">";
                str += "<div class=\"pdCellItemOther\">";
                str += "<div class=\"cot1\"><input id=\"CbGroup_" + igidParent + "_" + valueCb + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + igidParent + "_" + valueCb + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot2\" align=\"left\">";
                if (!CountChild.Equals("0"))
                {
                    str += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
                }
                str += TxtLevel + "&nbsp;" + dt.Rows[i]["VGNAME"].ToString();
                str += "<div class=\"cbh0\"><!----></div>";
                str += "</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot3\" align=\"center\">" + GroupsExtension.CountItemInGroups(dt.Rows[i]["IGID"].ToString()) + "</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot4\" align=\"center\">" + CountChild + "</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot5\" align=\"center\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox\" onchange=\"UpdateOrderGroup_Content('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["IGPARENTID"].ToString() + "')\" /></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot6\" align=\"center\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot7\">";
                str += "<a href=\"" + link + "\"><span class='iconEdit'><!----></span></a>";
                str += "&nbsp;&nbsp;&nbsp;";
                str += "<a href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
                str += "</div>";
                str += "<div class=\"cbh0\"><!----></div>";
                str += "</div>";
                str += "</div>";

                if (i != dt.Rows.Count - 1)
                {
                    str += "<div class=\"PdSpaceRow\"><div class=\"SpaceRowOther\"><!----></div></div>";
                }
                str += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
                str += GetSubCate(dt.Rows[i]["IGID"].ToString());
                str += "</div>";
                str += "</div>";
            }
            str     += "</div>";
            TxtLevel = "...";
        }
        return(str);
    }