public ActionResult Payment(decimal Total) { Custom cs = new Custom(); cs.TotalBill = (double)Total; cs.ShoppingBag = Chart.ShoppingList; cs.OrderDate = DateTime.Now; var logedCustomer = Session["Customer"] as Customer; cs.ShippingAddress = logedCustomer.Address; cs.CustomerID = logedCustomer.CustomerID; CustomRepo.AddCustom(cs); return(RedirectToAction("Index", "Home")); }
private static async Task <CustomRepo[]> GetRepositories(IHaveRepositories col) { var repositories = col.Repositories.Select(r => new CustomRepo(CustomRepo.GetRepoUri(new Uri(r)))).ToArray(); foreach (var r in repositories) { try { await r.Load(SyncEvilGlobal.StringDownloader, r.Uri).ConfigureAwait(false); } catch (Exception ex) { MainLog.Logger.FormattedWarnException(ex, "Error while processing repo"); } } return(repositories.Where(x => x.Loaded).ToArray()); }
public ActionResult Payment(decimal Total) { Custom custom = new Custom(); custom.TotalBill = (double)Total; custom.ShoppingBag = Chart.ShoppingList; custom.OrderDate = DateTime.Now; var logedCustomer = Session["Customer"] as Customer; custom.CustomerID = logedCustomer.CustomerID; custom.ShippingAddress = logedCustomer.Address; CustomRepo.Add(custom); Chart.ShoppingList.Clear(); return(RedirectToAction("CompletedOrder", "Home", custom)); }
public ActionResult OrderDetail(int id) { return(View(CustomRepo.GetOrderDetails(id))); }
public ActionResult CompletedOrder(Custom custom) { var viewOrderDetailsModel = CustomRepo.GetOrderDetails(custom.CustomID); return(View(viewOrderDetailsModel)); }