예제 #1
0
        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"));
        }
예제 #2
0
            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());
            }
예제 #3
0
        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));
        }
예제 #4
0
 public ActionResult OrderDetail(int id)
 {
     return(View(CustomRepo.GetOrderDetails(id)));
 }
예제 #5
0
        public ActionResult CompletedOrder(Custom custom)
        {
            var viewOrderDetailsModel = CustomRepo.GetOrderDetails(custom.CustomID);

            return(View(viewOrderDetailsModel));
        }