/// <summary> para menu contextual de grupo </summary>
        private static void editarM_Click(object sender, EventArgs e)
        {
            int idMateria = int.Parse((sender as MenuItem).Name.Replace("Editar", ""));

            FormAgregarMateria modoficarMateria = new FormAgregarMateria(dbConection.getMateria(idMateria));

            modoficarMateria.ShowDialog(Program.listaMaterias);
        }
Example #2
0
 private void btnAgregarMateria_Click(object sender, EventArgs e)
 {
     if (materias.Count <= 10)
     {
         FormAgregarMateria nuevaMateria = new FormAgregarMateria(idGrupo);
         nuevaMateria.ShowDialog(this);
     }
     else
     {
         MessageBox.Show("Sólo se pueden agregar 10 materias por grupo", "Error al agregar materia", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }