public ActionResult ProductLocationGridding(int ispId) { var model = new GriddingViewModel { Locations = svc.GetLocations(), ISPProducts = svc.GetProducts(null, ispId), ISPId = ispId }; return(PartialView(model)); }
public ActionResult Index() { var user = svc.GetISPUser(User.Identity.GetUserId()); //if user isnt user type admin return to login screen if (!user.IsUserTypeAdmin) { return(RedirectToAction("Login", "Account")); } //set cookie for ISP Admin var userCookie = new HttpCookie("ISPAdmin", user.Id); userCookie.Expires.AddDays(1); HttpContext.Response.SetCookie(userCookie); var model = svc.GetProducts(user.Id, null); return(View(model)); }