public void Elimina(PlanAnualBE pItem) { try { using (TransactionScope ts = new TransactionScope()) { PlanAnualDL PlanAnual = new PlanAnualDL(); PlanAnualDetalleDL PlanAnualDetalle = new PlanAnualDetalleDL(); List <PlanAnualDetalleBE> lstPlanAnualDetalle = null; lstPlanAnualDetalle = new PlanAnualDetalleDL().ListaTodosActivo(pItem.IdPlanAnual); foreach (PlanAnualDetalleBE item in lstPlanAnualDetalle) { PlanAnualDetalle.Elimina(item); } PlanAnual.Elimina(pItem); ts.Complete(); } } catch (Exception ex) { throw ex; } }
public void Elimina(PlanAnualDetalleBE pItem) { try { PlanAnualDetalleDL PlanAnualDetalle = new PlanAnualDetalleDL(); PlanAnualDetalle.Elimina(pItem); } catch (Exception ex) { throw ex; } }