Exemplo n.º 1
0
        private void ButtonGuardar_Click(object sender, RoutedEventArgs e)
        {
            if (CheckFields() == CheckResult.Passed)
            {
                ComboBoxItem cg           = (ComboBoxItem)comboGenero.SelectedValue;
                String       genero       = "" + cg.Content;
                ComboBoxItem cb           = (ComboBoxItem)comboLicenciatura.SelectedValue;
                String       licenciatura = "" + cb.Content;
                EgresadoDAO  egresadoDAO  = new EgresadoDAO();

                egresadoDAO.CrearEgresado(textboxMatricula.Text, textboxNombre.Text, textboxApellidos.Text,
                                          licenciatura, textboxCorreo.Text, textboxTelefono.Text,
                                          genero);
                consultarEgresados consultarE = new consultarEgresados();
                consultarE.Show();
                this.Close();
            }
            else
            {
                System.Windows.MessageBox.Show("Modifique el/los campos...");
            }
        }