public ActionResult Create(OnSiteRegistrationEditModel model) { if (ModelState.IsValid) { try { using (var scope = new TransactionScope()) { var order = _customerRegistrationService.RegisterOnsiteCustomer(model); scope.Complete(); if (order.DiscountedTotal > 0) { Response.RedirectUser("/Scheduling/EventCustomerList/Index?id=" + model.EventId + "&customerIdforAcceptPayment=" + order.CustomerId); return(null); } Response.RedirectUser("/Scheduling/EventCustomerList/Index?id=" + model.EventId); return(null); } } catch (Exception ex) { model = _eventPackageSelectorService.SetEventAndPackageDetail(model, model.EventId, Roles.Technician); model.FeedbackMessage = FeedbackMessageModel.CreateFailureMessage("System Error:" + ex.Message); return(View(model)); } } model = _eventPackageSelectorService.SetEventAndPackageDetail(model, model.EventId, Roles.Technician); return(View(model)); }
public Order RegisterCustomerOnSite(OnSiteRegistrationEditModel model) { using (var scope = new TransactionScope()) { var order = _customerRegistrationService.RegisterOnsiteCustomer(model); scope.Complete(); return(order); } }