Exemplo n.º 1
0
        private async void ListView_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            if (currentUser == 0)
            {
                await DisplayAlert("Warning", "Please Login First", "Ok");
            }
            else
            {
                var userOrgan = e.Item as OrganDetail;

                MainQuizIcons.IsVisible = true;
                QuizOptions.IsVisible   = false;


                UserChoice                = new UserChoice();
                UserChoice.UserID         = currentUser;
                UserChoice.OrganDetailID  = userOrgan.ID;
                HomeViewModel.UserChoices = await HomeViewModel.PostUserChoice(UserChoice);

                EditQuiz editQuiz = new EditQuiz();
                editQuiz.userId           = currentUser;
                editQuiz.organDetailId    = userOrgan.ID;
                HomeViewModel.UserChoices = await HomeViewModel.EditUserChoice(editQuiz);
            }
        }