Пример #1
0
 public bool SelectedReceivingRecordIsReadyForUpdate()
 {
     return(ReceivedBatchesSelectedIndex > -1 &&
            SelectedColorIndex > -1 &&
            batchNumberValidator.Validate(ReceivedBatch.BatchNumber) &&
            ReceivedBatch.Quantity > 0 &&
            QuantityAvailableForReduction(ReceivedBatches[ReceivedBatchesSelectedIndex], ReceivedBatch.Quantity) &&
            SelectedRecordIsConsistentWithBatchAndColorName());
 }
 public bool ReceivedBatchIsValidForSessionLedger()
 {
     return(string.IsNullOrEmpty(PONumber) == false &&
            int.TryParse(PONumber, out poNumber) &&
            ReceivingDate != DateTime.MinValue &&
            ReceivingOperatorComboBoxIndex > -1 &&
            ColorSelectionComboBoxIndex > -1 &&
            batchNumberValidator.Validate(BatchNumber) &&
            string.IsNullOrEmpty(Quantity) == false &&
            int.TryParse(Quantity, out quantity) &&
            quantity > 0 &&
            BatchIsConsistentWithCurrentReceiving() &&
            BatchIsConsistentWithCurrentSession());
 }
        public void BatchNumberValidatedAsCorrect()
        {
            string batch = "872880508201";

            Assert.True(validator.Validate(batch));
        }
 public bool BatchNumberIsValid()
 {
     return(validator.Validate(BatchNumber));
 }