Autocomplete service center name
This commit is contained in:
@@ -858,6 +858,23 @@ namespace MileageTraker.Web.DAL
|
||||
return vehicleServices;
|
||||
}
|
||||
|
||||
public IQueryable<string> GetServiceCenterNames()
|
||||
{
|
||||
return
|
||||
from l in GetVehicleServices()
|
||||
group l by new {l.ServiceCenterName}
|
||||
into g
|
||||
select g.Key.ServiceCenterName;
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetServiceCenterNamesAutocomplete(string term)
|
||||
{
|
||||
return
|
||||
from name in GetServiceCenterNames()
|
||||
where name.StartsWith(term)
|
||||
select name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user