public ActionResult UserAgreement(Guid id /* orderItemId */) { if (id == Guid.Empty) return HttpNotFound(); var orderItem = _orderService.GetOrderItemByGuid(id); if (orderItem == null) return RedirectToHomePageWithError("Guid"); var product = orderItem.Product; if (product == null || !product.HasUserAgreement) return RedirectToHomePageWithError("Product"); var model = new UserAgreementModel(); model.UserAgreementText = product.UserAgreementText; model.OrderItemGuid = id; return View(model); }
public ActionResult UserAgreement(Guid orderItemId) { var orderItem = _orderService.GetOrderItemByGuid(orderItemId); if (orderItem == null) return RedirectToRoute("HomePage"); var product = orderItem.Product; if (product == null || !product.HasUserAgreement) return RedirectToRoute("HomePage"); var model = new UserAgreementModel(); model.UserAgreementText = product.UserAgreementText; model.OrderItemGuid = orderItemId; return View(model); }