public List <Internado> ListInternado() { List <Internado> list; try { // ACCEDIENDO AL WEB SERVICE WSInternado wsinternado = new WSInternado(); list = wsinternado.ListInternado(); } catch (Exception e) { throw e; } return(list); }
//public void CargarDoctores(Doctor objDoctor) //{ // List<Doctor> listDoctores = new List<Doctor>(); // WSDoctor wsdoctor = new WSDoctor(); // listDoctores = wsdoctor.ListDoctorPorServicio(objDoctor); // this.doctor.DataSource = listDoctores; // this.doctor.DataValueField = "idDoctor"; // this.doctor.DataTextField = "name"; // this.doctor.DataBind(); // this.doctor.Items.Insert(0, new ListItem("-- SELECCIONE EL DOCTOR --")); //} protected void BtnInsert_Click(object sender, EventArgs e) { // REGISTRANDO INTERNADO Internado objInternado = GetValues(); // ACCEDIENDO AL WEB SERVICE WSInternado wsinternado = new WSInternado(); bool response = wsinternado.InsertInternado(objInternado); if (response) { this.divSuccess.Visible = true; this.TextSuccess.Text = "¡Internamiento realizado con éxito!"; this.paciente.Items.Clear(); this.servicio.Items.Clear(); this.fechaIngreso.Text = string.Empty; CargarServicios(); CargarPacientes(); } else { this.divError.Visible = true; this.TextError.Text = "¡El internamiento no fue realizado!"; } }