using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Maticsoft.Model; using System.Data; public partial class FrameMain : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["user"] == null) { Response.Redirect("../index.aspx"); } } getcdgn(); } #region 获取加载菜单选项卡 private void getcdgn() { nr_z_yhzh zh = (nr_z_yhzh)Session["user"]; usezh.InnerText = zh.zhanghao; //加载主功能菜单栏目 DataSet CDDS = DBHlper.Execute("select * from nr_sys_mkcd where jsid='" + zh.juese + "' ORDER BY xh"); //注释模块功能 //if (zh.id == 1 && zh.zhanghao == "admin") //{ CDDS = DBHlper.Execute("select * from nr_sys_mkarear where isview='1' ORDER BY xh"); //} string Topcd = "
  • 管理控制台
  • "; if (CDDS!=null&&CDDS.Tables[0].Rows.Count>0) { foreach( DataRow cdr in CDDS.Tables[0].Rows ) { Topcd += "
  • ◀¦▶
  • "; } Mkarear.InnerHtml = Topcd; //加载侧功能菜单栏目 zh.id = 1; DataSet SCGNDS = DBHlper.Execute("select * from nr_z_yh_kjcd where yonghu='" + zh.id + "'"); if (SCGNDS != null && SCGNDS.Tables[0].Rows.Count > 0) { string scgnst = ""; foreach (DataRow s in SCGNDS.Tables[0].Rows) { scgnst += "
  • " + s["cdmc"] + "
    " + s["cdmc"] + "
  • "; } gnscul.InnerHtml = scgnst; } } #endregion }