Example #1
0
        private void btnCrear_OnClick(object sender, EventArgs e)
        {
            director = new DirectorTecnico(this.txtNombre.Text, this.txtApellido.Text, (int)this.nudEdad.Value, (int)this.nupDni.Value, (int)this.nupExperiencia.Value);

            MessageBox.Show(" Se ha creado el DT!");
            MessageBox.Show(director.Mostrar());
        }
Example #2
0
 private void buttonValidar_Click(object sender, EventArgs e)
 {
     if (dt is null)
     {
         MessageBox.Show("Aún no se ha creado el DT del formulario");
     }
     else if (dt.ValidarAptitud())
     {
         MessageBox.Show("El DT es apto.");
         MessageBox.Show(dt.Mostrar());
         TextBox info = new TextBox();
         info.Text = dt.Mostrar();
         info.Show();
     }
     else
     {
         MessageBox.Show("El DT no es apto.");
         MessageBox.Show(dt.Mostrar());
     }
 }
Example #3
0
        private void buttonCrear_Click(object sender, EventArgs e)
        {
            string nombre      = this.textBoxNombre.Text;
            string apellido    = this.textBoxApellido.Text;
            int    edad        = (int)this.numericUpDownEdad.Value;
            int    dni         = (int)this.numericUpDownDni.Value;
            int    experiencia = (int)this.numericUpDownExperiencia.Value;

            this.dt = new DirectorTecnico(nombre, apellido, edad, dni, experiencia);

            string mostrar = dt.Mostrar();

            MessageBox.Show("DT creado:" + mostrar);
        }
Example #4
0
 private void btnCrear_Click(object sender, EventArgs e)
 {
     this.dt = new DirectorTecnico(this.txtNombre.Text, this.txtApellido.Text, (int)this.nudEdad.Value, (int)this.nudDni.Value, (int)this.nudExperiencia.Value);
     MessageBox.Show($"Se a creado un director tecnico:\r\n {dt.Mostrar()}", "DT CREADO");
 }