public ActionResult Index(Guid id, SearchCondition searchCondition, PageInfo pageInfo, Guid?MenuIndexLevel1, Guid?MenuIndexLeve12) { //检测分页信息 PageInfoHelper.CheckedPageInfo(pageInfo, "Sort"); SearchPageInfo <MenuVM> search = new SearchPageInfo <MenuVM>() { PageInfo = pageInfo, SearchCondition = searchCondition }; Guid?parentNo = MenuIndexLeve12 ?? MenuIndexLevel1; if (parentNo.HasValue) { search.SearchCondition.Items.Add(new ConditionItem() { Field = "ParentNo", Method = QueryMethod.Equal, Value = parentNo.Value }); search = _moduleBizProcess.GetChildMenus(search); } else { search = _moduleBizProcess.GetMainMenus(search); } //设置分页信息到界面 ViewData.SetPageInfo(search.PageInfo); //设置状态信息 ViewBag.StatusList = DDLValueExtensions.EnumToSelectListItems <CommonStatus>(AppendItemType.All); //重新绑定查询信息到界面 ViewData.ReBindSearchData(searchCondition); var menuLevel1 = _moduleBizProcess.GetMainMenu(); ViewBag.MenuLevel1List = menuLevel1.ListToSelectListItems(x => { return(x.MenuName); }, x => { return(x.SysNo.ToString()); }, AppendItemType.All); var menuLevel2 = new List <MenuVM>(); if (MenuIndexLevel1.HasValue) { menuLevel2 = _moduleBizProcess.GetChildMenus(MenuIndexLevel1.Value); } ViewBag.MenuLevel2List = menuLevel2.ListToSelectListItems(x => { return(x.MenuName); }, x => { return(x.SysNo.ToString()); }, AppendItemType.All); ViewBag.navId = id.ToString(); return(View(search.DataList)); }
public ActionResult PermissionLookup(Guid id, SearchCondition searchCondition, PageInfo pageInfo) { //检测分页信息 PageInfoHelper.CheckedPageInfo(pageInfo, "PermissionController"); SearchPageInfo <PermissionVM> search = new SearchPageInfo <PermissionVM>() { PageInfo = pageInfo, SearchCondition = searchCondition }; search = _permissionBizProcess.GetLookupPermissions(search); //设置分页信息到界面 ViewData.SetPageInfo(search.PageInfo); //设置状态信息 ViewBag.StatusList = DDLValueExtensions.EnumToSelectListItems <CommonStatus>(AppendItemType.All); //重新绑定查询信息到界面 ViewData.ReBindSearchData(searchCondition); ViewBag.navId = id.ToString(); return(View(search.DataList)); }
public ActionResult Index(Guid id, SearchCondition searchCondition, PageInfo pageInfo) { //检测分页信息 PageInfoHelper.CheckedPageInfo(pageInfo, "CreateDate", SortOrder.desc); SearchPageInfo <SysUserVM> search = new SearchPageInfo <SysUserVM>() { PageInfo = pageInfo, SearchCondition = searchCondition }; search = _accountBizProcess.GetSysUsers(search); //设置分页信息到界面 ViewData.SetPageInfo(search.PageInfo); //设置状态信息 ViewBag.StatusList = DDLValueExtensions.EnumToSelectListItems <CommonStatus>(AppendItemType.All); //重新绑定查询信息到界面 ViewData.ReBindSearchData(searchCondition); ViewBag.navId = id.ToString(); return(View(search.DataList)); }