Exemplo n.º 1
0
 public bool Agregar(Reporte reporte)
 {
     try
     {
         daReporte = new daReporte();
         daReporte.IniciarTransaccion();
         daReporte.Agregar(reporte);
         daItemReporte = new daReporteItem();
         daItemReporte.AsignarSesion(daReporte);
         foreach (ReporteItem  item in reporte.items)
         {
             item.idReporte = reporte.idReporte;
             daItemReporte.Agregar(item);
         }
         daReporte.ConfirmarTransaccion();
     }
     catch (Exception)
     {
         daReporte.AbortarTransaccion();
         throw;
     }
     finally
     {
         daReporte.CerrarSesion();
     }
     return true;
 }