Initial
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Web.Mvc;
|
||||
using AutoMapper;
|
||||
using MileageTraker.Web.Models;
|
||||
|
||||
namespace MileageTraker.Web.ViewModels
|
||||
{
|
||||
public class LogPartialDetails
|
||||
{
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int LogId { get; set; }
|
||||
|
||||
[Display(Name = "Vehicle ID")]
|
||||
public string VehicleId { get; set; }
|
||||
|
||||
[Display(Name = "End Odometer")]
|
||||
public int EndOdometer { get; set; }
|
||||
|
||||
[Display(Name = "Type")]
|
||||
public MileageLogTypeWrapper LogType { get; set; }
|
||||
|
||||
public string CityName { get; set; }
|
||||
|
||||
[Display(Name = "Employee / Driver")]
|
||||
public string EmployeeName { get; set; }
|
||||
|
||||
[DisplayFormat(DataFormatString = "{0:0.000}", ApplyFormatInEditMode = true)]
|
||||
public double GasPurchased { get; set; }
|
||||
|
||||
[DisplayFormat(DataFormatString = @"{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)]
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
static LogPartialDetails()
|
||||
{
|
||||
Mapper.CreateMap<Log, LogPartialDetails>();
|
||||
}
|
||||
|
||||
public LogPartialDetails()
|
||||
{}
|
||||
|
||||
public LogPartialDetails(Log log)
|
||||
{
|
||||
Mapper.Map(log, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user