private async void BtnGuardar_Clicked(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtNombre.Text)) { await DisplayAlert("Error", "Debe Ingresar Nombre", "Aceptar"); this.txtNombre.Focus(); return; } if (string.IsNullOrEmpty(txtRut.Text)) { await DisplayAlert("Error", "Debe Ingresar Rut", "Aceptar"); this.txtRut.Focus(); return; } Empleado empleado = new Empleado { IDEmpleado = this.empleado.IDEmpleado, Rut = txtRut.Text, Nombre = txtNombre.Text }; using (var datos = new DataAccess()) { datos.ActualizarEmpleado(empleado); } await DisplayAlert("Actualizado", "Invitado actualizado correctamente", "Aceptar"); this.btnBorrar.IsEnabled = false; this.btnGuardar.IsEnabled = false; await Navigation.PopAsync(); } catch (Exception ex) { await DisplayAlert("Error", ex.ToString(), "Aceptar"); return; } }