public void CargarDoctores() { List <Doctor> list = new List <Doctor>(); WSDoctor wsdoctor = new WSDoctor(); list = wsdoctor.ListDoctor(); this.doctor.DataSource = list; this.doctor.DataValueField = "idDoctor"; this.doctor.DataTextField = "name"; this.doctor.DataBind(); this.doctor.Items.Insert(0, new ListItem("-- SELECCIONE UN DOCTOR --")); }
public List<Doctor> ListDoctors() { List<Doctor> list; try { // ACCEDIENDO AL WEB SERVICE WSDoctor wsdoctor = new WSDoctor(); list = wsdoctor.ListDoctor(); } catch (Exception e) { throw e; } return list; }