/// <summary> /// 获取该用户菜单树 父类->子类 /// </summary> /// <returns></returns> public static List <RoleForMenuManager.NewTree> GetMenuGroup() { var userid = SessionHelper.GetSession("userid"); var list = new List <RoleForMenuManager.NewTree>(); if (SessionHelper.GetSession("listrole" + "_" + userid) == null) { var listrole = UserForRoleManager.GetInstance().GetListRole(Convert.ToInt32(SessionHelper.GetSession("userid"))); if (listrole.Count > 0) { list = RoleForMenuManager.GetInstance().GetListMenu(listrole); } SessionHelper.SetSession("listrole" + "_" + userid, list); } list = (List <RoleForMenuManager.NewTree>)SessionHelper.GetSession("listrole" + "_" + userid); return(list); }
public static UserForRoleManager GetInstance() { return(_instance ?? (_instance = new UserForRoleManager())); }