// // GET: /Admin/ public ActionResult Index() { int userID = UserID; string result2=""; if (userID == 0) { ViewData["UserName"] = ""; ViewData["Msg"] = "����Ȩ���ʸ�ҳ"; return Redirect("/adminlogin/index.html"); //result2 = Public.UserHelper.LoginDeal(HttpContext, HttpUtility.UrlDecode(Public.PublicHelper.GetCookie("MyInfo", "Name")), Public.PublicHelper.GetCookie("MyInfo", "Code")); } if (result2 != "") { ViewData["UserName"] = ""; ViewData["Msg"] = result2; return Redirect("/adminlogin/index.html"); } else { bizSysFunction bsf = new bizSysFunction(); Public.AdminContext.AdminLeftMenu = bsf.GetLeftMenu(userID); Public.AdminContext.AdminFunctionList = bsf.GetByUserID(userID); if (Public.AdminContext.AdminFunctionList==null||Public.AdminContext.AdminFunctionList.Count == 0) return Redirect("/adminlogin/index.html"); return View(); } }
public ActionResult RightFunction(int id) { bizUsers bUser = new bizUsers(); bizSysFunction bs = new bizSysFunction(); bizSysFunctionType bst = new bizSysFunctionType(); bizUserXSysFunction bu = new bizUserXSysFunction(); ViewData["ListType"] = bst.List(); Users user = bUser.Get(id); ViewData["Users"]=user; ViewData["ListUser"] = bu.List(id); ViewData["List"] = bs.List(); ViewData["Bar"] = MenuBar.Start() .AddMenu("�û�Ȩ������", "/AdminSys/Right") .AddMenu("����" + user.UserName, "") .GetMenuHtml(); return View(); }