/// <summary>
    /// 后台频道列表
    /// </summary>
    protected void GetUserGroupList(int ParentId)
    {
        DataView dv = new DataView(dsList.Tables[0]);

        dv.RowFilter = "ParentId = " + ParentId;
        foreach (DataRowView dr in dv)
        {
            HttpContext.Current.Response.Write("<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">" + dr[0] + "</td>");
            HttpContext.Current.Response.Write("<td>");
            for (int i = 0; i < (int)dr[11]; i++)
            {
                HttpContext.Current.Response.Write("<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">");
            }
            HttpContext.Current.Response.Write(bUG.GetUserGroupIsSub((int)dr[0]));
            HttpContext.Current.Response.Write(StringDeal.StrFormat(dr[2]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\">" + bUG.GetModelTitle(dr[4]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\">" + GetUserCount(dr[0]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">");
            HttpContext.Current.Response.Write(" <a href=\"User_Manage.aspx?GroupId=" + dr[0] + "\">用户列表</a>");
            HttpContext.Current.Response.Write(" <a href=\"?Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(dr[10], "组") + "</a>");
            HttpContext.Current.Response.Write(" <a href=\"UserGroup_Edit.aspx?Id=" + dr[0] + "\">修改</a>");
            HttpContext.Current.Response.Write(" <a onClick=\"return confirm('确认删除')\" href=\"?Action=del&Id=" + dr[0] + "\">删除</a>");
            HttpContext.Current.Response.Write("</td></tr>");
            GetUserGroupList(StringDeal.ToInt(dr[0]));
        }
    }
    /// <summary>
    /// 后台频道列表
    /// </summary>
    protected void GetChannelList(int ParentId)
    {
        DataView dv = new DataView(dsList.Tables[0]);

        dv.RowFilter = "ParentId = " + ParentId;
        foreach (DataRowView dr in dv)
        {
            HttpContext.Current.Response.Write("<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">" + dr[0] + "</td>");
            HttpContext.Current.Response.Write("<td>");
            for (int i = 0; i < (int)dr[5]; i++)
            {
                HttpContext.Current.Response.Write("<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">");
            }
            HttpContext.Current.Response.Write(bC.GetChannelIsSub((int)dr[0]));
            HttpContext.Current.Response.Write(StringDeal.StrFormat(dr[2]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"left\">" + StringDeal.StrFormat(dr[3]) + "</td>");
            HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">");
            HttpContext.Current.Response.Write("<a href=\"?Action=up&Id=" + dr[0] + "\">上移</a>");
            HttpContext.Current.Response.Write(" <a href=\"?Action=down&Id=" + dr[0] + "\">下移</a>");
            HttpContext.Current.Response.Write(" <a href=\"?Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(dr[4], "频道") + "</a>");
            HttpContext.Current.Response.Write(" <a href=\"Channel_Edit.aspx?Id=" + dr[0] + "\">修改</a>");
            HttpContext.Current.Response.Write(" <a onClick=\"return confirm('确认删除')\" href=\"?Action=del&Id=" + dr[0] + "\">删除</a>");
            HttpContext.Current.Response.Write("</td></tr>");
            GetChannelList(StringDeal.ToInt(dr[0]));
        }
    }
Beispiel #3
0
    /// <summary>
    /// 栏目列表信息遍历
    /// </summary>
    /// <param name="ParentId"></param>
    /// <param name="Line"></param>
    protected void MenuListBind(int ParentId, string Line)
    {
        DataView dv = new DataView(dsList.Tables[0]);

        dv.RowFilter = "ParentId = " + ParentId;
        foreach (DataRowView dr in dv)
        {
            MenuList += "<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">\n";
            MenuList += "<td align=\"center\">" + dr[0] + "</td>\n";
            foreach (string j in GetField())
            {
                MenuList += "<td>";
                if (Getnext(Convert.ToInt32(dr[0])))
                {
                    MenuList += "<a href='../Model/Model_Manage.aspx?MenuId=" + dr[0] + "'>";
                }
                if (j == "Title")
                {
                    MenuList += Line + bM.GetMenuIsSub((int)dr[0]);
                }
                MenuList += StringDeal.StrFormat(dr[j]);
                if (Getnext(Convert.ToInt32(dr[0])))
                {
                    MenuList += "</a>";
                }
                MenuList += "</td>\n";
            }
            if (MenuId == 0)
            {
                MenuList += "<td align=\"center\" nowrap=\"nowrap\"><a href=\"MenuModel_Set.aspx?Id=" + dr[0] + "\" title=\"设置此栏目以及下属栏目的所需要字段\">栏目</a> <a href=\"Model_Set.aspx?Id=" + dr[0] + "\" title=\"设置此栏目以及下属栏目信息的所需要字段\">信息</a></td>";
            }
            MenuList += "<td align=\"center\" nowrap=\"nowrap\">";
            MenuList += "<a href=\"?MenuId=" + MenuId + "&Action=up&Id=" + dr[0] + "\">上移</a>";
            MenuList += " <a href=\"?MenuId=" + MenuId + "&Action=down&Id=" + dr[0] + "\">下移</a>";
            MenuList += " <a href=\"?MenuId=" + MenuId + "&Action=top&Id=" + dr[0] + "\">" + StringDeal.GetTop(StringDeal.ToBool(dr["IsTop"]), "栏目") + "</a>";
            MenuList += " <a href=\"?MenuId=" + MenuId + "&Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(StringDeal.ToBool(dr["IsLock"]), "栏目") + "</a>";
            MenuList += " <a href=\"Menu_Edit.aspx?MenuId=" + MenuId + "&Id=" + dr[0] + "\">修改</a>";
            MenuList += " <a onClick=\"return confirm('确认删除')\" href=\"?MenuId=" + MenuId + "&Action=del&Id=" + dr[0] + "\">删除</a>";
            MenuList += "</td>\n</tr>\n";
            MenuListBind(StringDeal.ToInt(dr[0]), "<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">" + Line);
        }
        Depth++;
    }