Ejemplo n.º 1
0
        private async Task SaveButton_Clicked(object sender, EventArgs e)
        {
            try
            {
                registerCounselViewModel.IsBusy = true;

                CounselDto counsel         = buildCounsel();
                CounselDto responseCounsel = await counselService.RegisterCounsel(counsel);

                if (responseCounsel != null)
                {
                    await alertDisplayer.DisplayAlert(this, "Asesoría", "Asesoría registrada exitosamente!", "Ok");

                    App.Current.MainPage = new Dashboard.DashboardPage();
                }
            }
            catch (Exception ex)
            {
                exceptionHandler.HandleException(this, ex);
            }
            finally { registerCounselViewModel.IsBusy = false; }
        }