public ActionResult UserProducts(RenderModel model, int pageIndex = 1) { var userProducts = new UserProductsModel(model.Content, Umbraco) { PageIndex = pageIndex }; if (pageIndex == 1) { ViewBag.Title = model.Content.GetProperty("title").Value; ViewBag.SiteName = model.Content.GetProperty("siteName", true).Value; return(Index(userProducts)); } return(PartialView("~/Views/Partials/UserProductsWidget.cshtml", userProducts)); }
public ActionResult UserProdDetail() { //if (id == null) //{ // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); //} UserProductsModel upm = new UserProductsModel(); upm._user = db.Users.Find(UserControl.UserID); upm._ProductList = db.Products.Where(u => u.UserID == UserControl.UserID).ToList(); if (upm == null) { return(HttpNotFound()); } return(View(upm)); }