public ActionResult CustomerPolicyManager(int?page) { List <CustomerpolicyViewModel> ListcusPL = new List <CustomerpolicyViewModel>(); PagedList <CustomerpolicyViewModel> PageListCusPL; List <PolicyViewModel> s = pl.GetAll(); Session["PolicyAll"] = s; List <VehicleinfoViewModel> a = vh.GetAll(); Session["VehicleAll"] = a; List <CustomerinfoViewModel> w = csi.GetAll(); Session["customerInAll"] = w; int pageSize = 10; int pageNumber = (page ?? 1); if (Session["CusPLSearch"] != null) { ListcusPL = (List <CustomerpolicyViewModel>)Session["CusPLSearch"]; PageListCusPL = new PagedList <CustomerpolicyViewModel>(ListcusPL, pageNumber, pageSize); } else { ListcusPL = cs.GetAll(); PageListCusPL = new PagedList <CustomerpolicyViewModel>(ListcusPL, pageNumber, pageSize); } TempData["currentPage"] = page; return(View(PageListCusPL)); }
public ActionResult EstimateViewAll() { List <EstimateViewModel> z = es.GetAll(); Session["EstimatAll"] = z; List <VehicleinfoViewModel> x = vh.GetAll(); Session["VehicleAll"] = x; List <CustomerinfoViewModel> w = cs.GetAll(); Session["CustomerAll"] = w; List <PolicyViewModel> a = pl.GetAll(); Session["PolicyAll"] = a; Session["StringSearch"] = null; Session["EstiSearch"] = null; return(RedirectToAction("EstimateManagerNe")); }
public ActionResult AccManager(int page = 1, int pageSize = 10) { List <CustomerinfoViewModel> listcus = ss.GetAll(); PagedList <CustomerinfoViewModel> PageListCus = new PagedList <CustomerinfoViewModel>(listcus, page, pageSize); if (Session["cusSearch"] != null) { listcus = (List <CustomerinfoViewModel>)Session["cusSearch"]; PageListCus = new PagedList <CustomerinfoViewModel>(listcus, page, pageSize); } //else //{ // listcus = ss.GetAll(); // PageListCus = new PagedList<CustomerinfoViewModel>(listcus, page, pageSize); //} return(View(PageListCus)); }