public ActionResult ApproverList() { using (var db = new XkSystem.Models.DbContext()) { var vm = new Models.WeApprover.ApproverList(); vm.FlowApprovalNodeName = db.Set <Wechat.Entity.tbWeOAFlowNode>().Find(vm.FlowApprovalNodeId).FlowApprovalNode; var tb = from p in db.Table <Wechat.Entity.tbWeOAFlowApprover>() where p.tbWeOAFlowNode.Id == vm.FlowApprovalNodeId && p.tbSysUser.IsDeleted == false select p; if (string.IsNullOrEmpty(vm.SearchText) == false) { tb = tb.Where(d => d.tbSysUser.UserCode.Contains(vm.SearchText) || d.tbSysUser.UserName.Contains(vm.SearchText)); } vm.WeApproverList = (from p in tb orderby p.tbSysUser.UserCode select new Dto.WeApprover.ApproverList { Id = p.Id, SysUserCode = p.tbSysUser.UserCode, SysUserName = p.tbSysUser.UserName }).ToPageList(vm.Page); return(View(vm)); } }
public ActionResult ApproverList(Models.WeApprover.ApproverList vm) { return(Code.MvcHelper.Post(null, Url.Action("ApproverList", new { searchText = vm.SearchText, FlowApprovalNodeId = vm.FlowApprovalNodeId, pageIndex = vm.Page.PageIndex, pageSize = vm.Page.PageSize }))); }