public List<CarsInfo.UsedCarsInfo> GetCarsFilterMobile(string carMakeID, string CarModalId,
  string Mileage, string Year, string Price, string Sort, string Orderby, string pageSize, string CurrentPage, string Zipcode)
    {
        CarsFilter objCarsFilter = new CarsFilter();

        Filter objFilter = new Filter();

        List<CarsInfo.UsedCarsInfo> objFilterdata = new List<CarsInfo.UsedCarsInfo>();

        CarsInfo.UsedCarsInfo OBJ = new CarsInfo.UsedCarsInfo();

        string sort = string.Empty;

        objCarsFilter.CurrentPage = CurrentPage;
        objCarsFilter.PageSize = pageSize;
        objCarsFilter.CarMakeid = carMakeID;
        objCarsFilter.CarModalId = CarModalId;
        objCarsFilter.Sort = Sort;
        objCarsFilter.Orderby = Orderby;
        objCarsFilter.ZipCode = Zipcode;

        objCarsFilter.Sort = sort;

        switch (Mileage)
        {
            case "Mileage1":
                objCarsFilter.Mileage1 = "Mileage1";
                break;
            case "Mileage2":
                objCarsFilter.Mileage2 = "Mileage2";
                break;
            case "Mileage3":
                objCarsFilter.Mileage3 = "Mileage3";
                break;
            case "Mileage4":
                objCarsFilter.Mileage4 = "Mileage4";
                break;
            case "Mileage5":
                objCarsFilter.Mileage5 = "Mileage5";
                break;
            case "Mileage6":
                objCarsFilter.Mileage6 = "Mileage6";
                break;
            case "Mileage7":
                objCarsFilter.Mileage7 = "Mileage7";
                break;
        }
        switch (Year)
        {
            case "Year1a":
                objCarsFilter.Year1a = "Year1a";
                break;
            case "Year1b":
                objCarsFilter.Year1b = "Year1b";
                break;
            case "Year1":
                objCarsFilter.Year1 = "Year1";
                break;
            case "Year2":
                objCarsFilter.Year2 = "Year2";
                break;
            case "Year3":
                objCarsFilter.Year3 = "Year3";
                break;
            case "Year4":
                objCarsFilter.Year4 = "Year4";
                break;
            case "Year5":
                objCarsFilter.Year5 = "Year5";
                break;
            case "Year6":
                objCarsFilter.Year6 = "Year6";
                break;
            case "Year7":
                objCarsFilter.Year7 = "Year7";
                break;
        }
        switch (Price)
        {
            case "Price1":
                objCarsFilter.Price1 = "Price1";
                break;
            case "Price2":
                objCarsFilter.Price2 = "Price2";
                break;
            case "Price3":
                objCarsFilter.Price3 = "Price3";
                break;
            case "Price4":
                objCarsFilter.Price4 = "Price4";
                break;
            case "Price5":
                objCarsFilter.Price5 = "Price5";
                break;
        };

        FilterCars objFilterCars = new FilterCars();

        objFilterdata = (List<CarsInfo.UsedCarsInfo>)objFilterCars.FilterSearchMobile(objCarsFilter);

        return objFilterdata;
    }
    public List<CarsInfo.UsedCarsInfo> GetCarsFilterAndroidMobile(string carMake, string CarModal,
                                  string Mileage, string Year, string Price, string Sort, string Orderby, string pageSize, string CurrentPage, string Zipcode, string AuthenticationID, string CustomerID)
    {
        CarsFilter objCarsFilter = new CarsFilter();

        Filter objFilter = new Filter();

        List<CarsInfo.UsedCarsInfo> objFilterdata = new List<CarsInfo.UsedCarsInfo>();

        CarsInfo.UsedCarsInfo OBJ = new CarsInfo.UsedCarsInfo();

        string sort = string.Empty;

        objCarsFilter.CurrentPage = CurrentPage;
        objCarsFilter.PageSize = pageSize;
        objCarsFilter.CarMakeid = carMake;
        objCarsFilter.CarModalId = CarModal;
        objCarsFilter.Sort = Sort;
        objCarsFilter.Orderby = Orderby;
        objCarsFilter.ZipCode = Zipcode;

        objCarsFilter.Sort = sort;

        switch (Mileage)
        {
            case "Mileage1":
                objCarsFilter.Mileage1 = "Mileage1";
                break;
            case "Mileage2":
                objCarsFilter.Mileage2 = "Mileage2";
                break;
            case "Mileage3":
                objCarsFilter.Mileage3 = "Mileage3";
                break;
            case "Mileage4":
                objCarsFilter.Mileage4 = "Mileage4";
                break;
            case "Mileage5":
                objCarsFilter.Mileage5 = "Mileage5";
                break;
            case "Mileage6":
                objCarsFilter.Mileage6 = "Mileage6";
                break;
            case "Mileage7":
                objCarsFilter.Mileage7 = "Mileage7";
                break;
        }
        switch (Year)
        {
            case "Year1a":
                objCarsFilter.Year1a = "Year1a";
                break;
            case "Year1b":
                objCarsFilter.Year1b = "Year1b";
                break;
            case "Year1":
                objCarsFilter.Year1 = "Year1";
                break;
            case "Year2":
                objCarsFilter.Year2 = "Year2";
                break;
            case "Year3":
                objCarsFilter.Year3 = "Year3";
                break;
            case "Year4":
                objCarsFilter.Year4 = "Year4";
                break;
            case "Year5":
                objCarsFilter.Year5 = "Year5";
                break;
            case "Year6":
                objCarsFilter.Year6 = "Year6";
                break;
            case "Year7":
                objCarsFilter.Year7 = "Year7";
                break;
        }
        switch (Price)
        {
            case "Price1":
                objCarsFilter.Price1 = "Price1";
                break;
            case "Price2":
                objCarsFilter.Price2 = "Price2";
                break;
            case "Price3":
                objCarsFilter.Price3 = "Price3";
                break;
            case "Price4":
                objCarsFilter.Price4 = "Price4";
                break;
            case "Price5":
                objCarsFilter.Price5 = "Price5";
                break;
        };

        FilterCars objFilterCars = new FilterCars();
        MobileBL objMobileBL = new MobileBL();
        if (CustomerID.Trim() != "")
        {
            string parameter = carMake + "," + CarModal + "," + Mileage + "," + Year + "," + Price + "," + Sort + "," + Orderby + "," + Zipcode;
            DataSet dsSaveCustInfo = objMobileBL.SaveMobileCustomerInfo("GetCarsFilterMobile", CustomerID, AuthenticationID, parameter);
        }
        if (AuthenticationID == ConfigurationManager.AppSettings["AppleID"].ToString())
        {
            objFilterdata = (List<CarsInfo.UsedCarsInfo>)objFilterCars.FilterSearchMobileAndroid(objCarsFilter);

        }
        return objFilterdata;
    }
    public List<CarsInfo.UsedCarsInfo> GetCarsFilterNext(ArrayList AFilter, string PageResultsCount, int CurrentPage)
    {
        //List<CarsInfo.UsedCarsInfo> obj = null;
        //Session["FilterArray"] = AFilter;

        CarsFilter objCarsFilter = new CarsFilter();

        Filter objFilter = new Filter();

        List<CarsInfo.UsedCarsInfo> objFilterdata = new List<CarsInfo.UsedCarsInfo>();

        //var = new List<CarsInfo.UsedCarsInfo>();

        //List<CarsInfo.UsedCarsInfo> objUsedCarsInfo = (List<CarsInfo.UsedCarsInfo>)Session["SearchFullCarsdata"];

        CarsInfo.UsedCarsInfo OBJ = new CarsInfo.UsedCarsInfo();

        //IList <CarsInfo.UsedCarsInfo>  = new List<CarsInfo.UsedCarsInfo>();

        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";
        }

        objCarsFilter.CurrentPage = CurrentPage.ToString();
        objCarsFilter.PageSize = PageResultsCount;
        objCarsFilter.CarMakeid = Session["carMake"].ToString();
        objCarsFilter.CarModalId = Session["CarModalId"].ToString();
        objCarsFilter.ZipCode = Session["ZipCode"].ToString();
        objCarsFilter.WithinZip = Session["WithinZip"].ToString();
        objCarsFilter.Orderby = Orderby;
        objCarsFilter.Sort = sort;

        for (int i = 0; i < AFilter.Count; i++)
        {
            switch (AFilter[i].ToString())
            {
                case "Mileage1":
                    objCarsFilter.Mileage1 = "Mileage1";
                    break;
                case "Mileage2":
                    objCarsFilter.Mileage2 = "Mileage2";
                    break;
                case "Mileage3":
                    objCarsFilter.Mileage3 = "Mileage3";
                    break;
                case "Mileage4":
                    objCarsFilter.Mileage4 = "Mileage4";
                    break;
                case "Mileage5":
                    objCarsFilter.Mileage5 = "Mileage5";
                    break;
                case "Mileage6":
                    objCarsFilter.Mileage6 = "Mileage6";
                    break;
                case "Mileage7":
                    objCarsFilter.Mileage7 = "Mileage7";
                    break;
                case "Year1a":
                    objCarsFilter.Year1a = "Year1a";
                    break;
                case "Year1b":
                    objCarsFilter.Year1b = "Year1b";
                    break;
                case "Year1":
                    objCarsFilter.Year1 = "Year1";
                    break;
                case "Year2":
                    objCarsFilter.Year2 = "Year2";
                    break;
                case "Year3":
                    objCarsFilter.Year3 = "Year3";
                    break;
                case "Year4":
                    objCarsFilter.Year4 = "Year4";
                    break;
                case "Year5":
                    objCarsFilter.Year5 = "Year5";
                    break;
                case "Year6":
                    objCarsFilter.Year6 = "Year6";
                    break;
                case "Year7":
                    objCarsFilter.Year7 = "Year7";
                    break;
                case "Price1":
                    objCarsFilter.Price1 = "Price1";
                    break;
                case "Price2":
                    objCarsFilter.Price2 = "Price2";
                    break;
                case "Price3":
                    objCarsFilter.Price3 = "Price3";
                    break;
                case "Price4":
                    objCarsFilter.Price4 = "Price4";
                    break;
                case "Price5":
                    objCarsFilter.Price5 = "Price5";
                    break;
                case "Body1":
                    objCarsFilter.Body1 = "Body1";
                    break;
                case "Body2":
                    objCarsFilter.Body2 = "Body2";
                    break;
                case "Body3":
                    objCarsFilter.Body3 = "Body3";
                    break;
                case "Body4":
                    objCarsFilter.Body4 = "Body4";
                    break;
                case "Body5":
                    objCarsFilter.Body5 = "Body5";
                    break;
                case "Body6":
                    objCarsFilter.Body6 = "Body6";
                    break;
                case "Body7":
                    objCarsFilter.Body7 = "Body7";
                    break;
                case "Body8":
                    objCarsFilter.Body8 = "Body8";
                    break;
                case "Body9":
                    objCarsFilter.Body9 = "Body9";
                    break;
                case "Fuel1":
                    objCarsFilter.Fuel1 = "Fuel1";
                    break;
                case "Fuel2":
                    objCarsFilter.Fuel2 = "Fuel2";
                    break;
                case "Fuel3":
                    objCarsFilter.Fuel3 = "Fuel3";
                    break;
                case "Fuel4":
                    objCarsFilter.Fuel4 = "Fuel4";
                    break;
                case "Fuel5":
                    objCarsFilter.Fuel5 = "Fuel5";
                    break;
                case "Seller1":
                    objCarsFilter.Seller1 = "Seller1";
                    break;
                case "Seller2":
                    objCarsFilter.Seller2 = "Seller2";
                    break;
                case "withpic":
                    objCarsFilter.WithPic = true;
                    break;
                case "withoutpic":
                    objCarsFilter.WithPic = false;
                    break;
            };
        }
        FilterCars objFilterCars = new FilterCars();

        objFilterdata = (List<CarsInfo.UsedCarsInfo>)objFilterCars.FilterSearch(objCarsFilter);

        Session["SearchCarsdata"] = objFilterdata;

        return objFilterdata;
        //
    }