async Task getHouse() { groups = await _server.GetHouse(); if (groups.Error == null) { FrameBtnAdd.IsVisible = false; LabelHouseRoom.Text = AppResources.FlatChoose; StackLayoutHouseRoom.IsVisible = false; StackLayoutLs.IsVisible = false; string[] param = null; setListHouse(groups, ref param); var action = await DisplayActionSheet(AppResources.HomeChoose, AppResources.Cancel, null, param); if (action != null && !action.Equals(AppResources.Cancel)) { LabelHouse.Text = action; StackLayoutHouseRoom.IsVisible = true; } } else { await DisplayAlert(AppResources.ErrorTitle, groups.Error, "OK"); } }
async void getGroups() { ItemsList <NamedValue> result = await _server.GetHouseGroups(); ItemsList <HouseProfile> resultHouse = await _server.GetHouse(); groups = new ObservableCollection <NamedValue>(result.Data); HouseProfiles = new ObservableCollection <HouseProfile>(resultHouse.Data.Where(x => x.Address != null)); DefaultHouses = resultHouse.Data; BindingContext = this; }