Filter vehicle services
This commit is contained in:
@@ -1,40 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MileageTraker.Web.ViewModels.FuelLog
|
||||
{
|
||||
public class FuelLogQueryViewModel
|
||||
public class FuelLogQueryViewModel : DateQueryViewModel
|
||||
{
|
||||
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}", FiscalYear, Month);
|
||||
}}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var v = new List<string>();
|
||||
|
||||
if (FiscalYear.HasValue && Month.HasValue)
|
||||
{
|
||||
var str = YearMonthStart;
|
||||
|
||||
v.Add(str);
|
||||
}
|
||||
else if (FiscalYear.HasValue)
|
||||
{
|
||||
v.Add(FiscalYear.ToString());
|
||||
}
|
||||
|
||||
return String.Join("_", v).Replace(' ', '-');
|
||||
}
|
||||
|
||||
public bool HasParameters()
|
||||
{
|
||||
return FiscalYear.HasValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user