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

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

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

            using (TransactionScope ts = new TransactionScope())
            {
                alumno.moificarAlumno(paramAlumno);

                matAlumnoBLL.eliminarMateriaAlumno(paramAlumno.matricula);

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

                ts.Complete();
            }
        }