Beispiel #1
0
 private void txtValorHora_KeyPress(object sender, KeyPressEventArgs e)
 {
     Validaciones.SoloNumeros(e);
 }
Beispiel #2
0
 private void txtDNIResponsable_KeyPress(object sender, KeyPressEventArgs e)
 {
     Validaciones.SoloNumeros(e);
 }
Beispiel #3
0
 private void txtNombre_KeyPress(object sender, KeyPressEventArgs e)
 {
     Validaciones.SoloLetras(e);
 }
Beispiel #4
0
 private void txtApellidoResponsable_KeyPress(object sender, KeyPressEventArgs e)
 {
     Validaciones.SoloLetras(e);
 }
Beispiel #5
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            switch (this.tipoAlta)
            {
            case EAlta.Docente:
                docente = new Docente(txtNombre.Text, txtApellido.Text, int.Parse(txtDni.Text), Validaciones.ValidarSexo(cmbSexo.Text), dtmHoraEntrada.Value, dtmHoraSalida.Value, double.Parse(txtValorHora.Text));
                docentes.Add(docente);
                MessageBox.Show("Docente ingresado correctamente", "Aviso");
                break;

            case EAlta.NoDocente:
                noDocente = new Administrativo(txtNombre.Text, txtApellido.Text, int.Parse(txtDni.Text), Validaciones.ValidarSexo(cmbSexo.Text), dtmHoraEntrada.Value, dtmHoraSalida.Value, Validaciones.ValidarCargo(cmbCargo.Text));
                noDocentes.Add(noDocente);
                MessageBox.Show("Personal ingresado correctamente", "Aviso");
                break;

            case EAlta.Alumno:
                alumno             = new Alumno(txtNombre.Text, txtApellido.Text, int.Parse(txtDni.Text), Validaciones.ValidarSexo(cmbSexo.Text), double.Parse(txtPrecioCuota.Text), int.Parse(txtLegajo.Text));
                responsable        = new Responsable(txtNombreResponsable.Text, txtApellidoResponsable.Text, int.Parse(txtDNIResponsable.Text), Validaciones.ValidarSexo(cmbSexoResponsable.Text), Validaciones.ValidarParentesco(cmbParentescoResponsable.Text), txtTelResponsable.Text);
                alumno.Responsable = responsable;
                alumnos.Add(alumno);
                MessageBox.Show("Alumno ingresado correctamente", "Aviso");
                break;

            default:
                break;
            }
        }