Add filtering
Improve matching
This commit is contained in:
@@ -5,27 +5,28 @@ namespace MileageTraker.Web.ViewModels.FuelLog
|
||||
{
|
||||
public class FuelLogQueryViewModel
|
||||
{
|
||||
public int? Year { get; set; }
|
||||
public int? FiscalYear { get; set; }
|
||||
public int? Month { get; set; }
|
||||
public bool Unmatched { get; set; }
|
||||
|
||||
public string YearMonthStart {get
|
||||
{
|
||||
return string.Format("{0}-{1:00}", Year, Month);
|
||||
return string.Format("{0}-{1:00}", FiscalYear, Month);
|
||||
}}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var v = new List<string>();
|
||||
|
||||
if (Year.HasValue && Month.HasValue)
|
||||
if (FiscalYear.HasValue && Month.HasValue)
|
||||
{
|
||||
var str = YearMonthStart;
|
||||
|
||||
v.Add(str);
|
||||
}
|
||||
else if (Year.HasValue)
|
||||
else if (FiscalYear.HasValue)
|
||||
{
|
||||
v.Add(Year.ToString());
|
||||
v.Add(FiscalYear.ToString());
|
||||
}
|
||||
|
||||
return String.Join("_", v).Replace(' ', '-');
|
||||
@@ -33,7 +34,7 @@ namespace MileageTraker.Web.ViewModels.FuelLog
|
||||
|
||||
public bool HasParameters()
|
||||
{
|
||||
return Year.HasValue;
|
||||
return FiscalYear.HasValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user