Cleanup and fixes

This commit is contained in:
2013-01-12 14:58:33 -05:00
parent bc019923d2
commit e50052d41e
27 changed files with 240 additions and 156 deletions
@@ -34,7 +34,7 @@ namespace MileageTraker.Web.ViewModels.CreateLog
public MileageLogTypeWrapper LogType { get; set; }
[Required(ErrorMessage = "Required")]
[Display(Name = "City Name")]
[Display(Name = "Destination City")]
[InputSize("medium")]
[StringLength(64, MinimumLength = 3, ErrorMessage = "Minimum 3 characters")]
public string CityName { get; set; }
@@ -64,6 +64,12 @@ namespace MileageTraker.Web.ViewModels.CreateLog
Mapper.CreateMap<CreateLogViewModel, Models.Log>();
}
public CreateLogViewModel()
{
// view will crash if this isn't instantiated
LogType = new MileageLogTypeWrapper();
}
public Models.Log GetLog()
{
var log = new Models.Log();