Update existing reports, removing mileage drill down

This commit is contained in:
2015-10-23 12:13:09 -04:00
parent 25fb070701
commit 7933632cfb
8 changed files with 98 additions and 61 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ namespace MileageTraker.Web.ViewModels
public int TripCount
{
get { return VehicleMileageItems.Sum(i => i.LogPairs.Count()); }
get { return VehicleMileageItems.Sum(i => i.TripCount); }
}
}
}
+1 -5
View File
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace MileageTraker.Web.ViewModels.Vehicle
{
@@ -11,8 +8,7 @@ namespace MileageTraker.Web.ViewModels.Vehicle
public int Miles { get; set; }
public double GasPurchased { get; set; }
public string Prog { get; set; }
public IEnumerable<Tuple<Models.Log, Models.Log>> LogPairs { get; set; }
public int TripCount { get { return LogPairs.Count(); } }
public int TripCount { get; set; }
[DisplayFormat(DataFormatString = "{0:0.000}")]
public double MilesPerGallon { get { return GasPurchased == 0 || Miles == 0 ? 0 : Miles / GasPurchased; } }
}