Пример #1
0
        public Scrap()
        {
            this.isSubmitted = new IsScrapSubmitted();
            this.isClosed = new IsScrapClosed();
            this.isOpen = new IsScrapOpen();
            this.isSubmitRejected = new IsScrapSubmitRejected();
            this.isCancelled = new IsScrapCancelled();

            this.InventoryOperations = new List<InventoryOperation>();

            this.Id = -1;
        }
Пример #2
0
        //================================================================================
        public List<Scrap> GetNotCancelledScrapsForVessel(VesselInCompany vesselInCompany, params long[] excludeIds)
        {
            IsScrapCancelled isScrapCancelled = new IsScrapCancelled();

            var result = scrapRepository.Find(isScrapCancelled.Predicate.Not().And(s => s.VesselInCompany.Id == vesselInCompany.Id));

            if (excludeIds != null)
            {
                result = result.Where(s => !excludeIds.Contains(s.Id)).ToList();
            }

            return result.ToList();
        }