Example #1
0
 public ActionResult GetCustompdf([FromQuery(Name = "projectId")] long projectId, [FromQuery(Name = "showPupil")] bool showPupil
                                  , [FromQuery(Name = "showTeacher")] bool showTeacher, [FromQuery(Name = "groupNums")] string groupNums)
 {
     return(File(_pdfGenerator.GenerateCustomPdf(_projects.GetForProjectProgress(projectId), new PdfSettings {
         GroupsToShow = JsonConvert.DeserializeObject <List <long> >(groupNums),
         ShowPupil = showPupil,
         ShowTeacher = showTeacher
     }), "application/pdf"));
 }
 public ActionResult <ProjectDTO> GetProjectProgress(long projectId)
 {
     try
     {
         return(new ProjectDTO(_projects.GetForProjectProgress(projectId)));
     }
     catch (ArgumentNullException)
     {
         return(NotFound(new CustomErrorDTO("Project niet gevonden")));
     }
 }