Changed a lot LOL
This commit is contained in:
@@ -271,6 +271,11 @@ namespace PartSource.Services
|
||||
}
|
||||
|
||||
public IList<Vehicle> GetVehiclesForPart(string partNumber, string lineCode)
|
||||
{
|
||||
return GetVehiclesForPart(partNumber, lineCode, -1);
|
||||
}
|
||||
|
||||
public IList<Vehicle> GetVehiclesForPart(string partNumber, string lineCode, int maxVehicles)
|
||||
{
|
||||
if (string.IsNullOrEmpty(partNumber) || string.IsNullOrEmpty(lineCode))
|
||||
{
|
||||
@@ -290,6 +295,11 @@ namespace PartSource.Services
|
||||
v => new { v.BaseVehicleId, v.EngineConfigId },
|
||||
(f, v) => v);
|
||||
|
||||
if (maxVehicles > 0)
|
||||
{
|
||||
vehicles = vehicles.Take(maxVehicles);
|
||||
}
|
||||
|
||||
return vehicles.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user