/// <summary> /// 列表 /// </summary> /// <param name="vm"></param> /// <param name="pn"></param> /// <returns></returns> public ActionResult List(BusinessInfoVM vm, int pn = 1) { int totalCount, pageIndex = pn, pageSize = PagingConfig.PAGE_SIZE; var list = _businessInfoService.GetManagerList(vm.QueryName, vm.QueryType, pageIndex, pageSize, out totalCount); var paging = new Paging <BusinessInfo>() { Items = list, Size = PagingConfig.PAGE_SIZE, Total = totalCount, Index = pn, }; vm.Paging = paging; //获取所有系统用户名称 vm.SysAccountList = _sysAccountService.GetAll(); ////更新所有距离地铁站数据信息 //var alllist = _businessInfoService.GetManagerList("", 1, 1000, out totalCount); //foreach (var item in alllist) //{ // SetLocationInfo(item); //} return(View(vm)); }
public void InitData() { ISysAccountService roleService = IoC.Resolve <ISysAccountService>(); List <SysAccount> list = null; if (string.IsNullOrEmpty(code)) { list = roleService.GetAll().ToList(); } else { list = roleService.GetAll().Where(m => m.Code.Contains(code)).ToList(); } this.repList.DataSource = list; this.repList.DataBind(); }