/** * 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); }
/** * Add entry to the DataGrid * Visualisation of the Real Estate Data */ private void addToDataGrid(RealEstateInterface realEstate) { this.table.Rows.Add(realEstate.GetInfoAsArray()); }
/** * Add entry to the Internal List for further computation */ private void addInternalStorage(RealEstateInterface realEstate) { this.realEstates.Add(realEstate); }
public ClassChange(RealEstateInterface realestate);