Esempio n. 1
0
 public ReceivingHistoryViewModel(
     IReceivedBatchSource receivedBatchSource,
     IActiveInventorySource inventorySource,
     IBatchOperatorSource operatorSource,
     IImplementedBatchSource implementedBatchSource,
     ReceivingManagementViewModel viewModel)
 {
     this.receivedBatchSource            = receivedBatchSource;
     this.inventorySource                = inventorySource;
     this.operatorSource                 = operatorSource;
     this.implementedBatchSource         = implementedBatchSource;
     receivingManagementViewModel        = viewModel;
     RetreivedRecordsLedgerSelectedIndex = -1;
     VisibilityManager = new SearchCriteriaVisibilityManager();
     SelectedPurchaseOrderReceivedBatches = new ObservableCollection <ReceivedBatch>();
     RetreivedRecordsLedger      = new ObservableCollection <ReceivedPurchaseOrder>();
     SearchCriteriaSelectedIndex = 0;
     DatePeriodSelectedIndex     = 0;
     DateRangeStartingDate       = DateTime.Today;
     DateRangeEndingDate         = DateTime.Today;
     SpecificDate = DateTime.Today;
     PopulateRetreivedRecordsLedgerFromSearchCriteria = new ListReceivingRecordsByDateRangeCommand(this);
     ListBatchesFromReceivedPurchaseOrder             = new ListBatchesFromReceivedPurchaseOrderCommand(this);
     ChangeSearchCriteriaPanelVisibility = new ChangeSearchCriteriaPanelVisibilityCommand(this);
     OpenPurchaseOrderEditorCommand      = new OpenPurchaseOrderEditorCommand(this);
     PurchaseOrderEditorViewer           = new ReceivedPurchaseOrderEditorViewer(this);
     ReceivingSessionViewer = new BatchReceivingManagementViewer(receivingManagementViewModel);
 }
        public override void SetUp()
        {
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            inventorySource     = new SQLiteActiveInventorySource(context);
            receivedBatchSource = new SQLiteReceivedBatchSource(context, inventorySource);
            operatorSource      = new SQLiteBatchOperatorSource(context);
            viewModel           = new ReceivingHistoryViewModel(
                receivedBatchSource,
                inventorySource,
                operatorSource,
                implementedBatchSource,
                GetReceivingManagementViewModel()
                );
            command = new ListBatchesFromReceivedPurchaseOrderCommand(viewModel);
            base.SetUp();
        }