//数据绑定 private void RptBind() { Cms.BLL.C_Column bll = new Cms.BLL.C_Column(); DataTable dt = bll.GetList(0, Cms.Common.Enums.NavigationEnum.System.ToString()); this.rptList.DataSource = dt; this.rptList.DataBind(); bool bladd = adminUser.setpurview("频道管理", "add"); bool blEdit = adminUser.setpurview("频道管理", "Edit"); bool blDelete = adminUser.setpurview("频道管理", "Delete"); if (!bladd) { btnadd.Visible = false; } if (!blEdit) { btnSave.Visible = false; } if (!blDelete) { btnDelete.Visible = false; } }
/// <summary> /// 递归栏目信息 /// </summary> /// <param name="n"></param> public void ListControl_Bind(int n) { Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet dt = bllcolumn.GetList("parentId=" + n + "order by orderNumber desc"); dt.Tables[0].Columns.Add("Operate", typeof(string)); //操作 dt.Tables[0].Columns.Add("Colum", typeof(String)); //在dt中增加字段名为Colum的列 if (dt.Tables[0].Rows.Count > 0) { for (int i = 0; i < dt.Tables[0].Rows.Count; i++) { DataRow dr = dt.Tables[0].Rows[i]; string strchar = ""; dr["operate"] = "<a href='Column_edit.aspx?action=add&classid=" + dr["classid"].ToString() + "&parentId=" + dr["parentId"].ToString() + "'>[添加下级]</a> <a href='Column_edit.aspx?action=edit&classid=" + dr["classid"].ToString() + "&parentId=" + dr["parentId"].ToString() + "'>[编辑]</a> <a href='Column_list.aspx??action=del&classID=" + dr["classid"].ToString() + "&classname=" + dr["className"].ToString() + " ' onclick='return confirm(\"真的要删除该栏目以及子栏目和栏目下的新闻吗?不可恢复!\");'>[删除]</a> "; strchar += "<tr onmouseover=this.bgColor='#EBFFDC'; onmouseout=this.bgColor='#ffffff'; bgcolor='#ffffff'>"; strchar += "<td align=\"center\"><input type='checkbox'/></td> "; strchar += "<td align=\"left\">" + dr["classid"].ToString() + "</td> "; strchar += "<td align=\"left\" >" + dr["className"].ToString() + "</td>"; strchar += "<td align=\"center\" >" + GetClassisShowChannel(dr["isShowChannel"].ToString()) + "</td>"; strchar += "<td align=\"center\" >" + GetClassAttrbute(dr["modelId"].ToString()) + "</td>"; strchar += "<td align=\"left\" >" + dr["orderNumber"].ToString() + "</td>"; strchar += "<td align=\"center\" >" + dr["operate"].ToString() + "</td>"; strchar += "</tr>"; strchar = InitChild(dr, strchar, 2); dr["Colum"] = strchar; } } this.rptList.DataSource = dt; this.rptList.DataBind(); }
public static string getcloumnid(int classid) { string result = ""; Cms.BLL.C_Column bll = new Cms.BLL.C_Column(); DataSet ds = bll.GetList("parentId=" + classid); StringBuilder sbuBuilder = new StringBuilder(); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { sbuBuilder.Append(ds.Tables[0].Rows[i]["classId"].ToString() + ","); } if (sbuBuilder.Length > 1) { sbuBuilder.Remove(sbuBuilder.Length - 1, 1); } result = sbuBuilder.ToString(); } else { result = classid.ToString(); } return(result); }
/// <summary> /// 递归栏目信息 /// </summary> /// <param name="n"></param> public void ListControl_Bind(int n) { Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet dt = bllcolumn.GetList("parentId=" + n + ""); dt.Tables[0].Columns.Add("Operate", typeof(string)); //操作 dt.Tables[0].Columns.Add("Colum", typeof(String)); //在dt中增加字段名为Colum的列 if (dt.Tables[0].Rows.Count > 0) { for (int i = 0; i < dt.Tables[0].Rows.Count; i++) { DataRow dr = dt.Tables[0].Rows[i]; string strchar = ""; strchar += "<td style='white-space:nowrap;word-break:break-all;overflow:hidden;' >"; strchar += "<input id='rptList_ctl00_hidName' type='hidden' name='rptList$ctl00$hidName' Value='" + dr["className"].ToString() + "' runat='server' />"; strchar += "<input id=='rptList_ctl00_hidActionType' type='hidden' name='rptList$ctl00$hidActionType' Value='" + dr["action_type"].ToString() + "' runat='server' />"; strchar += "<input id='rptList_ctl00_hidLayer' type='hidden' name='rptList$ctl00$hidLayer' Value='" + dr["class_layer"].ToString() + "' runat='server' />"; strchar += "<span class='folder-open'></span>"; strchar += dr["className"].ToString(); strchar += "</td>"; strchar = InitChild(dr, strchar, 2); dr["Colum"] = strchar; } } this.rptList.DataSource = dt; this.rptList.DataBind(); }
private static string InitChildListNav(DataRow dr) { DataSet dtt = new Cms.BLL.C_Column().GetList("parentId=" + dr["classid"] + " and isShowChannel=1 order by orderNumber desc"); dtt.Tables[0].Columns.Add("Operate", typeof(string)); dtt.Tables[0].Columns.Add("Colum", typeof(String)); string temp = ""; string strchar = ""; if (dtt.Tables[0].Rows.Count > 0) { for (int k = 0; k < dtt.Tables[0].Rows.Count; k++) { DataRow dro = dtt.Tables[0].Rows[k]; Cms.BLL.C_Column bllcolumn1 = new Cms.BLL.C_Column(); DataSet dtt1 = bllcolumn1.GetList("parentId=" + dro["classid"] + " and isShowChannel=1 order by orderNumber desc"); if (dtt1.Tables[0].Rows.Count > 0) { DataRow dro1 = dtt.Tables[0].Rows[k]; strchar += "<li class='current'><a href='" + getCloumnUrl(Convert.ToInt32(dro1["classId"].ToString())) + "'>" + dro1["className"] + "</a><div class='submenu'>"; strchar += InitChildListNav(dro1); strchar += "</div></li>"; } else { temp += "<a href='" + getCloumnUrl(Convert.ToInt32(dro["classId"].ToString())) + "'><span>——</span> " + dro["className"].ToString() + "</a>"; } } } return(strchar + temp); }
private void NavBind() { Cms.BLL.C_Column bll = new Cms.BLL.C_Column(); DataTable ds = bll.GetList(0); this.rptList.DataSource = ds; this.rptList.DataBind(); }
public static string getCloumnIntro(int id) { string result = ""; Cms.BLL.C_Column bllColumn = new Cms.BLL.C_Column(); DataSet ds = bllColumn.GetList("classId=" + id); if (ds != null && ds.Tables[0].Rows.Count > 0) { result = GetToHtml(ds.Tables[0].Rows[0]["intro"].ToString()); } return(result); }
public static string getCloumnPicurl(int id) { string result = ""; Cms.BLL.C_Column bllColumn = new Cms.BLL.C_Column(); DataSet ds = bllColumn.GetList("classId=" + id); if (ds != null && ds.Tables[0].Rows.Count > 0) { result = ds.Tables[0].Rows[0]["photoUrl"].ToString(); } return(result); }
public void bind_RepeaterNav() { Cms.BLL.C_Column bllColumn = new Cms.BLL.C_Column(); DataSet ds = bllColumn.GetList("parentId=0 and nav_type='system' and isHidden=0 order by ordernumber desc"); string strNav = ""; string role_id = ""; string role_type = ""; HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["admin"]; if (cookie != null) { role_id = (string)cookie.Values["adminid"]; role_type = (string)cookie.Values["adminType"]; } else if (Session["adminid"] != null) { role_id = (string)Session["adminid"]; role_type = (string)Session["adminType"]; } Cms.BLL.C_admin_role_value bllrole_value = new Cms.BLL.C_admin_role_value(); if (ds != null && ds.Tables[0].Rows.Count > 0) { StringBuilder sbuBuilder = new StringBuilder(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { DataSet ds1 = null; if (role_type == "1") { ds1 = ds; } else { ds1 = bllrole_value.GetList("nav_name='" + ds.Tables[0].Rows[i]["className"].ToString() + "' and role_id=" + Convert.ToInt32(role_id)); } if (ds1 != null && ds1.Tables[0].Rows.Count > 0) { sbuBuilder.Append("<li><a href='index.aspx?id=" + ds.Tables[0].Rows[i]["classId"].ToString() + "'><i class='icon-" + i + "'></i><span>" + ds.Tables[0].Rows[i]["className"].ToString() + "</span></a></li>"); } else { continue; } } strNav = sbuBuilder.ToString(); } Application["strNav"] = strNav; }
private string InitChild(DataRow dr, string strchar, int n) { Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet dtt = bllcolumn.GetList("parentId=" + dr["classid"] + "order by orderNumber desc"); dtt.Tables[0].Columns.Add("Operate", typeof(string)); dtt.Tables[0].Columns.Add("Colum", typeof(String)); if (dtt.Tables[0].Rows.Count > 0) { string s = " "; for (int j = 1; j <= n; j++) { s += " "; } for (int k = 0; k < dtt.Tables[0].Rows.Count; k++) { DataRow dro = dtt.Tables[0].Rows[k]; string flag = "├"; if (dtt.Tables[0].Rows.Count == 1) { flag = "├"; } else { if (k == 0) { flag = "├"; } if (k == dtt.Tables[0].Rows.Count - 1) { flag = "├"; } } dro["operate"] = "<a href='Column_edit.aspx?action=add&classid=" + dro["classid"].ToString() + "&parentId=" + dro["parentId"].ToString() + "'>[添加下级]</a> <a href='Column_edit.aspx?action=edit&classid=" + dro["classid"].ToString() + "&parentId=" + dro["parentId"].ToString() + "'>[编辑]</a> <a href='Column_list.aspx?action=del&classid=" + dro["classid"].ToString() + "&classname=" + dro["className"].ToString() + " ' onclick='return confirm(\"真的要删除?栏目删除之后,该栏目下的新闻也将删除,不可恢复!\");'>[删除]</a>"; strchar += "<tr onmouseover=this.bgColor='#EBFFDC'; onmouseout=this.bgColor='#ffffff'; bgcolor='#ffffff'>"; strchar += "<td align=\"center\"><input type='checkbox'/></td> "; strchar += "<td align=\"left\">" + dro["classid"].ToString() + "</td> "; strchar += "<td align=\"left\" >" + s + flag + dro["className"].ToString() + "</td>"; strchar += "<td align=\"center\" >" + GetClassisShowChannel(dro["isShowChannel"].ToString()) + "</td>"; strchar += "<td align=\"center\" >" + GetClassAttrbute(dro["modelId"].ToString()) + "</td>"; strchar += "<td align=\"left\" >" + dro["orderNumber"].ToString() + "</td>"; strchar += "<td align=\"center\" >" + dro["Operate"].ToString() + "</td>"; strchar += "</tr>"; strchar = InitChild(dro, strchar, n + 8); } } return(strchar); }
public static string getContentUrlsub(int id) { string result = ""; Cms.BLL.C_Column bllColumn = new Cms.BLL.C_Column(); Cms.BLL.C_article bllarticle = new Cms.BLL.C_article(); int parentid = Convert.ToInt32(bllarticle.GetModel(id).parentId); DataSet ds = bllColumn.GetList("classId=" + parentid); if (ds != null && ds.Tables[0].Rows.Count > 0) { result = GetToHtml(ds.Tables[0].Rows[0]["contentUrl"].ToString()); } return(result); }
public void getcolumn() { Cms.BLL.C_Column bll = new Cms.BLL.C_Column(); DataTable dt = bll.GetList(26, Cms.Common.Enums.NavigationEnum.WebSite.ToString()); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { ListItem myitem = new ListItem(); myitem.Value = dt.Rows[i]["classId"].ToString(); myitem.Text = dt.Rows[i]["className"].ToString(); cblItem.Items.Add(myitem); } } }
private string InitChild(DataRow dr, string strchar, int n) { Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet dtt = bllcolumn.GetList("parentId=" + dr["classid"] + ""); dtt.Tables[0].Columns.Add("Operate", typeof(string)); dtt.Tables[0].Columns.Add("Colum", typeof(String)); if (dtt.Tables[0].Rows.Count > 0) { string s = " "; for (int j = 1; j <= n; j++) { s += " "; } for (int k = 0; k < dtt.Tables[0].Rows.Count; k++) { DataRow dro = dtt.Tables[0].Rows[k]; string flag = "├"; if (dtt.Tables[0].Rows.Count == 1) { flag = "├"; } else { if (k == 0) { flag = "├"; } if (k == dtt.Tables[0].Rows.Count - 1) { flag = "├"; } } strchar += "<td style='white-space:nowrap;word-break:break-all;overflow:hidden;' >"; strchar += "<input id='rptList_ctl00_hidName' type='hidden' name='rptList$ctl00$hidName' Value='" + dro["className"].ToString() + "' runat='server' />"; strchar += "<input id=='rptList_ctl00_hidActionType' type='hidden' name='rptList$ctl00$hidActionType' Value='" + dro["action_type"].ToString() + "' runat='server' />"; strchar += "<input id='rptList_ctl00_hidLayer' type='hidden' name='rptList$ctl00$hidLayer' Value='" + dro["class_layer"].ToString() + "' runat='server' />"; strchar += "<span class='folder-open'></span>"; strchar += dro["className"].ToString(); strchar += "</td>"; strchar = InitChild(dro, strchar, n + 8); } } return(strchar); }
public string getclasslayer(int parentId, int result) { string resultone = ""; Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); DataSet ds = bllcolumn.GetList("classId=" + parentId); if (ds != null && ds.Tables[0].Rows.Count > 0) { result = result + 1; int id = Convert.ToInt32(ds.Tables[0].Rows[0]["parentId"].ToString()); resultone = getclasslayer(id, result); } else { resultone = result.ToString(); } return(resultone); }
private void ChileNodeBind(DataRow drr, DropDownList parentId, int m) { Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet dss = bllcolumn.GetList("parentId=" + drr["classId"] + ""); if (dss.Tables[0].Rows.Count > 0) { string s = System.Web.HttpContext.Current.Server.HtmlDecode(" "); for (int j = 1; j <= m; j++) { s += System.Web.HttpContext.Current.Server.HtmlDecode(" "); } for (int k = 0; k < dss.Tables[0].Rows.Count; k++) { DataRow dro = dss.Tables[0].Rows[k]; string flag = "├"; if (dss.Tables[0].Rows.Count == 1) { flag = "├"; } else { if (k == 0) { flag = "├"; } if (k == dss.Tables[0].Rows.Count - 1) { flag = "├"; } } ListItem item = new ListItem(); item.Text = s + flag + dro["className"].ToString(); item.Value = dro["classId"].ToString(); parentId.Items.Add(item); ChileNodeBind(dro, parentId, m + 5); } } }
public void DropList_Bind() { cblItem.Items.Clear(); //parentId.Items.Add(new ListItem("作为一级分类", "0")); Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet ds = bllcolumn.GetList("parentId=26"); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { DataRow dr = ds.Tables[0].Rows[i]; ListItem item = new ListItem(); item.Text = "" + dr["className"].ToString(); item.Value = dr["classId"].ToString(); cblItem.Items.Add(item); ChileNodeBind(dr, cblItem, 2); } } }
public void DataBind(int classId) { Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column model = bllcolumn.GetModel(classId); DataSet ds = bllcolumn.GetList("classId=" + classId + ""); if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].Rows[0]; this.parentId.SelectedValue = model.parentId.ToString(); //上级栏目ID this.modelId.SelectedValue = model.modelId.ToString(); //栏目模型ID this.className.Text = model.className.ToString(); //栏目名称 this.sub_title.Text = model.sub_title.ToString(); //副名称 this.engName.Text = model.engName.ToString(); //栏目英文名称 this.orderNumber.Text = model.orderNumber.ToString(); //栏目排序 this.photoUrl.Value = model.photoUrl.ToString(); //栏目缩略图 this.photoUrlone.Value = model.photoUrlone.ToString(); //栏目图标True this.photoUrltwo.Value = model.photoUrltwo.ToString(); //栏目图标False string ShowChannel = model.isShowChannel.ToString(); if (ShowChannel == "0") { isShowChannel.Checked = false;//是否参与导航 0是参与导航 } else { isShowChannel.Checked = true;//是否参与导航 1是不参与导航 } string ShowNext = model.isShowNext.ToString(); if (ShowNext == "0") { isShowNext.Checked = false;//是否显示子栏目 0是显示 } else { isShowNext.Checked = true;//是否显示子栏目 1是隐藏 best_tab_item.Visible = true; best_tab_content.Visible = true; } string Blank = model.isBlank.ToString(); if (Blank == "0") { isBlank.Checked = false;//是否打开新窗口 0是不打开新窗口 } else { isBlank.Checked = true;//是否打开新窗口 1是打开新窗口 } string Hidden = model.isHidden.ToString(); if (Hidden == "0") { isHidden.Checked = false;//是否隐藏 0是显示 } else { isHidden.Checked = true; //是否隐藏 1是隐藏 } this.linkUrl.Text = model.linkUrl.ToString(); //外链地址 this.tplChannel.Text = model.tplChannel.ToString(); this.tplContent.Text = model.tplContent.ToString(); this.listinfopath.Text = model.listinfopath.ToString(); //后台列表信息地址 this.txtCallIndex.Text = model.name.ToString(); //调用别名 this.columnchose.Text = model.related.ToString(); //关联栏目 this.intro.Text = model.intro.ToString(); //栏目简介 this.content.Value = model.content.ToString(); //栏目内容 this.seoTitle.Text = model.seoTitle.ToString(); //SEO标题 this.seoKeyword.Text = model.seoKeyword.ToString(); //SEO关键字 this.seoDescription.Text = model.seoDescription.ToString(); //SEO描述 string wisShowChannel = model.w_isShowChannel.ToString(); //是否参与手机导航 0是参与导航 if (wisShowChannel == "0") { w_isShowChannel.Checked = false;//是否参与手机导航 1是不参与导航 } else { w_isShowChannel.Checked = true;//是否参与导航 1是不参与导航 wap_tab_item.Visible = true; wap_tab_content.Visible = true; } this.w_linkUrl.Text = model.w_linkUrl.ToString(); //手机链接地址 this.w_intro.Text = model.w_intro.ToString(); //手机站简介 this.w_content.Value = model.w_content.ToString(); //手机站内容 string eisShowChannel = model.e_isShowChannel.ToString(); //是否参与英文导航 0是参与导航 if (eisShowChannel == "0") { e_isShowChannel.Checked = false;//是否参与英文导航 1是不参与导航 } else { e_isShowChannel.Checked = true;//是否参与英文导航 1是不参与导航 english_tab_item.Visible = true; english_tab_content.Visible = true; } this.e_linkUrl.Text = model.e_linkUrl.ToString(); //手英文链接地址 this.e_intro.Text = model.e_intro.ToString(); //英文站简介 this.e_content.Value = model.e_content.ToString(); //英文站内容 this.e_seoTitle.Text = model.e_seoTitle.ToString(); //英文站SEO标题 this.e_seoKeyword.Text = model.e_seoKeyword.ToString(); //英文站SEO关键字 this.e_seoDescription.Text = model.e_seoDescription.ToString(); //英文站SEO描述 if (model.is_albums == 1) { cbIsAlbums.Checked = true; } if (model.is_attach == 1) { cbIsAttach.Checked = true; } txtPageSize.Text = model.page_size.ToString(); #region 赋值操作权限类型============================= string[] actionTypeArr = model.action_type.Split(','); for (int i = 0; i < cblActionType.Items.Count; i++) { for (int n = 0; n < actionTypeArr.Length; n++) { if (actionTypeArr[n].ToLower() == cblActionType.Items[i].Value.ToLower()) { cblActionType.Items[i].Selected = true; } } } #endregion #region 赋值扩展字段============================= if (model.channel_fields != null) { for (int i = 0; i < cblAttributeField.Items.Count; i++) { Cms.Model.C_Column_field modelt = model.channel_fields.Find(p => p.field_id == int.Parse(cblAttributeField.Items[i].Value)); //查找对应的字段ID if (modelt != null) { cblAttributeField.Items[i].Selected = true; } } } #endregion } }
public string ListControl_Bind(int n) { string role_id = ""; string role_type = ""; HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["admin"]; if (cookie != null) { role_id = (string)cookie.Values["adminid"]; role_type = (string)cookie.Values["adminType"]; } else if (Session["adminid"] != null) { role_id = (string)Session["adminid"]; role_type = (string)Session["adminType"]; } Cms.BLL.C_admin_role_value bllrole_value = new Cms.BLL.C_admin_role_value(); Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet dt = bllcolumn.GetList("parentId=" + n + "and isHidden=0 order by orderNumber desc"); string Temphtml = ""; dt.Tables[0].Columns.Add("Operate", typeof(string)); //操作 dt.Tables[0].Columns.Add("Colum", typeof(String)); //在dt中增加字段名为Colum的列 if (dt.Tables[0].Rows.Count > 0) { for (int i = 0; i < dt.Tables[0].Rows.Count; i++) { DataRow dr = dt.Tables[0].Rows[i]; string strchar = ""; string modelid = dr["modelId"].ToString(); string strhref = ""; if (modelid == "2")//文章模型 { strhref = "article/articlelist.aspx?classid=" + dr["classid"].ToString(); } else if (modelid == "3")//产品模型 { strhref = "article/productList.aspx?action=edit&classid=" + dr["classid"].ToString() + "&parentId=" + dr["parentId"].ToString(); } else if (modelid == "4")//单页模型 { strhref = "settings/SinglePage_edit.aspx?action=edit&classid=" + dr["classid"].ToString() + "&parentId=" + dr["parentId"].ToString(); } else if (modelid == "5") { strhref = "article/integralList.aspx?classid=" + dr["classid"].ToString(); } else { strhref = dr["listinfopath"].ToString() == "" ? "javascript:void(0);" : dr["listinfopath"].ToString(); } DataSet ds = null; if (role_type == "1") { ds = dt; } else { ds = bllrole_value.GetList("nav_name='" + dr["className"] + "' and role_id=" + Convert.ToInt32(role_id)); } if (ds != null && ds.Tables[0].Rows.Count > 0) { strchar += " <li><a class='item' target='mainframe' href='" + strhref + "'>" + dr["className"] + "</a><ul>"; strchar += InitChild(dr); strchar += "</ul></li>"; Temphtml += strchar; //this.files.InnerHtml = Temphtml; } else { Temphtml += strchar; //this.files.InnerHtml = Temphtml; } } } this.RepeaterColum.DataSource = dt; this.RepeaterColum.DataBind(); return(Temphtml.ToString()); }
private string InitChild(DataRow dr) { string role_id = ""; string role_type = ""; HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["admin"]; if (cookie != null) { role_id = (string)cookie.Values["adminid"]; role_type = (string)cookie.Values["adminType"]; } else if (Session["adminid"] != null) { role_id = (string)Session["adminid"]; role_type = (string)Session["adminType"]; } Cms.BLL.C_admin_role_value bllrole_value = new Cms.BLL.C_admin_role_value(); Cms.BLL.C_Column bllcolumn = new Cms.BLL.C_Column(); Cms.Model.C_Column modelcolumn = new Cms.Model.C_Column(); DataSet dtt = bllcolumn.GetList("parentId=" + dr["classid"] + "and isHidden=0 order by orderNumber desc"); dtt.Tables[0].Columns.Add("Operate", typeof(string)); dtt.Tables[0].Columns.Add("Colum", typeof(String)); string temp = ""; string strchar = ""; if (dtt.Tables[0].Rows.Count > 0) { for (int k = 0; k < dtt.Tables[0].Rows.Count; k++) { DataRow dro = dtt.Tables[0].Rows[k]; Cms.BLL.C_Column bllcolumn1 = new Cms.BLL.C_Column(); DataSet dtt1 = bllcolumn1.GetList("parentId=" + dro["classid"] + "and isHidden=0 order by orderNumber desc"); if (dtt1.Tables[0].Rows.Count > 0) { DataRow dro1 = dtt.Tables[0].Rows[k]; string modelid = dro["modelId"].ToString(); string strhref = ""; if (modelid == "2")//文章模型 { strhref = "article/articlelist.aspx?classid=" + dro["classid"].ToString(); } else if (modelid == "3")//产品模型 { strhref = "article/productList.aspx?action=edit&classid=" + dro["classid"].ToString() + "&parentId=" + dro["parentId"].ToString(); } else if (modelid == "4")//单页模型 { strhref = "settings/SinglePage_edit.aspx?action=edit&classid=" + dro["classid"].ToString() + "&parentId=" + dro["parentId"].ToString(); } else if (modelid == "5") { strhref = "article/integralList.aspx?classid=" + dro["classid"].ToString(); } else { strhref = dro["listinfopath"].ToString() == "" ? "javascript:void(0);" : dro["listinfopath"].ToString(); } DataSet ds = null; if (role_type == "1") { ds = dtt; } else { ds = bllrole_value.GetList("nav_name='" + dro["className"] + "' and role_id=" + Convert.ToInt32(role_id)); } if (ds != null && ds.Tables[0].Rows.Count > 0) { strchar += " <li><a class='item' href='" + strhref + "' target='mainframe'>" + dro["className"].ToString() + "</a><ul>"; strchar += InitChild(dro1); strchar += "</ul></li>"; } } else { string modelid = dro["modelId"].ToString(); string strhref = ""; if (modelid == "2")//文章模型 { strhref = "article/articlelist.aspx?classid=" + dro["classid"].ToString(); } else if (modelid == "3")//产品模型 { strhref = "article/productList.aspx?action=edit&classid=" + dro["classid"].ToString() + "&parentId=" + dro["parentId"].ToString(); } else if (modelid == "4")//单页模型 { strhref = "settings/SinglePage_edit.aspx?action=edit&classid=" + dro["classid"].ToString() + "&parentId=" + dro["parentId"].ToString(); } else if (modelid == "5") { strhref = "article/integralList.aspx?action=edit&classid=" + dro["classid"].ToString() + "&parentId=" + dro["parentId"].ToString(); } else { strhref = dro["listinfopath"].ToString() == "" ? "javascript:void(0);" : dro["listinfopath"].ToString(); } DataSet ds = null; if (role_type == "1") { ds = dtt; } else { ds = bllrole_value.GetList("nav_name='" + dro["className"] + "' and role_id=" + Convert.ToInt32(role_id)); } if (ds != null && ds.Tables[0].Rows.Count > 0) { temp += "<li>"; temp += "<a class='item' target='mainframe' href='" + strhref + "'>" + dro["className"].ToString() + "</a>"; temp += "</li>"; } } } } return(strchar + temp); }