public ReceivingManagementViewModel( IBatchNumberValidator validator, IColorList colorList, IReceivedBatchSource receivingSource, IBatchOperatorSource operatorSource, IActiveInventorySource inventorySource) { this.receivingSource = receivingSource; this.operatorSource = operatorSource; this.inventorySource = inventorySource; this.colorList = colorList; batchNumberValidator = validator; this.operatorSource.FindAllBatchOperators(); ReceivedBatchRepository = this.receivingSource.ReceivedBatchRepository; BatchOperatorRepository = this.operatorSource.OperatorRepository; SessionLedger = new ObservableCollection <ReceivedBatch>(); SessionLedgerSelectedIndex = -1; ReceivedBatch = new ReceivedBatch(); ReceivingDate = DateTime.Today; AddBatchToSessionLedgerCommand = new AddReceivedBatchToReceivingSessionLedgerCommand(this); RemoveSelectedItemFromSessionLedgerCommand = new RemoveReceivableBatchFromSessionLedgerCommand(this); CommitSessionLedgerToReceivingLedgerCommand = new CommitReceivingSessionLedgerToDataSourceCommand(this); }
public override void SetUp() { base.SetUp(); viewModel = new ReceivingManagementViewModel(validator, colorList, receivingSource, operatorSource, inventorySource); command = new CommitReceivingSessionLedgerToDataSourceCommand(viewModel); }