public void BorrarAsuntos(List <Models.AsuntoCat> lista) { Guid methodOwnerID = new Guid("24F47F9E-3364-41FF-A033-51DCB288D780"); OpenDbConn(); if (cDblib.Transaction.ownerID.Equals(new Guid())) { cDblib.beginTransaction(methodOwnerID); } try { DAL.AsuntoCat cAsunto = new DAL.AsuntoCat(cDblib); foreach (Models.AsuntoCat asunto in lista) { cAsunto.Borrar(asunto.idAsunto); } //Finalizar transacción if (cDblib.Transaction.ownerID.Equals(methodOwnerID)) { cDblib.commitTransaction(methodOwnerID); } } catch (Exception ex) {//rollback if (cDblib.Transaction.ownerID.Equals(new Guid())) { cDblib.rollbackTransaction(methodOwnerID); } throw ex; } }
public List <Models.AsuntoCat> Catalogo(int idPSN, Nullable <int> idTipoAsunto, Nullable <byte> idEstado) { OpenDbConn(); DAL.AsuntoCat cConsulta = new DAL.AsuntoCat(cDblib); return(cConsulta.Catalogo(idPSN, idTipoAsunto, idEstado)); }