Exemplo n.º 1
0
        public void AcceptConsultant(string username)
        {
            var task = conService.ValidatePendingConsultant(username, true);

            task.Wait();
            var responses = task.Result;

            Assert.True(responses.Select(r => r.Code == ApiResponseCode.UpdateSuccess).FirstOrDefault());
        }
        public async void UpdateRegistration(int position, bool accept)
        {
            Consultant consultant = consultants[position];

            try
            {
                List <ApiResponse> response = await consultantService.ValidatePendingConsultant(consultant.Username, accept);

                if (response.First().Code == ApiResponseCode.UpdateSuccess)
                {
                    view.ShowToastMessage("Operation Completed Successfully!");
                }
            }
            catch (RequestFailedException e)
            {
                view.ShowToastMessage("Problem: An Error Occured! " + e.Message);
            }
        }