Restyle login, change password works

This commit is contained in:
2012-12-22 10:48:34 -05:00
parent f129142dab
commit c1944f6262
54 changed files with 327 additions and 255 deletions
+45
View File
@@ -0,0 +1,45 @@
using System;
using AutoMapper;
using MileageTraker.Web.Models;
namespace MileageTraker.Web.ViewModels.Log
{
public class LogIndexViewModel
{
public int? PreviousLogId { get; set; }
public int? PreviousLogEndOdometer { get; set; }
public int LogId { get; set; }
public string VehicleId { get; set; }
public int EndOdometer { get; set; }
public MileageLogTypeWrapper LogType { get; set; }
public string CityName { get; set; }
public string EmployeeName { get; set; }
public double GasPurchased { get; set; }
public DateTime Date { get; set; }
public DateTime Created { get; set; }
static LogIndexViewModel()
{
Mapper.CreateMap<Models.Log, LogIndexViewModel>();
}
public LogIndexViewModel(Models.Log log, Models.Log previousLog)
{
Mapper.Map(log, this);
if (previousLog != null)
{
PreviousLogId = previousLog.LogId;
PreviousLogEndOdometer = previousLog.EndOdometer;
}
}
}
}
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using AutoMapper;
using MileageTraker.Web.Models;
namespace MileageTraker.Web.ViewModels.Log
{
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<Models.Log, LogPartialDetails>();
}
public LogPartialDetails()
{}
public LogPartialDetails(Models.Log log)
{
Mapper.Map(log, this);
}
}
}
+11
View File
@@ -0,0 +1,11 @@
using MileageTraker.Web.Models;
namespace MileageTraker.Web.ViewModels.Log
{
public class LogQueryViewModel
{
public int? Year { get; set; }
public int? Month { get; set; }
public MileageLogType? LogType { get; set; }
}
}
+14
View File
@@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace MileageTraker.Web.ViewModels.Log
{
public class LogResultsViewModel
{
public IEnumerable<int> Years { get; set; }
public IEnumerable<int> Months { get; set; }
public IEnumerable<LogIndexViewModel> Logs { get; set; }
public int SelectedYear { get; set; }
public int SelectedMonth { get; set; }
public string SelectedLogType { get; set; }
}
}