Example #1
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);
        }