private void obtener() { string ls_token = WebConfigurationManager.AppSettings["token"]; SolicitudServWS.Solicitud solicitud = null; SolicitudServWS.SolicitudServiceClient solicitudService = new SolicitudServWS.SolicitudServiceClient(); solicitud = solicitudService.Obtener(int.Parse(txtIdPreMatricula.Value), txtDNI.Value); if (solicitud != null) { txtDNIApoderado.Value = solicitud.NroDniApoderado; txtNombres.Value = solicitud.NombreApellidoAlumno; txtNivel.Value = solicitud.Nivel; txtGrado.Value = solicitud.Grado; txtTipo.Value = solicitud.Tipo; txtEstado.Value = solicitud.Estado; txtSolicitud.Value = solicitud.FechaSolicitud.ToString("dd/MM/yyyy"); if (solicitud.FechaCita != DateTime.MinValue) { txtCita.Value = solicitud.FechaCita.ToString("dd/MM/yyyy"); } txtObservaciones.Value = solicitud.Observaciones; txtCertificado.Value = solicitud.Certificado; txtIdNivel.Value = solicitud.IdNivel.ToString(); txtNombreApoderado.Value = solicitud.apoderado.Nombres + " " + solicitud.apoderado.ApellidoPaterno; txtCorreoApoderado.Value = solicitud.apoderado.Correo; txtNroCelularApoderado.Value = solicitud.apoderado.NroCelular; } HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://localhost:50925/EstudianteService.svc/Estudiante/" + ls_token + "/" + txtDNI.Value); request.Method = "GET"; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream()); string tramaJson = reader.ReadToEnd(); JavaScriptSerializer js = new JavaScriptSerializer(); List <Estudiante> estudiantesObtenidos = js.Deserialize <List <Estudiante> >(tramaJson); if (estudiantesObtenidos.Count > 0) { for (int i = 0; i < estudiantesObtenidos.Count; i++) { if (estudiantesObtenidos[i].Deuda > 0) { txtAlertas.Value = txtAlertas.Value + "- El alumno debe " + estudiantesObtenidos[i].Deuda.ToString("#,###.00") + " del año " + estudiantesObtenidos[i].Anho.ToString() + Environment.NewLine; } } } }