Add TSV support.
Import Upload
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using MileageTraker.Web.Models;
|
||||
using MileageTraker.Web.ViewModels.Log;
|
||||
|
||||
namespace MileageTraker.Web.ViewModels.FuelLog
|
||||
{
|
||||
public class FuelLogResultsViewModel
|
||||
{
|
||||
public IEnumerable<Models.FuelLog> Logs { get; set; }
|
||||
public Dictionary<string, List<string>> AvailableYearMonths { get; set; }
|
||||
public IEnumerable<string> SelectedYearMonths{get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Year))
|
||||
return AvailableYearMonths[Year];
|
||||
return new List<string>();
|
||||
}}
|
||||
|
||||
// filter parameters
|
||||
public string Year { get; set; }
|
||||
public string Month { get; set; }
|
||||
|
||||
public FuelLogResultsViewModel(IEnumerable<Models.FuelLog> logs, FuelLogQueryViewModel query, Dictionary<string, List<string>> availableYearMonths)
|
||||
{
|
||||
Logs = logs;
|
||||
AvailableYearMonths = availableYearMonths;
|
||||
Year = query.Year.HasValue ? query.Year.Value.ToString() : string.Empty;
|
||||
Month = query.Month.HasValue ? query.Month.Value.ToString() : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user