public ActionResult GetUpdateWatchList(OrderWatchList updatedWatchList, string Id) { OrderWatchList watchList = orderWatchListService.GetWatchList(Id); watchList.ListStatus = updatedWatchList.ListStatus; orderWatchListService.UpdateWatchList(watchList); return(RedirectToAction("Index")); }
public ActionResult UpdateOrder(OrderWatchList updatedOrder, string Id) { OrderWatchList order = orderWatchListService.GetWatchList(Id); order.ListStatus = updatedOrder.ListStatus; orderWatchListService.UpdateWatchList(order); return(RedirectToAction("Index")); }
public ActionResult Checkout(OrderWatchList OrderWatchList) { var wishListItems = watchListService.GetWatchListItems(this.HttpContext); OrderWatchList.ListStatus = "List Created"; OrderWatchList.Email = User.Identity.Name; orderWatchListService.CreateOrderWatchList(OrderWatchList, wishListItems); watchListService.ClearWatchList(this.HttpContext); return(RedirectToAction("ThankYou", new { OrderId = OrderWatchList.Id })); }
//Function to create a list of shows into a watch list public void CreateOrderWatchList(OrderWatchList baseOrderWatchList, List <WatchListItemViewModel> watchListItems) { foreach (var item in watchListItems) { baseOrderWatchList.OrderItems.Add(new OrderWatchListItem() { ShowId = item.Id, ShowName = item.showName, Image = item.Image, ShowDescription = item.showDescription, ShowSeason = item.showSeason, ShowStudio = item.showStudio, ShowEpisodeCount = item.showEpisodeCount }); } orderContext.Insert(baseOrderWatchList); orderContext.Commit(); }
public ActionResult Checkout() { Customer customer = customers.Collection().FirstOrDefault(c => c.Email == User.Identity.Name); if (customer != null) { OrderWatchList Order = new OrderWatchList() { Email = customer.Email, FirstName = customer.FirstName, LastName = customer.LastName }; return(View(Order)); } else { return(RedirectToAction("Error")); } }
//Get single watchlist public ActionResult GetUpdateWatchList(string Id) { OrderWatchList watchList = orderWatchListService.GetWatchList(Id); return(View(watchList)); }
public ActionResult UpdateOrder(string Id) { OrderWatchList order = orderWatchListService.GetWatchList(Id); return(View(order)); }
//Update the watchlist public void UpdateWatchList(OrderWatchList orderWatchList) { orderContext.Update(orderWatchList); orderContext.Commit(); }