private void MappingThisFromAnother(Alumno_Web objeto) { this.Rut = objeto.Rut; this.DigitoV = objeto.DigitoV; this.Nombre = objeto.Nombre; this.APaterno = objeto.APaterno; this.AMaterno = objeto.AMaterno; this.Apoderado = objeto.Apoderado; this.Curso = objeto.Curso; }
public async Task <bool> ReadPorRut(int rut) { try { HttpResponseMessage responseMessage = await client.GetAsync(string.Format("{0}/{1}/{2}", url, "alumno/por-rut", rut)); if (responseMessage.IsSuccessStatusCode) { var responseData = responseMessage.Content.ReadAsStringAsync().Result; Alumno_Web retorno = JsonConvert.DeserializeObject <Alumno_Web>(responseData); MappingThisFromAnother(retorno); return(true); } return(false); } catch (Exception) { return(false); throw; } }