// GET: Cart public ActionResult Index() { List <int?> list = (Session["CartItems"] as List <int?>) ?? new List <int?>(); var repo = new Repos.ProductRepo(); var prodList = repo.GetMutipleProducts(list); return(View(prodList)); }
public List <console.Models.tblProduct> getFeaturedProd(List <console.Models.tblFeaturedProduct> prod) { List <console.Models.tblProduct> prodList; List <int?> allId = new List <int?>(); foreach (var prodId in prod) { allId.Add(prodId.product_id); } var repo = new Repos.ProductRepo(); prodList = repo.GetMutipleProducts(allId); return(prodList); }
public ActionResult CheckOut(decimal?totalDue) { var isLogged = CheckLogin(); if (isLogged == true) { List <int?> list = (Session["CartItems"] as List <int?>) ?? new List <int?>(); var repo = new Repos.ProductRepo(); var prodList = repo.GetMutipleProducts(list); SaveItems(prodList, totalDue); return(View("Index", prodList)); } else { return(RedirectToAction("Login", "Account")); } }