예제 #1
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     if (txtnom.Text.Length != 0)
     {
         Curso c = logicaC.buscarPorNombre(txtnom.Text);
         if (c != null)
         {
             txtid.Text         = c.id;
             txtnom.Text        = c.nombre;
             txtdesc.Text       = c.descripcion;
             txtfecfin.Value    = c.fecha_inicio_clases;
             txtfecini.Value    = c.fecha_fin_clases;
             txtvalor.Text      = c.valor_mensualidad.ToString();
             comboprofesor.Text = c.profesor.nombre;
             labelid.Text       = "Id del curso seleccionado " + c.id;
         }
         else
         {
             MessageBox.Show("Este curso no esta registrado");
         }
     }
     else
     {
         MessageBox.Show("Error. Debe llenar el cambo nombre perteneciente al curso para realizar esta operacion");
     }
 }
예제 #2
0
 private void combocurso_SelectedIndexChanged(object sender, EventArgs e)
 {
     labelprocur.Text = "Profesor del curso: " + logicaC.buscarPorNombre(combocurso.Text).profesor.nombre;
 }