示例#1
0
        public static string GetMenuChildUrl(int cid)
        {
            BLL.contents.article_category bll = new BLL.contents.article_category();
            int           id   = bll.GetParentId(cid);
            StringBuilder rStr = new StringBuilder();
            DataTable     dt   = bll.GetChildList(id, 6);

            if (dt != null && dt.Rows.Count > 0)
            {
                int num = 1;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (Convert.ToInt32(dt.Rows[i]["id"]) == cid)
                    {
                        rStr.Append(GetPageNameUrl(Convert.ToInt32(dt.Rows[i]["id"])));
                        rStr.Append("?IdF=" + dt.Rows[i]["parent_id"] + "&id=" + dt.Rows[i]["id"] + "&mId=" + num);
                    }
                    num++;
                }
            }
            return(rStr.ToString());
        }
示例#2
0
文件: BasePage.cs 项目: eyren/OScms
 public static string GetMenuChildUrl(int cid)
 {
     BLL.contents.article_category bll = new BLL.contents.article_category();
     int id = bll.GetParentId(cid);
     StringBuilder rStr = new StringBuilder();
     DataTable dt = bll.GetChildList(id, 6);
     if (dt != null && dt.Rows.Count > 0) {
         int num = 1;
         for (int i = 0; i < dt.Rows.Count; i++) {
             if (Convert.ToInt32(dt.Rows[i]["id"]) == cid) {
                 rStr.Append(GetPageNameUrl(Convert.ToInt32(dt.Rows[i]["id"])));
                 rStr.Append("?IdF=" + dt.Rows[i]["parent_id"] + "&id=" + dt.Rows[i]["id"] + "&mId=" + num);
             }
             num++;
         }
     }
     return rStr.ToString();
 }