Exemple #1
0
 public SQLiteReceivedBatchSource(SQLiteStoreContext sqliteStore, IActiveInventorySource inventorySource)
 {
     this.sqliteStore        = sqliteStore;
     this.inventorySource    = inventorySource;
     ReceivedBatchRepository = new ObservableCollection <ReceivedBatch>();
     ReceivedBatchIdMappings = new Dictionary <int, int>();
 }
Exemple #2
0
 public SQLiteImplementedBatchSource(SQLiteStoreContext sqliteStore, IActiveInventorySource inventorySource)
 {
     this.sqliteStore           = sqliteStore;
     this.inventorySource       = inventorySource;
     ImplementedBatchLedger     = new ObservableCollection <LoggedBatch>();
     ImplementedBatchIdMappings = new Dictionary <int, int>();
 }
 public void SetUp()
 {
     helper = new SQLiteDatabaseHelper();
     helper.CreateTestDatabase();
     context   = new SQLiteStoreContext(helper.DatabaseFile);
     viewModel = new BatchOperatorViewModel(new SQLiteBatchOperatorSource(context));
 }
Exemple #4
0
        public override void SetUp()
        {
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            operatorSource = new SQLiteBatchOperatorSource(context);
            base.SetUp();
        }
Exemple #5
0
 public override void SetUp()
 {
     databaseHelper = new SQLiteDatabaseHelper();
     databaseHelper.CreateTestDatabase();
     context             = new SQLiteStoreContext(databaseHelper.DatabaseFile);
     inventorySource     = new SQLiteActiveInventorySource(context);
     operatorSource      = new SQLiteBatchOperatorSource(context);
     receivedBatchSource = new SQLiteReceivedBatchSource(context, inventorySource);
     base.SetUp();
 }
Exemple #6
0
        void PrepareMainWindowViewModel()
        {
            SQLiteStoreContext sqliteStore = new SQLiteStoreContext(Settings.Default.AttachedDatabase);

            operatorSource         = new SQLiteBatchOperatorSource(sqliteStore);
            inventorySource        = new SQLiteActiveInventorySource(sqliteStore);
            receivedBatchSource    = new SQLiteReceivedBatchSource(sqliteStore, inventorySource);
            implementedBatchSource = new SQLiteImplementedBatchSource(sqliteStore, inventorySource);

            mainWindowViewModel = new MainWindowViewModel(inventorySource, receivedBatchSource, implementedBatchSource, operatorSource);
        }
Exemple #7
0
        private static SQLiteStoreContext GetEmptySQLiteStore(string destination)
        {
            installer = new SQLiteDatabaseInstaller
            {
                DatabaseFile     = destination,
                ConnectionString = string.Format("Data Source={0};Version=3;", destination)
            };

            installer.CreateNewDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(destination);

            return(context);
        }
 public void SetUp()
 {
     dbHelper = new SQLiteDatabaseHelper();
     dbHelper.CreateTestDatabase();
     sqliteStore            = new SQLiteStoreContext(dbHelper.DatabaseFile);
     operatorSource         = new SQLiteBatchOperatorSource(sqliteStore);
     inventorySource        = new SQLiteActiveInventorySource(sqliteStore);
     receivedBatchSource    = new SQLiteReceivedBatchSource(sqliteStore, inventorySource);
     implementedBatchSource = new SQLiteImplementedBatchSource(sqliteStore, inventorySource);
     operatorHelper         = new BatchOperatorTestHelper(operatorSource);
     viewModel     = new MainWindowViewModel(inventorySource, receivedBatchSource, implementedBatchSource, operatorSource);
     batchOperator = operatorHelper.GetJaneDoeOperator();
 }
        public override void SetUp()
        {
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            inventorySource        = new SQLiteActiveInventorySource(context);
            receivedBatchSource    = new SQLiteReceivedBatchSource(context, inventorySource);
            implementedBatchSource = new SQLiteImplementedBatchSource(context, inventorySource);
            operatorSource         = new SQLiteBatchOperatorSource(context);
            viewModel = new ReceivingHistoryViewModel(receivedBatchSource, inventorySource, operatorSource, implementedBatchSource, GetReceivingManagementViewModel());
            command   = new OpenPurchaseOrderEditorCommand(viewModel);
            base.SetUp();
        }
        public override void SetUp()
        {
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            operatorSource         = new SQLiteBatchOperatorSource(context);
            inventorySource        = new SQLiteActiveInventorySource(context);
            receivedBatchSource    = new SQLiteReceivedBatchSource(context, inventorySource);
            implementedBatchSource = new SQLiteImplementedBatchSource(context, inventorySource);
            viewModel = new ImplementationInquiryViewModel(implementedBatchSource);
            command   = new ListLatestImplementedBatchesByDateCommand(viewModel);
            base.SetUp();
        }
Exemple #11
0
        public override void SetUp()
        {
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            inventorySource        = new SQLiteActiveInventorySource(context);
            receivedBatchSource    = new SQLiteReceivedBatchSource(context, inventorySource);
            implementedBatchSource = new SQLiteImplementedBatchSource(context, inventorySource);
            operatorSource         = new SQLiteBatchOperatorSource(context);
            viewModel = new MainWindowViewModel(inventorySource, receivedBatchSource, implementedBatchSource, operatorSource);
            command   = new CommitBatchToImplementationLedgerCommand(viewModel);
            base.SetUp();
        }
        public override void SetUp()
        {
            validator    = new DuracolorIntermixBatchNumberValidator();
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            inventorySource        = new SQLiteActiveInventorySource(context);
            receivedBatchSource    = new SQLiteReceivedBatchSource(context, inventorySource);
            implementedBatchSource = new SQLiteImplementedBatchSource(context, inventorySource);
            operatorSource         = new SQLiteBatchOperatorSource(context);
            viewModel = new BatchHistoryViewModel(validator, inventorySource, receivedBatchSource, implementedBatchSource);
            command   = new DisplayBatchHistoryFromBatchNumberCommand(viewModel);
            base.SetUp();
        }
        public void SetUp()
        {
            helper = new SQLiteDatabaseHelper();
            helper.CreateTestDatabase();
            SQLiteStoreContext     context         = new SQLiteStoreContext(helper.DatabaseFile);
            IActiveInventorySource inventorySource = new SQLiteActiveInventorySource(context);

            viewModel = new ReceivingManagementViewModel(
                new DuracolorIntermixBatchNumberValidator(),
                new DuracolorIntermixColorList(),
                new SQLiteReceivedBatchSource(context, inventorySource),
                new SQLiteBatchOperatorSource(context),
                inventorySource
                );
        }
        public void SetUp()
        {
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            inventorySource        = new SQLiteActiveInventorySource(context);
            receivedBatchSource    = new SQLiteReceivedBatchSource(context, inventorySource);
            implementedBatchSource = new SQLiteImplementedBatchSource(context, inventorySource);
            operatorSource         = new SQLiteBatchOperatorSource(context);
            viewModel = new ReceivingHistoryViewModel(
                receivedBatchSource,
                inventorySource,
                operatorSource,
                implementedBatchSource,
                GetReceivingManagementViewModel()
                );
            command = new ChangeSearchCriteriaPanelVisibilityCommand(viewModel);
        }
Exemple #15
0
        public override void SetUp()
        {
            sqliteHelper = new SQLiteDatabaseHelper();
            sqliteHelper.CreateTestDatabase();
            SQLiteStoreContext context = new SQLiteStoreContext(sqliteHelper.DatabaseFile);

            inventorySource        = new SQLiteActiveInventorySource(context);
            receivedBatchSource    = new SQLiteReceivedBatchSource(context, inventorySource);
            implementedBatchSource = new SQLiteImplementedBatchSource(context, inventorySource);
            operatorSource         = new SQLiteBatchOperatorSource(context);
            base.SetUp();

            viewModel = new ReceivedPurchaseOrderEditorViewModel(
                receivedBatchSource.GetPurchaseOrderForEditing(originalPONumber),
                new DuracolorIntermixColorList(),
                new DuracolorIntermixBatchNumberValidator(),
                operatorSource,
                inventorySource,
                receivedBatchSource,
                implementedBatchSource
                );

            command = new UpdatePurchaseOrderReceivingRecordCommand(viewModel);
        }
 public CheckIfOperatorBelongsToRelatedEntitiesCommand(int id, SQLiteStoreContext store)
 {
     this.id    = id;
     this.store = store;
 }
Exemple #17
0
 public AddReceivedBatchToReceivingLedgerTransaction(Entity <ReceivedBatch> entity, SQLiteStoreContext store)
 {
     this.store  = store;
     this.entity = entity;
 }
Exemple #18
0
 public AddReceivedBatchToInventoryTransaction(Entity <InventoryBatch> entity, SQLiteStoreContext store)
 {
     this.store  = store;
     this.entity = entity;
 }
Exemple #19
0
 public ListConnectedBatchesAtDateTransaction(DateTime targetDate, SQLiteStoreContext store)
 {
     this.store     = store;
     calibratedDate = new DateTime(targetDate.Year, targetDate.Month, targetDate.Day, 23, 59, 59);
 }
Exemple #20
0
 public UndoImplementedBatchCommittedToLedgerTransaction(Entity <LoggedBatch> entity, SQLiteStoreContext store)
 {
     this.loggedEntity = entity;
     this.store        = store;
 }
 public FindBatchesInReceivingLedgerByDateTransaction(DateTime date, SQLiteStoreContext store)
 {
     this.store = store;
     this.date  = date;
 }
Exemple #22
0
 public DeleteDepletedInventoryBatchAtId(Entity <InventoryBatch> entity, SQLiteStoreContext store)
 {
     this.store  = store;
     this.entity = entity;
 }
 public DeleteReceivedBatchAtIdTransaction(int targetId, SQLiteStoreContext store)
 {
     this.store    = store;
     this.targetId = targetId;
 }
Exemple #24
0
 public ListCurrentInventoryTransaction(SQLiteStoreContext store)
 {
     this.store = store;
 }
 public AddBatchOperatorTransaction(Entity <BatchOperator> entity, SQLiteStoreContext store)
 {
     this.entity = entity;
     this.store  = store;
 }
Exemple #26
0
 public FindBatchesInImplementationLedgerByBatchNumberTransaction(string batchNumber, SQLiteStoreContext store)
 {
     this.batchNumber = batchNumber;
     this.store       = store;
 }
Exemple #27
0
 public ListReceivingLedgerTransaction(SQLiteStoreContext store)
 {
     this.store = store;
 }
 public FindBatchOperatorByIdTransaction(int targetId, SQLiteStoreContext store)
 {
     this.targetId = targetId;
     this.store    = store;
 }
Exemple #29
0
 public SQLiteBatchOperatorSource(SQLiteStoreContext sqliteStore)
 {
     this.sqliteStore        = sqliteStore;
     OperatorRepository      = new ObservableCollection <BatchOperator>();
     BatchOperatorIdMappings = new Dictionary <int, int>();
 }
 public FindBatchesInReceivingLedgerByPONumberTransaction(int targetPo, SQLiteStoreContext store)
 {
     this.store    = store;
     this.targetPo = targetPo;
 }