Exemple #1
0
        public void eliminarAlumno(int matricula)
        {
            AlumnoDAL        alumno    = new AlumnoDAL();
            MateriaAlumnoBLL matAlumno = new MateriaAlumnoBLL();

            using (TransactionScope ts = new TransactionScope()) {
                matAlumno.eliminarMaterias(matricula);
                alumno.eliminarAlumno(matricula);

                ts.Complete();
            }
        }
Exemple #2
0
        public void modificarAlumno(Alumno paramAlumno, List <MateriaAlumno> listMaterias)
        {
            AlumnoDAL        alumno       = new AlumnoDAL();
            MateriaAlumnoBLL matAlumnoBLL = new MateriaAlumnoBLL();

            using (TransactionScope ts = new TransactionScope())
            {
                alumno.modificarAlumno(paramAlumno);
                matAlumnoBLL.eliminarMaterias(paramAlumno.matricula);

                foreach (MateriaAlumno materia in listMaterias)
                {
                    matAlumnoBLL.agregarMateriaAlumno(materia);
                }
                ts.Complete();
            }
        }