Пример #1
0
        private void seleccionMateria(object sender, DataGridViewCellEventArgs e)
        {
            if ((e.ColumnIndex == dgvMateriaBuscar.Columns["Modificar"].Index) && (e.ColumnIndex >= -1))
            {
                frmMateriaNuevo materiaModificar = new frmMateriaNuevo();

                materiaModificar.MateriaModificada = new Materia(dgvMateriaBuscar.CurrentRow.Cells[0].Value.ToString(),
                                                                 dgvMateriaBuscar.CurrentRow.Cells[1].Value.ToString());

                materiaModificar.ShowDialog(this);

                lblMateriaBuscarMateriaError.Text = "MATERIA MODIFICADA CON EXITO";

                loadMateriaBuscar();
            }

            if ((e.ColumnIndex == dgvMateriaBuscar.Columns["Eliminar"].Index) && (e.ColumnIndex >= -1))
            {
                Materia.Delete(new Materia(dgvMateriaBuscar.CurrentRow.Cells[0].Value.ToString()));

                lblMateriaBuscarMateriaError.Text = "MATERIA ELIMINADA CON EXITO";

                loadMateriaBuscar();
            }
        }
Пример #2
0
 private void nuevoToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     frmMateriaNuevo unfrmMateriaNuevo = new frmMateriaNuevo();
     unfrmMateriaNuevo.ShowDialog(this);
 }