コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (Util.Util.validarNombreApellido(cbNom.Text))
     {
         if (Util.Util.isNumeric(int.Parse(numCap.Value.ToString()).ToString()))
         {
             nombre    = cbNom.Text;
             capacidad = int.Parse(numCap.Value.ToString());
             if (!co.encontradoAula(nombre) || aula.NOMBRE == nombre)
             {
                 co.ModificarAula(idA, nombre, capacidad);
                 MessageBox.Show("Aula modificada correctamente");
                 this.Dispose();
             }
             else
             {
                 MessageBox.Show("Ya existe un aula con ese nombre");
             }
         }
         else
         {
             MessageBox.Show("Formato de Capacidad inválido");
         }
     }
     else
     {
         MessageBox.Show("Formato de Nombre inválido");
     }
 }