public static async Task <string> GetNombre(Empleados_GetBindingModel model) { string json = await GetAPI("api/Empleados/" + model.QueryString()); try { JsonValue jsonValue = JsonValue.Parse(json); return(jsonValue.GetString()); } catch (Exception) { rootPage.NotifyUser("Error al procesar los datos obtenidos", NotifyType.ErrorMessage); throw; } }
private async void setNombre() { try { Empleados_GetBindingModel model = new Empleados_GetBindingModel(); model.ID = emplid; this.nombre = await EmpleadosModel.GetNombre(model); } catch (Exception) { this.nombre = string.Empty; } finally { OnPropertyChanged("Nombre"); } }