Beispiel #1
0
 private void btnRegistrar_Click(object sender, EventArgs e)
 {
     Alu.Dni             = txtDni.Text;
     Alu.Apellidos       = txtApellidos.Text;
     Alu.Nombres         = txtNombre.Text;
     Alu.Sexo            = rbnMasculino.Checked == true ? 'M':'F';
     Alu.FechaNacimiento = Convert.ToDateTime(dateTimePicker1.Value);
     Alu.Direccion       = txtDireccion.Text;
     MessageBox.Show(Alu.RegistrarAlumnos(), "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
     Limpiar();
 }
Beispiel #2
0
 private void btnRegistrar_Click(object sender, EventArgs e)
 {
     try
     {
         Alu.m_Dni       = txtDni.Text;
         Alu.m_Apellidos = txtApellidos.Text;
         Alu.m_Nombres   = txtNombre.Text;
         Alu.m_Sexo      = rbnMasculino.Checked == true ? 'M' : 'F';
         Alu.m_FechaNac  = Convert.ToDateTime(dateTimePicker1.Value);
         Alu.m_Direccion = txtDireccion.Text;
         MessageBox.Show(Alu.RegistrarAlumnos(), "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Limpiar();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }