public async System.Threading.Tasks.Task <Domain.Models.ResponseModels.FormsGroupModel> GetFormCategoriesAsync() { Domain.Models.RequestModels.FormsGroupModel domainUser = new Domain.Models.RequestModels.FormsGroupModel(); domainUser.ApplicationId = Settings.GetApplicationId(); domainUser.SerialNumber = Settings.GetSerialNumber(); domainUser.Version = Settings.GetVersion(); domainUser.AuthToken = Settings.GetAuthorizationToken(); domainUser.AccessToken = Settings.GetAccessToken(); // TODO: Call the REST Service for authentication Domain.Models.ResponseModels.FormsGroupModel res = await _authService.GetFormCategoriesAsync(domainUser); return(res); }
protected override async void OnAppearing() { base.OnAppearing(); try { //record = await ViewModel.GetFormGroupsAsync(); record = await ViewModel.GetFormCategoriesAsync(); } catch { await DisplayAlert("Sorry!", "Something went wrong", "OK"); } if (record != null) { ac.IsVisible = false; stkFinal.IsVisible = true; listForms.ItemsSource = record.FormGroups; this.BackgroundColor = Color.White; this.Opacity = 1; } }