Exemple #1
0
        ///

        private void BtnIngresar_Click(object sender, EventArgs e)
        {
            if (txtID.Text.Length > 0 && txtNombre.Text.Length > 0)
            {
                if (consul.ExitsAlumno(txtID.Text) == false)
                {
                    consul.AddAlumno(txtID.Text, txtNombre.Text);
                    txtID.Clear();
                    txtNombre.Clear();
                    MostrarAlumnos();
                }
                else
                {
                    MessageBox.Show("ERROR\n\nYa existe un Alumno con ese ID ", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("ERROR\n\nCampos Vacios", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }