public List<CarsInfo.UsedCarsInfo> GetPageDataSpeed(int PageSize, int page)
    {
        var obj = new List<CarsInfo.UsedCarsInfo>();

        if (Session["FilterOn"] != null)
        {
            if (Convert.ToInt32(Session["FilterOn"].ToString()) == 1)
            {
                ArrayList AFilter = (ArrayList)Session["Filter"];

                obj = GetCarsFilterNextSpeed(AFilter, PageSize.ToString(), page);
            }
        }
        else
        {
            CarsBL.UsedCarsSearch objCarsearch = new CarsBL.UsedCarsSearch();
            string CurrentPage = page.ToString();
            string pageresultscount = PageSize.ToString();
            string Orderby = string.Empty;
            string sort = string.Empty;

            if (Session["Orderby"] != null && Session["Orderby"] != "")
            {
                Orderby = Session["Orderby"].ToString();
            }
            else
            {
                Session["Orderby"] = "price";
            }
            if (Session["sort"] != null)
            {
                sort = Session["sort"].ToString();
            }
            else
            {
                sort = "desc";
            }
            string carMakeid = Session["carMake"].ToString();
            string CarModalId = Session["CarModalId"].ToString();
            string ZipCode = Session["ZipCode"].ToString();
            string WithinZip = Session["WithinZip"].ToString();

            obj = (List<CarsInfo.UsedCarsInfo>)objCarsearch.SearchUsedCarsSpeed(carMakeid, CarModalId, ZipCode, WithinZip, CurrentPage, pageresultscount, Orderby, sort);

            Session["SearchCarsdata"] = obj;
        }

        return obj;
    }
    public List<CarsInfo.UsedCarsInfo> GetCarsSearchSpeed(string carMakeid, string CarModalId, string ZipCode, string WithinZip, string pageNo, string pageresultscount, string orderby)
    {
        var obj = new List<CarsInfo.UsedCarsInfo>();

        try
        {

            CarsBL.UsedCarsSearch objCarsearch = new CarsBL.UsedCarsSearch();

            Session["carMake"] = carMakeid;
            Session["CarModalId"] = CarModalId;
            Session["ZipCode"] = ZipCode;
            Session["WithinZip"] = WithinZip;
            string sort = string.Empty;
            if (Session["Orderby"] != null && Session["Orderby"] != "")
            {
                orderby = Session["Orderby"].ToString();
            }
            else
            {
                Session["Orderby"] = "price";
            }
            if (Session["sort"] != null)
            {
                sort = Session["sort"].ToString();
            }
            else
            {
                sort = "desc";
            }

            string IPAddress = string.Empty;
            string SearchName = string.Empty;

            String strHostName = HttpContext.Current.Request.UserHostAddress.ToString();

            IPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();

            GeneralFunc.SaveSearchLog(IPAddress, carMakeid, CarModalId, WithinZip, ZipCode, "Genral");

            obj = (List<CarsInfo.UsedCarsInfo>)objCarsearch.SearchUsedCarsSpeed(carMakeid, CarModalId, ZipCode, WithinZip, pageNo, pageresultscount, orderby, sort);

            Session["SearchFullCarsdata"] = obj;
            Session["SearchCarsdata"] = obj;
        }
        catch (Exception EX)
        {
        }

        return obj;
    }