Esempio n. 1
0
 public ActionResult Index()
 {
     List<Model.MenuBase> menuList = new List<Model.MenuBase>(); ;
     BLL.MenuBase mbBLL = new BLL.MenuBase();
     ViewData["UserName"] = base.EmployeeBase.e_MingC;
     ViewData["UserId"] = base.EmployeeBase.e_ID;
     if (EmployeeBase.e_ID == Guid.Parse("7A571A64-EF3D-46D2-9B90-6356315ACFD1"))
     {
         menuList = mbBLL.GetModelList(" m_DeleteStateCode=0 and m_StateCode=0   order by m_PaiX ASC");
     }
     else
     {
         menuList = mbBLL.GetModelList(" m_DeleteStateCode=0 and m_StateCode=0 and m_ID in(select m_ID from RolesMenuDetails where r_ID in(select r_ID from EmpRolesDetails where e_ID='" + base.EmployeeBase.e_ID + "'))  order by m_PaiX ASC");
     }
     return View(menuList);
 }
 //Menu authority
 public ActionResult MenuAuthority()
 {
     ViewData["hf_IsManage"] = true; // new CRM.Public.RoleManager().IsHasFunRole(EmployeeInfo.e_ID, "006007001");//管理权限
     //string ParentId = "00000000-0000-0000-0000-000000000000";
     //var menuList = new BLL.MenuBase().GetModelList("m_ParentId='" + ParentId + "' and m_DeleteStateCode=0 and m_StateCode=0 order by m_PaiX");
     //所有菜单
     var menuList = new BLL.MenuBase().GetModelList(" m_DeleteStateCode=0 and m_StateCode=0 order by m_PaiX ASC");
     var MenuIds = rmdBLL.GetModelList(" r_ID='" + RequestBase.GetString("r_ID") + "'");//拥有菜单
     string RoleMenuIds = "";
     foreach (Model.RolesMenuDetails j in MenuIds)
     {
         RoleMenuIds += j.m_ID + ",";
     }
     ViewData["hfItems"] = RoleMenuIds;
     ViewData["hfRoleId"] = RequestBase.GetString("r_ID");
     return View(menuList.ToList());
 }