77 lines
3.5 KiB
C#
77 lines
3.5 KiB
C#
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 = "<li class='li-border'><a class='mystyle-color' href='Console.aspx' target='myFrameName' >管理控制台</a></li>";
|
|
if (CDDS!=null&&CDDS.Tables[0].Rows.Count>0)
|
|
{
|
|
foreach( DataRow cdr in CDDS.Tables[0].Rows )
|
|
{
|
|
Topcd += "<li class='dropdown li-border getycli' ><a href='" + cdr["gnurl"] + "' class='dropdown-toggle mystyle-color' data-toggle='dropdown'>" + cdr["mc"] + "<span class='caret'></span></a>";
|
|
|
|
DataSet EJCDDS = DBHlper.Execute("select * from nr_sys_mk where belongmkid='" + cdr["id"] + "' and isview='1' ORDER BY xh ");
|
|
Topcd+="<div class='dropdown-menu topbar-nav-list'> <div class='topbar-nav-col'><div class='topbar-nav-item'><p class='topbar-nav-item-title'>"+cdr["mc"]+"</p> <ul>";
|
|
if(EJCDDS!=null&&EJCDDS.Tables[0].Rows.Count>0)
|
|
{
|
|
int ejsl = 0;
|
|
foreach(DataRow ejcd in EJCDDS.Tables[0].Rows ){
|
|
if (ejsl == 4||ejsl==8)
|
|
{
|
|
Topcd += " </ul></div></div><div class='topbar-nav-col'><div class='topbar-nav-item'> <p class='topbar-nav-item-title'>   </p> <ul>";
|
|
}
|
|
Topcd += "<li><a href='" + ejcd["gnurl"] + "' target='myFrameName' > <span class='glyphicon glyphicon-th'></span> <span class=''>" + ejcd["mc"] + "</span> </a> </li>";
|
|
ejsl += 1;
|
|
}
|
|
}
|
|
Topcd += "</ul></div></div> </div> ";
|
|
|
|
}
|
|
Topcd += "<li class='li-border' ><a class='mystyle-color' onclick='setcdms(this)' title='显示隐藏菜单' href='#'>◀¦▶</a></li>";
|
|
}
|
|
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 += "<li> <div class='showtitle' style='width:100px;'><img src='img/leftimg.png' />" + s["cdmc"] + "</div> <a href='" + s["cddz"] + "' target='myFrameName' ><span class='sublist-icon glyphicon glyphicon-star-empty'></span><span class='sub-title'>" + s["cdmc"] + "</span></a></li><li>";
|
|
}
|
|
gnscul.InnerHtml = scgnst;
|
|
|
|
}
|
|
}
|
|
#endregion
|
|
} |