public OrderViewModel BeginOrderEdit(int orderID)
        {
            OrderDataAccessService orderDataAccessService = new OrderDataAccessService();
               OrderViewModel orderViewModel = new OrderViewModel();
               OrderCustomer orderCustomer = orderDataAccessService.GetOrder(orderID);
               orderCustomer.Order.OrderTotal = orderDataAccessService.GetOrderTotal(orderID);
               orderCustomer.Order.OrderTotalFormatted = orderCustomer.Order.OrderTotal.ToString("C");

               orderViewModel.Customer = orderCustomer.Customer;
               orderViewModel.Order = orderCustomer.Order;
               orderViewModel.Shippers = orderDataAccessService.GetShippers();
               orderViewModel.Order.ShipperName = orderCustomer.Shipper.CompanyName;

               return orderViewModel;
        }
        public OrderViewModel CreateOrder(OrderViewModel orderViewModel)
        {
            ShoppingCartId=  orderViewModel.Order.CartID;
               OrderDataAccessService orderDataAccessService = new OrderDataAccessService();
              var order=new HiLToysDataModel.Models.Order();
              order = orderViewModel.Order;
              storeDB.Orders.Add(order);
              storeDB.SaveChanges();
             // DateTime orddate = Convert.ToDateTime(order.OrderDate);

              List<HiLToysDataModel.Cart> myOrderList = GetCartItems();

            // Add OrderDetail information to the DB for each product purchased.
            for (int i = 0; i < myOrderList.Count; i++)
            {
              // Create a new OrderDetail object.
                var myOrderDetail = new HiLToysDataModel.Models.OrderDetail();
              myOrderDetail.OrderID = order.OrderID;
              myOrderDetail.Username = orderViewModel.Order.UserName;
              myOrderDetail.ProductID = myOrderList[i].ProductID;
              myOrderDetail.Quantity = myOrderList[i].Quantity;
              myOrderDetail.UnitPrice = myOrderList[i].UnitPrice;
              myOrderDetail.OrderDate = DateTime.Now;

              // Add OrderDetail to DB.
              storeDB.OrderDetails.Add(myOrderDetail);
              storeDB.SaveChanges();
            }
             orderViewModel.OrderDetailProductResults = orderDataAccessService.GetOrderDetailsx(order.OrderID);

             orderViewModel.TotalOrders = orderDataAccessService.GetOrderTotal(order.OrderID);
            return orderViewModel;
        }