Initial
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace MileageTraker.Web.ViewModels
|
||||
{
|
||||
public class EmployeeMileageViewModel
|
||||
{
|
||||
public IEnumerable<EmployeeMileageItem> Items { get; set; }
|
||||
public LogQueryViewModel Query { get; set; }
|
||||
|
||||
public int TotalMiles { get { return Items.Sum(i => i.Miles); } }
|
||||
public double TotalGasPurchased { get { return Items.Sum(i => i.GasPurchased); } }
|
||||
|
||||
public EmployeeMileageViewModel(IEnumerable<EmployeeMileageItem> items, LogQueryViewModel query)
|
||||
{
|
||||
Items = items;
|
||||
Query = query;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user