Exemplo n.º 1
0
        public IEnumerable <Presupuesto> GetAll(Guid id)
        {
            IEnumerable <Presupuesto> presupuestos = PresupuestosDAL.GetChildren(id);

            foreach (Presupuesto presupuesto in presupuestos)
            {
                IEnumerable <PresupuestoItem> items = PresupuestoItemDAL.GetChildren(presupuesto.Id);
                presupuesto.Items = items.ToList();
            }
            return(presupuestos);
        }
Exemplo n.º 2
0
        public Guid Delete(Guid cotizacionId)
        {
            IEnumerable <Presupuesto> presupuestos = PresupuestosDAL.GetChildren(cotizacionId);

            foreach (var presupuesto in presupuestos)
            {
                PresupuestoItemsDAL.DeleteChildren(presupuesto.Id);
            }
            PresupuestosDAL.DeleteChildren(cotizacionId);
            CotizacionesDAL.Delete(cotizacionId);
            return(cotizacionId);
        }