Esempio n. 1
0
 protected void LoadViewModel(SupportTeamFormViewModel viewModel)
 {
     viewModel.Supervisors = (viewModel.SupportTeam != null &&
                              viewModel.SupportTeam.SupervisorId.HasValue)
                                 ? _personManagementService.GetActiveSupervisors(viewModel.SupportTeam.SupervisorId.Value)
                                 : _personManagementService.GetActiveSupervisors();
 }
Esempio n. 2
0
        public ReportFormViewModel CreateFormViewModel(int userId)
        {
            var viewModel = new ReportFormViewModel
            {
                Managers = _personManagementService.GetActiveSupervisors()
            };
            var reports = new Dictionary <string, string>
            {
                { "1", "Employee Time Report" },
                { "2", "SDE Incidents/Service Requests and WO Report" },
                { "3", "Application Call List Report" }
            };

            viewModel.ReportTypes = reports;
            var dbDates = _sdeWorkOrderRepository.GetIncidentDates();

            var sdeDates = dbDates.Select(dbDate => dbDate.WorkOrderDate).ToList();

            viewModel.SdeReportDates = sdeDates;
            viewModel.ReportParams   = new ReportParameters {
                StartDate = Dates.GetPreviousSaturday(DateTime.Today).AddDays(-6), EndDate = Dates.GetPreviousSaturday(DateTime.Today), ManagerId = userId
            };

            return(viewModel);
        }