Beispiel #1
0
        /**
         * Predefined query with the given argument;
         * TODO - Make another class that will manage all possible queries by chaining statements
         */
        private bool QueryBuilder(RealEstateInterface arg)
        {
            double.TryParse(areaConstraint.Value.ToString(), out double areaConst);
            decimal maxPrice = priceConstraint.Value;
            string  region   = regionConstraint.Text;
            bool    flag     = true;

            if (areaConst > 0 && arg.getArea() > areaConst)
            {
                flag = false;
            }

            if (maxPrice > 0 && arg.getPrice() > maxPrice)
            {
                flag = false;
            }

            if (region.Length > 0 && !arg.getRegion().Contains(region))
            {
                flag = false;
            }

            return(flag);
        }
Beispiel #2
0
 /**
  * Add entry to the DataGrid
  * Visualisation of the Real Estate Data
  */
 private void addToDataGrid(RealEstateInterface realEstate)
 {
     this.table.Rows.Add(realEstate.GetInfoAsArray());
 }
Beispiel #3
0
 /**
  * Add entry to the Internal List for further computation
  */
 private void addInternalStorage(RealEstateInterface realEstate)
 {
     this.realEstates.Add(realEstate);
 }
 public ClassChange(RealEstateInterface realestate);