private void AddHouseList(HouseInformation houseInformation) { var houseInfosElementJson = HouseList.Add(); houseInfosElementJson.Date = houseInformation.Date.ToShortDateString(); houseInfosElementJson.Address = houseInformation.Number + ", " + houseInformation.Street + ", " + houseInformation.City + houseInformation.Country; houseInfosElementJson.Price = houseInformation.Price; houseInfosElementJson.Commission = houseInformation.Commission; }
private void ChangeStreet(int?streetId) { HouseList.Clear(); if (!streetId.HasValue) { return; } foreach (var house in _requestService.GetHouses(streetId.Value).OrderBy(s => s.Building?.PadLeft(6, '0')).ThenBy(s => s.Corpus?.PadLeft(6, '0'))) { HouseList.Add(house); } OnPropertyChanged(nameof(HouseList)); }
private void RefreshHouses(StreetDto street) { HouseList.Clear(); if (street == null) { return; } RequestService.GetHouses(street.Id, SelectedCompany?.Id).ToList().ForEach(h => HouseList.Add(h)); }