public ActionResult <StudentScheduleReportViewModel> StudentScheduleReport(StudentScheduleReportViewModel studentScheduleReportViewModel) { StudentScheduleReportViewModel studentScheduleReportView = new StudentScheduleReportViewModel(); try { studentScheduleReportView = _studentScheduleService.StudentScheduleReport(studentScheduleReportViewModel); } catch (Exception es) { studentScheduleReportView._failure = true; studentScheduleReportView._message = es.Message; } return(studentScheduleReportView); }
public StudentScheduleReportViewModel StudentScheduleReport(StudentScheduleReportViewModel studentScheduleReportViewModel) { StudentScheduleReportViewModel studentScheduleReportView = new StudentScheduleReportViewModel(); try { if (TokenManager.CheckToken(studentScheduleReportViewModel._tenantName + studentScheduleReportViewModel._userName, studentScheduleReportViewModel._token)) { studentScheduleReportView = this.studentScheduleRepository.StudentScheduleReport(studentScheduleReportViewModel); } else { studentScheduleReportView._failure = true; studentScheduleReportView._message = TOKENINVALID; } } catch (Exception es) { studentScheduleReportView._failure = true; studentScheduleReportView._message = es.Message; } return(studentScheduleReportView); }
public StudentScheduleReportViewModel StudentScheduleReport(StudentScheduleReportViewModel studentScheduleReportViewModel) { StudentScheduleReportViewModel studentScheduleReportView = new StudentScheduleReportViewModel(); try { var scheduleReport = this.context?.StudentScheduleView.Where(x => x.SchoolId == studentScheduleReportViewModel.SchoolId).ToPivotTable( item => item.CourseSectionName, item => new { item.StudentId, item.StudentName, item.StudentInternalId }, items => items.Any() ? items.First().Scheduled + " | " + items.First().ConflictComment : null); studentScheduleReportView.ScheduleReport = scheduleReport; studentScheduleReportView.TenantId = studentScheduleReportViewModel.TenantId; studentScheduleReportView.SchoolId = studentScheduleReportViewModel.SchoolId; } catch (Exception es) { studentScheduleReportViewModel._failure = true; studentScheduleReportViewModel._message = es.Message; } return(studentScheduleReportView); }