示例#1
0
        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);
        }
示例#2
0
        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;
            }
        }