/// <summary> /// 用于绑定左侧菜单栏 /// </summary> public string BindLtr(int utid) { StringBuilder sb = new StringBuilder(); DataTable dt = new ManageBll().GetLeftMeauByUTID(utid); //获得一级菜单 DataRow[] first = dt.Select("ParentID=0"); sb.Append("<ul id='oneUl'>"); for (int i = 0; i < first.Length; i++) { sb.Append("<li onclick='changeDiv(this);' id='li" + first[i]["MID"] + "'>" + "<img src=\"lujing\" width='15px' height='15px' > " + first[i]["MenuName"]); //绑定二级菜单 DataRow[] two = dt.Select("ParentID=" + first[i]["MID"]); sb.Append("<ul onclick='changeDiv2(this);' style='display:none;' id='ul" + first[i]["MID"] + "'>"); for (int j = 0; j < two.Length; j++) { sb.Append("<a href='" + two[j]["WebUrl"] + "' target=\"iframe\"><li>" + two[j]["MenuName"]); sb.Append("</li></a>"); } sb.Append("</ul></li>"); } sb.Append("</ul>"); return(sb.ToString()); }
/// <summary> /// 登录功能 /// </summary> /// <param name="Wid">工号</param> /// <param name="Pwid">密码</param> /// <returns></returns> public int Logins(int Wid, int Pwid) { Manage m = bl.Select(Wid, Pwid); if (m != null) { Session["Id"] = m.Id; Session["Name"] = m.Name; Session["Depart"] = m.Depart; Session["Prower"] = m.PorwerId; return(1); } return(0); }