Vehicle Recall integrated into Vehicle Service

This commit is contained in:
2020-09-30 21:44:38 -04:00
parent 6f031c5cb6
commit 4b44128d62
18 changed files with 236 additions and 126 deletions
@@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace MileageTraker.Web.ViewModels.VehicleRecall
{
public class VehicleRecallResultsViewModel
{
public IEnumerable<VehicleRecallViewModel> Recalls { get; set; }
public bool Completed { get; set; }
public VehicleRecallResultsViewModel(IEnumerable<VehicleRecallViewModel> vehicles, bool completed)
{
Recalls = vehicles;
Completed = completed;
}
}
}
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using AutoMapper;
@@ -29,11 +29,15 @@ namespace MileageTraker.Web.ViewModels.VehicleRecall
[StringLength(128, MinimumLength = 3, ErrorMessage = "Minimum 3 characters")]
public string Description { get; set; }
[HiddenInput(DisplayValue = false)]
[ScaffoldColumn(false)]
[Display(Name = "Vehicle Service")]
[UIHint("VehicleServiceLink")]
public int CompletedService_VehicleServiceId { get; set; }
[ScaffoldColumn(false)]
[Display(Name = "Completed Date")]
public DateTime CompletedService_InvoiceDate { get; set; }
static VehicleRecallViewModel()
{
Mapper.CreateMap<VehicleRecallViewModel, Models.VehicleRecall>();