public void Elimina(ExtintorBE pItem) { try { using (TransactionScope ts = new TransactionScope()) { ExtintorDL Extintor = new ExtintorDL(); ExtintorDetalleDL ExtintorDetalle = new ExtintorDetalleDL(); List <ExtintorDetalleBE> lstExtintorDetalle = null; lstExtintorDetalle = new ExtintorDetalleDL().ListaTodosActivo(pItem.IdExtintor); foreach (ExtintorDetalleBE item in lstExtintorDetalle) { ExtintorDetalle.Elimina(item); } Extintor.Elimina(pItem); ts.Complete(); } } catch (Exception ex) { throw ex; } }
public void Elimina(ExtintorDetalleBE pItem) { try { ExtintorDetalleDL ExtintorDetalle = new ExtintorDetalleDL(); ExtintorDetalle.Elimina(pItem); } catch (Exception ex) { throw ex; } }