Exemplo n.º 1
0
        public bool CheckCancellation(Reject saved)
        {
            if (ProductId == null || saved.ProductId == null)
            {
                return(false);
            }

            var canceled = ProductId == saved.ProductId &&
                           Series == saved.Series &&
                           saved.LetterDate <= LetterDate;

            if (canceled)
            {
                saved.CancelDate = LetterDate;
            }
            return(canceled);
        }
Exemplo n.º 2
0
        public bool Equivalent(Reject reject)
        {
            if (marked)
            {
                return(false);
            }
            var result = Product == reject.Product &&
                         ProductId == reject.ProductId &&
                         Producer == reject.Producer &&
                         ProducerId == reject.ProducerId &&
                         Series == reject.Series &&
                         LetterNo == reject.LetterNo &&
                         LetterDate == reject.LetterDate &&
                         CauseRejects == reject.CauseRejects;

            if (result)
            {
                marked = true;
            }
            return(result);
        }