Example #1
0
        /// <summary>
        /// Obtener nombre segun CodPers
        /// </summary>
        /// <returns></returns>
        public static async Task <string> GetNombre(Docentes_GetBindingModel model)
        {
            string json = await GetAPI("api/Docentes/" + model.QueryString());

            try
            {
                JsonValue jsonValue = JsonValue.Parse(json);

                return(jsonValue.GetString());
            }
            catch (Exception)
            {
                rootPage.NotifyUser("Error al procesar los datos obtenidos", NotifyType.ErrorMessage);

                throw;
            }
        }
Example #2
0
        private async void setNombre()
        {
            try
            {
                Docentes_GetBindingModel model = new Docentes_GetBindingModel();
                model.ID = codpers;

                this.nombre = await DocentesModel.GetNombre(model);
            }
            catch (Exception)
            {
                this.nombre = string.Empty;
            }
            finally
            {
                OnPropertyChanged("Nombre");
            }
        }