/*************************PDF*********************************/ public ActionResult IndexPDF() { using (UtakmicaDBEntities db = new UtakmicaDBEntities()) { var utakmicalist = db.Natjecanjes.ToList(); return(View(utakmicalist)); } }
public ActionResult PrintPartialViewToPdf(int id) { using (UtakmicaDBEntities db = new UtakmicaDBEntities()) { Natjecanje natj = db.Natjecanjes.FirstOrDefault(n => n.Id == id); var report = new PartialViewAsPdf("~/Views/Natjecanjes/DetaljiPDF.cshtml", natj); return(report); } }