public void SavingBatchOperatorAndRetrievingFromIdResultsInTheSameOperatorInfo() { int targetCollectionId = 0; BatchOperator batchOperator = helper.GetJaneDoeOperator(); operatorSource.SaveOperator(batchOperator); int targetId = operatorSource.BatchOperatorIdMappings[targetCollectionId]; BatchOperator found = operatorSource.FindBatchOperator(targetId); Assert.AreEqual(batchOperator.FirstName, found.FirstName); Assert.AreEqual(batchOperator.LastName, found.LastName); }
public void PopulateBatchOperatorOrReset() { if (SelectedBatchOperatorFromComboBoxIndex > 0) { int targetId = operatorSource.BatchOperatorIdMappings[SelectedBatchOperatorFromComboBoxIndex - 1]; UpdateActiveBatchOperator(operatorSource.FindBatchOperator(targetId)); } else { ResetBatchOperator(); } }
public void UpdatePurchaseOrderHeaderInformation() { for (int i = 0; i < ReceivedBatches.Count; i++) { ReceivedBatches[i].PONumber = poNumberAsInt; ReceivedBatches[i].ActivityDate = ReceivingDate; ReceivedBatches[i].ReceivingOperator = operatorSource.FindBatchOperator(operatorSource.BatchOperatorIdMappings[SelectedOperatorIndex]); int systemId = purchaseOrder.GetReceivedBatchMappedSystemId(i); receivedBatchSource.UpdateReceivedBatch(systemId, ReceivedBatches[i]); } ReloadPurchaseOrder(); }
void InsertThreeUniqueBatchesIntoDataSource() { BatchOperator batchOperator = operatorSource.FindBatchOperator(originalBatchOperatorId); activityDate = DateTime.Today; ReceivedBatch batch1 = new ReceivedBatch("White", whiteBatch, activityDate, 5, originalPONumber, batchOperator); ReceivedBatch batch2 = new ReceivedBatch("Black", blackBatch, activityDate, 5, originalPONumber, batchOperator); ReceivedBatch batch3 = new ReceivedBatch("Yellow", yellowBatch, activityDate, 5, originalPONumber, batchOperator); receivedBatchSource.SaveReceivedBatch(batch1); receivedBatchSource.SaveReceivedBatch(batch2); receivedBatchSource.SaveReceivedBatch(batch3); }
public BatchOperator GetJaneDoeOperator() { operatorSource.SaveOperator(new BatchOperator("Jane", "Doe")); return(operatorSource.FindBatchOperator(1)); }
public ReceivedBatch GetUniqueBatch1() { return(new ReceivedBatch("White", "872890101101", DateTime.Now, 5, 55555, operatorSource.FindBatchOperator(1))); }
BatchOperator GetBatchOperatorFromSelectedItem() { return(operatorSource.FindBatchOperator(operatorSource.BatchOperatorIdMappings[ImplementingBatchOperatorSelectedIndex])); }