Ability to enter purpose on createlog form

This commit is contained in:
2013-03-02 14:24:41 -05:00
parent 4b9d7010d5
commit e911dfced7
10 changed files with 81 additions and 14 deletions
+12
View File
@@ -323,6 +323,18 @@ namespace MileageTraker.Web.DAL
.FirstOrDefault(l => !excludeLogId.HasValue || l.LogId != excludeLogId.Value);
}
public IEnumerable<PurposeType> GetPurposeTypes()
{
return
(from pt in _db.PurposeTypes
select pt).OrderBy(pt => pt.SortOrder).ToList();
}
public IEnumerable<PurposeType> GetPurposeTypesWithBlank()
{
return (new[] { new PurposeType() }).Concat(GetPurposeTypes());
}
#endregion
#region Vehicle