public static AdsDataComponent.AdsDataTable GetAdsByQuery(int recordLimit, int categoryId, int memberId, decimal maxPrice, string searchTerm, string location, int adType, int adStatus, int adLevel, int dayRange, bool mustHaveImage)
{
DateTime? minCreatedDate = null;
if (location == null) location = "";
if (dayRange > 0)
minCreatedDate = DateTime.Now.Subtract(TimeSpan.FromDays(dayRange));
// To return no results if the searchTerm is empty remove the following
// check on the searchTerm.
if (searchTerm == null)
searchTerm = "";
return null;
}