public ActionResult Taocan() { agentMgt = new AgentManagement(User.Identity.GetUserId <int>()); List <BAgentRoute> routes = agentMgt.FindTaocans(0); total = routes.Count(); PageItemsResult <BAgentRoute> result = new PageItemsResult <BAgentRoute>() { CurrentPage = 1, Items = routes, PageSize = total, TotalRecords = total }; KMBit.Grids.KMGrid <BAgentRoute> grid = new KMBit.Grids.KMGrid <BAgentRoute>(result); return(View(grid)); }
public ActionResult Customers() { CustomerManagement customerMgr = new CustomerManagement(User.Identity.GetUserId <int>()); int page = 1; int.TryParse(Request["page"], out page); page = page > 0 ? page : 1; int pageSize = 20; List <BCustomer> customers = customerMgr.FindCustomers(User.Identity.GetUserId <int>(), 0, out total, true, page, pageSize); PageItemsResult <BCustomer> result = new PageItemsResult <BCustomer>() { CurrentPage = page, EnablePaging = true, Items = customers, PageSize = pageSize, TotalRecords = total }; KMBit.Grids.KMGrid <KMBit.Beans.BCustomer> grid = new KMBit.Grids.KMGrid <KMBit.Beans.BCustomer>(result); return(View(grid)); }
public ActionResult Taocan() { agentMgt = new AgentManagement(User.Identity.GetUserId<int>()); List<BAgentRoute> routes = agentMgt.FindTaocans(0); total = routes.Count(); PageItemsResult<BAgentRoute> result = new PageItemsResult<BAgentRoute>() { CurrentPage = 1, Items = routes, PageSize = total, TotalRecords = total }; KMBit.Grids.KMGrid<BAgentRoute> grid = new KMBit.Grids.KMGrid<BAgentRoute>(result); return View(grid); }
public ActionResult Customers() { CustomerManagement customerMgr = new CustomerManagement(User.Identity.GetUserId<int>()); int page = 1; int.TryParse(Request["page"],out page); page = page > 0 ? page : 1; int pageSize = 20; List<BCustomer> customers = customerMgr.FindCustomers(User.Identity.GetUserId<int>(),0, out total,true,page,pageSize); PageItemsResult<BCustomer> result = new PageItemsResult<BCustomer>() { CurrentPage=page, EnablePaging=true, Items=customers, PageSize=pageSize, TotalRecords=total }; KMBit.Grids.KMGrid<KMBit.Beans.BCustomer> grid = new KMBit.Grids.KMGrid<KMBit.Beans.BCustomer>(result); return View(grid); }
public ActionResult AgentRoutes(int agencyId) { if(agencyId<=0) { ViewBag.Message = "参数非法"; return View("Error"); } int page = 1; int.TryParse(Request["page"], out page); page = page > 0 ? page : 1; int pageSize = 30; if (agentAdminMgt == null) agentAdminMgt = new AgentAdminMenagement(User.Identity.GetUserId<int>()); List<BUser> users = agentAdminMgt.FindAgencies((int)agencyId, null, null, 0, 0, out total); if (users == null || users.Count == 0) { ViewBag.Message = string.Format("编号为 {0} 的代理商存在"); return View("Error"); } BUser agency = users[0]; List<BAgentRoute> routes = agentAdminMgt.FindRoutes(0,(int)agencyId, 0, 0, out total,null, page, pageSize, true); PageItemsResult<BAgentRoute> result = new PageItemsResult<BAgentRoute>() { CurrentPage=page, Items=routes, PageSize=30, TotalRecords=total,EnablePaging=true }; KMBit.Grids.KMGrid<BAgentRoute> grid = new KMBit.Grids.KMGrid<BAgentRoute>(result); ViewBag.Agency = agency; return View(grid); }