Esempio n. 1
0
        public LoggedBatch(string colorName, string batchNumber, DateTime implementationDate, BatchOperator implementationOperator)
        {
            CheckIfColorNameIsEmpty(colorName);
            CheckIfBatchNumberIsEmpty(batchNumber);

            ColorName            = colorName;
            BatchNumber          = batchNumber;
            ActivityDate         = implementationDate;
            ImplementingOperator = implementationOperator;
        }
        public ReceivedBatch(
            string colorName,
            string batchNumber,
            DateTime receivingDate,
            int quantity,
            int poNumber,
            BatchOperator receivingOperator
            )
        {
            CheckIfColorNameIsEmpty(colorName);
            CheckIfBatchNumberIsEmpty(batchNumber);
            CheckIfQuantityIsGreaterThanZero(quantity);
            CheckIfPONumberIsAtLeastFiveDigits(poNumber);

            ColorName         = colorName;
            BatchNumber       = batchNumber;
            ActivityDate      = receivingDate;
            Quantity          = quantity;
            PONumber          = poNumber;
            ReceivingOperator = receivingOperator;
        }