Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            String msj = "";

            try
            {
                Al.m_Dni       = txtDni.Text;
                Al.m_Apellidos = txtApellidos.Text;
                Al.m_Nombres   = txtNombre.Text;
                Al.m_Sexo      = rbnMasculino.Checked == true ? 'M' : 'F';
                Al.m_FechaNac  = dateTimePicker1.Value;
                Al.m_Direccion = txtDireccion.Text;

                msj = Al.Registrar_Alumnos();

                MessageBox.Show(msj);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //Comentario // Comentrario 2
            Boolean mesj;

            try
            {
                Al.m_Dni       = txtdni.Text;
                Al.m_Apellidos = txtapellidos.Text;
                Al.m_Nombres   = txtnombres.Text;
                Al.m_Sexo      = rbtM.Checked == true ? 'M' : 'F';
                Al.m_FechaNac  = dateTimePicker1.Value;
                Al.m_Direccion = txtdireccion.Text;

                mesj = Al.Registrar_Alumnos();
                MessageBox.Show(mesj.ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }