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) })); }
private ActionResult GetOrderSummaryView(Order order) { // Ensure the viewer has access. var userId = User.Id().Value; if (order.PurchaserId != userId) { return(RedirectToRoute(ProductsRoutes.Orders)); } // Use the products command because the products may now be disabled. return(View(_employerOrdersQuery.GetOrderSummary(_creditsQuery, _ordersQuery, order, _productsCommand.GetProducts(), CurrentRegisteredUser))); }
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) })); }