Beispiel #1
0
        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 --"));
        }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 protected void BtnInsert_Click(object sender, EventArgs e)
 {
     // OBTENIENDO LOS DATOS DEL DOCTOR
     Doctor objDoctor = GetValues();
     // ACCEDIENDO AL WEB SERVICE
     WSDoctor wsdoctor = new WSDoctor();
     bool response = wsdoctor.InsertDoctor(objDoctor);
     if (response)
     {
         this.divSuccess.Visible = true;
         this.TextSuccess.Text = "¡Doctor creado con éxito!";
         this.txtNumColegiado.Text = string.Empty;
         this.txtName.Text = string.Empty;
         this.txtAddress.Text = string.Empty;
         this.txtTelephone.Text = string.Empty;
         this.service.Items.Clear();
         CargarServicios();
     }
     else
     {
         this.divError.Visible = true;
         this.TextError.Text = "¡El doctor no fue creado!";
     }
 }