/// <summary> /// Get client from database /// </summary> private async void ObtenerCliente() { Animacion.ShowLoader(this); try { string telefono = txtTelefono.Text.ToUpper().Trim(); if (telefono != "") { IServiceTeatro servicio = Contenedor.current.Resolve <IServiceTeatro>(); Cliente cliente = await servicio.GetClienteByTelefonoAsync(telefono); if (cliente != null) { txtApeMat.Text = cliente.Apellidomaterno; txtApePat.Text = cliente.ApellidoPaterno; txtNombre.Text = cliente.Nombre; txtTelefono.Text = cliente.Telefono; ConfirmReservation.Correo = cliente.Correo; } else { ClearFields(); } } } catch (Exception ex) { MessageBox.Show("Ocurrió un error: " + ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } Animacion.HideLoader(this); }