public ActionResult SermonDetails(Sermon sermon, int id) { var _sermon = _uow.Sermons.Get(id); var civm = new SermonIndexViewModel { sermon = _sermon }; return(View(civm)); }
public ActionResult PrintPdf(Sermon s, int id) { var _sermon = _uow.Sermons.Get(id); var sivm = new SermonIndexViewModel { sermon = _sermon, ReturnUrl = "" }; var pdfView = new ViewAsPdf("SermonDetails", sivm) { FileName = sivm.sermon.Title, PageSize = Rotativa.Options.Size.A4, PageMargins = { Left = 0, Right = 0 } }; return(pdfView); }