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(); } }
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(); } }