Ejemplo n.º 1
0
        /// <summary>
        /// <para>Performs the search method:
        /// Search Rural Property.
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="page">	Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <param name="region">Specifies the search region ID.</param>
        /// <param name="district">Specifies the search district ID.</param>
        /// <param name="suburb">Specifies the search suburb ID.</param>
        /// <param name="dateFrom">Specifies minimum start date for returned listings.</param>
        /// <param name="priceMin">Minimum property price.</param>
        /// <param name="priceMax">Maximum property price.</param>
        /// <param name="landAreaMin">Minimum land area in square meters.</param>
        /// <param name="landAreaMax">Maximum land area in square meters.</param>
        /// <param name="usage">The usage of the property.</param>
        /// <returns>Properties.</returns>
        public global::Properties SearchRuralProperties(
            string searchString,
            PropertySortOrder sortOrder,
            int? page,
            int? rows,
            int? region,
            int? district,
            int? suburb,
            DateTime dateFrom,
            int? priceMin,
            int? priceMax,
            int? landAreaMin,
            int? landAreaMax,
            RuralPropertyUsage usage)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchRuralProperties(searchString, sortOrder, page, rows, region, district, suburb, dateFrom, priceMin, priceMax, landAreaMin, landAreaMax, usage);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// <para>Performs the search method:
        /// Search Rural Property.
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="page">	Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <param name="region">Specifies the search region ID.</param>
        /// <param name="district">Specifies the search district ID.</param>
        /// <param name="suburb">Specifies the search suburb ID.</param>
        /// <param name="dateFrom">Specifies minimum start date for returned listings.</param>
        /// <param name="priceMin">Minimum property price.</param>
        /// <param name="priceMax">Maximum property price.</param>
        /// <param name="landAreaMin">Minimum land area in square meters.</param>
        /// <param name="landAreaMax">Maximum land area in square meters.</param>
        /// <param name="usage">The usage of the property.</param>
        /// <returns>Properties.</returns>
        public global::Properties SearchRuralProperties(
            string searchString,
            PropertySortOrder sortOrder,
            int? page,
            int? rows,
            int? region,
            int? district,
            int? suburb,
            DateTime dateFrom,
            int? priceMin,
            int? priceMax,
            int? landAreaMin,
            int? landAreaMax,
            RuralPropertyUsage usage)
        {
            var url = String.Format(Constants.Culture, "{0}{1}/{2}/Rural{3}", _connection.BaseUrl, Constants.SEARCH, Constants.PROPERTY, Constants.XML);
            _addAnd = false;
            var conditions = "?";

            // create the parameters for the query string
            conditions += this.RuralPropertiesHelper(
                searchString,
                sortOrder.ToString(),
                page,
                rows,
                region,
                district,
                suburb,
                dateFrom,
                priceMin,
                priceMax,
                null,
                null,
                landAreaMin,
                landAreaMax,
                null,
                usage.ToString());

            // add the parameters to the query string if there are any
            if (conditions.Equals("?"))
            {
                url += conditions;
            }

            // perform the request
            return this.PropertyConnectionHelper(url);
        }