Пример #1
0
        protected void AssertOrders(Guid ownerId, Coupon coupon, Discount discount, params Product[] products)
        {
            var orders = _ordersQuery.GetOrders(ownerId);

            Assert.AreEqual(1, orders.Count);
            var order = orders[0];

            AssertOrder(order, coupon, discount, products);

            // Use the id and code.

            order = _ordersQuery.GetOrder(order.Id);
            AssertOrder(order, coupon, discount, products);
            order = _ordersQuery.GetOrder(order.ConfirmationCode);
            AssertOrder(order, coupon, discount, products);
        }
Пример #2
0
        public ActionResult Receipt()
        {
            var order    = _ordersQuery.GetOrder(Pageflow.OrderId);
            var products = _productsQuery.GetProducts();

            return(View(new NewOrderReceiptModel {
                OrderSummary = _employerOrdersQuery.GetOrderSummary(_creditsQuery, _ordersQuery, order, products, CurrentRegisteredUser)
            }));
        }
Пример #3
0
        public ActionResult Receipt(Guid jobAdId, Guid orderId)
        {
            var employer = CurrentEmployer;

            var jobAd = GetJobAd(employer.Id, jobAdId);

            if (jobAd == null)
            {
                return(NotFound("job ad", "id", jobAdId));
            }

            var order = _ordersQuery.GetOrder(orderId);

            return(View(new ReceiptJobAdModel
            {
                JobAd = _memberJobAdViewsQuery.GetMemberJobAdView(null, jobAd),
                OrderSummary = _employerOrdersQuery.GetOrderSummary(_creditsQuery, _ordersQuery, order, _productsQuery.GetProducts(), employer)
            }));
        }