Clean up reports

This commit is contained in:
2015-10-23 12:39:07 -04:00
parent 7933632cfb
commit ad13d9f5b4
6 changed files with 36 additions and 12 deletions
+23
View File
@@ -62,5 +62,28 @@ namespace MileageTraker.Web.ViewModels.Log
!string.IsNullOrEmpty(EmployeeName) ||
!string.IsNullOrEmpty(VehicleId);
}
public LogQueryViewModel Clone()
{
return new LogQueryViewModel
{
EmployeeName = EmployeeName,
LogType = LogType,
Month = Month,
MonthRange = MonthRange,
VehicleId = VehicleId,
Year = Year
};
}
public LogQueryViewModel CloneSet(string vehicleId = null, string employeeName = null)
{
var clone = Clone();
if (vehicleId != null)
clone.VehicleId = vehicleId;
if (employeeName != null)
clone.EmployeeName = employeeName;
return clone;
}
}
}