Service reminder implemented.

This commit is contained in:
2015-10-21 20:32:37 -04:00
parent e42fcd16fa
commit 93065de77f
26 changed files with 652 additions and 89 deletions
@@ -1,11 +1,13 @@
using System.Collections.Generic;
using System.Globalization;
using MileageTraker.Web.ViewModels.ServiceReminder;
namespace MileageTraker.Web.ViewModels.VehicleService
{
public class VehicleServiceResultsViewModel
{
public IEnumerable<VehicleServiceViewModel> ServiceItems { get; set; }
public IList<ServiceReminderViewModel> UpcomingServiceReminders { get; set; }
public Dictionary<string, List<string>> AvailableYearMonths { get; set; }
public IEnumerable<string> SelectedYearMonths
{
@@ -24,10 +26,12 @@ namespace MileageTraker.Web.ViewModels.VehicleService
public VehicleServiceResultsViewModel(
IEnumerable<VehicleServiceViewModel> serviceItems,
IList<ServiceReminderViewModel> upcomingServiceReminders,
VehicleServiceQueryViewModel query,
Dictionary<string, List<string>> availableYearMonths)
{
ServiceItems = serviceItems;
UpcomingServiceReminders = upcomingServiceReminders;
AvailableYearMonths = availableYearMonths;
Year = query.Year.HasValue ? query.Year.Value.ToString(CultureInfo.InvariantCulture) : string.Empty;
Month = query.Month.HasValue ? query.Month.Value.ToString(CultureInfo.InvariantCulture) : string.Empty;