示例#1
0
        public HttpResponseMessage GetFinalReport(long projectId, long sectionId, int fieldHours, int calification,
                                                  int beneficiariesQuantities, string beneficiariGroups)
        {
            var sp = _projectRepository.GetSectionProject(projectId, sectionId);

            if (sp.IsApproved)
            {
                throw new HoursAlreadyApprovedException("Las horas de este proyecto ya fueron approvadas");
            }

            var finalReport = new ProjectFinalReport(_projectRepository, _sectionRepository, _studentRepository,
                                                     _textDocumentServices, new DownloadbleFile(), _sectionProjectRepository);
            var model = finalReport.GenerateFinalReportModel(projectId, sectionId, sp.Id, fieldHours, calification, beneficiariesQuantities,
                                                             beneficiariGroups);

            return(finalReport.GenerateFinalReport(model));
        }
 public void WhenIExecuteGenerateFinalReportModel()
 {
     _model = _projectFinalReport.GenerateFinalReportModel(projectId, sectionId, sectionprojectId, fieldhours, calification, beneficiariesQuantities, beneficiaieGroup);
 }