public ActionResult PrintMammoConsent(long customerId, long eventId) { var model = new MammoConsentEditModel { EventId = eventId, CustomerId = customerId, Print = true }; var printUrl = GenerateMammoConsent(model); Response.RedirectUser(printUrl); return(null); }
private string GenerateMammoConsent(MammoConsentEditModel model) { var mediaLocation = _mediaRepository.GetTempMediaFileLocation(); var fileName = "MammoConsent_" + model.EventId + "_" + model.CustomerId + ".pdf"; var url = _settings.AppUrl + "/Medical/Results/MammoConsent?customerId=" + model.CustomerId + "&eventId=" + model.EventId + "&print=" + model.Print; _pdfGenerator.GeneratePdf(url, mediaLocation.PhysicalPath + fileName); return(mediaLocation.Url + fileName); }
public ActionResult MammoConsent(MammoConsentEditModel model) { try { if (model.Print) { model.PrintUrl = GenerateMammoConsent(model); } return(View(model)); } catch (Exception ex) { model.FeedbackMessage = FeedbackMessageModel.CreateFailureMessage(ex.Message); return(View(model)); } }
public MammoConsentEditModel GetClientNoticeEditModel(long customerId) { var customer = _customerRepository.GetCustomer(customerId); var model = new MammoConsentEditModel { CustomerId = customer.CustomerId, FullName = customer.Name, HomeNumber = customer.HomePhoneNumber, Address = Mapper.Map <Address, AddressViewModel>(customer.Address) }; var pcp = _primaryCarePhysicianRepository.Get(customer.CustomerId); if (pcp != null) { model.Pcp = pcp; } return(model); }