コード例 #1
0
        private void btnEditarF2_Click(object sender, EventArgs e)
        {
            if (dataGridView2.SelectedRows.Count > 0)
            {
                FormMantEstudiantes frm = new FormMantEstudiantes();


                //EDITAR
                //frm.Editar = true;
                frm.Operacion = "Editar";
                frm.MostrarCarreras();
                frm.Materias();

                frm.idEstudiante = dataGridView2.CurrentRow.Cells["Id_Estudiante"].Value.ToString();

                frm.maskedtxtMatricula.Text = dataGridView2.CurrentRow.Cells["Matricula_Estudiante"].Value.ToString();
                frm.txtNombre.Text          = dataGridView2.CurrentRow.Cells["Nombre_Estudiante"].Value.ToString();
                frm.txtApellido.Text        = dataGridView2.CurrentRow.Cells["Apellido_Estudiante"].Value.ToString();
                frm.cbmCarrera.Text         = dataGridView2.CurrentRow.Cells["Nombre_Carrera"].Value.ToString();
                frm.maskedTxtTelefono.Text  = dataGridView2.CurrentRow.Cells["TELEFONO"].Value.ToString();

                frm.ShowDialog();
                MostrarEstudiantes();
            }
            else
            {
                MessageBox.Show("Seleccione una fila por favor");
            }
        }
コード例 #2
0
        private void MostrarCarreras()
        {
            CN_Estudiantes      objeto = new CN_Estudiantes();
            FormMantEstudiantes frm    = new FormMantEstudiantes();

            frm.cbmCarrera.DataSource    = objeto.MostrarCarr();
            frm.cbmCarrera.DisplayMember = "Nombre_Carrera";
            frm.cbmCarrera.ValueMember   = "Id_Carrera";
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            FormMantEstudiantes frm = new FormMantEstudiantes();

            frm.Operacion = "Insertar";
            frm.MostrarCarreras();
            frm.Materias();

            frm.ShowDialog();
            MostrarEstudiantes();
        }