示例#1
0
 public void Set(PropertyType propertyType, Bed minBeds, int minLand, Price minPrice, Price maxPrice, Location location, ConstructionType constructionType, CarSpace minCarSpaces, Bathroom minBathrooms, Bed maxBeds, bool isIncludingSurroundingSuburbs, bool isExcludingPropertiesUnderContract)
 {
     this.propertyType     = propertyType;
     this.minBeds          = minBeds;
     this.minLand          = minLand;
     this.minPrice         = minPrice;
     this.maxPrice         = maxPrice;
     this.location         = location;
     this.constructionType = constructionType;
     this.minCarSpaces     = minCarSpaces;
     this.minBathrooms     = minBathrooms;
     this.maxBeds          = maxBeds;
     this.isIncludingSurroundingSuburbs      = isIncludingSurroundingSuburbs;
     this.isExcludingPropertiesUnderContract = isExcludingPropertiesUnderContract;
 }
示例#2
0
        public string GetParameters(ConstructionType constructionType, CarSpace minCarSpaces, Bathroom minBathrooms, Bed minBeds, Bed maxBeds, bool isIncudingSurroundingSuburbs, bool isExcludingPropertiesUnderContract, string source)
        {
            var parameters = "?";

            if (constructionType != ConstructionType.Any)
            {
                parameters += GetConstructionTypeQuery(constructionType);
                parameters += "&";
            }

            if (minCarSpaces != CarSpace.Any)
            {
                parameters += GetMinCarSpacesQuery(minCarSpaces);
                parameters += "&";
            }

            if (minBathrooms != Bathroom.Any)
            {
                parameters += GetMinBathroomsQuery(minBathrooms);
                parameters += "&";
            }

            if (minBeds != Bed.Any)
            {
                parameters += GetMaxBedsQuery(maxBeds);
                parameters += "&";
            }

            if (!isIncudingSurroundingSuburbs)
            {
                parameters += GetSurroundingSuburbsQuery();
                parameters += "&";
            }

            if (isExcludingPropertiesUnderContract)
            {
                parameters += GetPropertiesUnderContractQuery();
                parameters += "&";
            }

            parameters += GetSourceQuery(source);

            return(parameters);
        }
示例#3
0
 public string GetMinCarSpacesQuery(CarSpace minCarSpaces)
 {
     return(string.Concat("numParkingSpaces=", CarSpaces[minCarSpaces]));
 }