protected override ISimpleRepo <PassbookRowDTO> ConnectToDB(string dbPath)
        {
            var txnDB = new SharedLiteDB(dbPath, _usr);
            var colxn = new PassbookRowCollection(BankAccountID, txnDB);

            return(new PassbookRowsSimpleRepo(colxn));
        }
Esempio n. 2
0
        public override IDailyBillsRepo GetRepo(LeaseDTO lse)
        {
            var file = Path.Combine(_foldrPath, GetFilename(lse.Id));
            var db   = new SharedLiteDB(file, _mkt.CurrentUser);

            return(new DailyBillsRepo1(lse, new DailyBillsCollection(db), _dir));
        }
Esempio n. 3
0
 public override void Validate(SoaRowDTO model, SharedLiteDB db)
 {
     if (model.GetDate() < BaseDate)
     {
         throw new PredatesBaseBalanceException(model, BaseDate);
     }
 }
Esempio n. 4
0
        protected override ISimpleRepo <JournalVoucherDTO> ConnectToDB(string databasePath)
        {
            var db  = new SharedLiteDB(databasePath, _usr);
            var col = new JournalVouchersCollection(db);

            return(new JournalSoloShard1(col));
        }
Esempio n. 5
0
        public IPassbookRowsRepo GetRepo(int bankAccountId)
        {
            var pbkDB = new SharedLiteDB(_pbkDbPath, _usr);
            var meta  = pbkDB.Metadata;

            return(new TransactionsByMonthRepo(bankAccountId, _dir, _usr, meta));
        }
Esempio n. 6
0
 private void SetVacantStalls(Dictionary <int, IVacantStallsRepo> dict, SharedLiteDB db)
 {
     foreach (var sec in _mkt.Sections.GetAll())
     {
         var colxn = new VacantStallsCollection(sec, db);
         var repo  = new VacantStallsRepo1(colxn);
         dict.Add(sec.Id, repo);
     }
 }
Esempio n. 7
0
 private void SetUncollecteds(Dictionary <int, IUncollectedsRepo> dict, SharedLiteDB db, DateTime date)
 {
     foreach (var sec in _mkt.Sections.GetAll())
     {
         var colxn = new UncollectedsCollection(sec, db);
         var repo  = new UncollectedsRepo1(sec, date, colxn, _dir);
         dict.Add(sec.Id, repo);
     }
 }
Esempio n. 8
0
 private void SetIntendedColxns(Dictionary <int, IIntendedColxnsRepo> dict, SharedLiteDB db)
 {
     foreach (var sec in _mkt.Sections.GetAll())
     {
         var colxn = new IntendedColxnsCollection(sec, db);
         var repo  = new IntendedColxnsRepo1(colxn);
         dict.Add(sec.Id, repo);
     }
 }
        public void TestMethod00001()
        {
            var dbPath = TemmpCopyOf.FMEY_20180924();
            var tmpDb  = new SharedLiteDB(dbPath, "Test User");

            tmpDb.RemoveCorruptedTables();

            TableCount(dbPath).Should().Be(14);

            //await Task.Delay(1000 * 2);
            dbPath.DeleteIfFound();
        }
Esempio n. 10
0
        public PassbookDBFile(ITenantDBsDir dir)
        {
            _pbkDbPath = GetDbPath(dir.MarketState);
            var pbkDb    = new SharedLiteDB(_pbkDbPath, dir.MarketState.CurrentUser);
            var inactvDb = InactivesLocalDir.GetRequestsDB(dir);

            ActiveRequests = new FundRequestsRepo1(new ActiveRequestsCollection(pbkDb));
            //InactiveRequests_old = new FundRequestsRepo1(new InactiveRequestsCollection(pbkDb));
            InactiveRequests = new FundRequestsRepo1(new InactiveRequestsCollection(inactvDb));
            PreparedCheques  = new PreparedChequesRepo1(new ChequeVouchersCollection(pbkDb));
            PassbookRows     = dir.Passbooks;
        }
Esempio n. 11
0
        public MarketStateDBFile(string marketDbFilePath, string currentUser)
        {
            _mktDbPath   = marketDbFilePath;
            _currUsr     = currentUser;
            DatabasePath = marketDbFilePath;
            CurrentUser  = currentUser;
            var mktDb = new SharedLiteDB(_mktDbPath, _currUsr);

            Stalls         = new StallsRepo1(new StallsCollection(mktDb), this);
            Collectors     = new CollectorsRepo1(new CollectorsCollection(mktDb), this);
            BankAccounts   = new BankAccountsRepo1(new BankAccountsCollection(mktDb), this);
            Sections       = new SectionsRepo1(new SectionsCollection(mktDb), this);
            ActiveLeases   = new ActiveLeasesRepo1(new ActiveLeasesCollection(mktDb), this);
            InactiveLeases = new InactiveLeasesRepo1(new InactiveLeasesCollection(mktDb), this);
            CacheMetadataFields(mktDb);
        }
Esempio n. 12
0
        protected override ICollectionsDB ConnectToDB(DateTime date, string file)
        {
            var db       = new SharedLiteDB(file, _mkt.CurrentUser);
            var colxnsDB = new CollectionsDB1(date, db.Metadata, _mkt, file);

            SetIntendedColxns(colxnsDB.IntendedColxns, db);
            SetAmbulantColxns(colxnsDB.AmbulantColxns, db);
            SetUncollecteds(colxnsDB.Uncollecteds, db, date);
            SetNoOperations(colxnsDB.NoOperations, db);
            SetVacantStalls(colxnsDB.VacantStalls, db);
            colxnsDB.CashierColxns = new CashierColxnsRepo1(new CashierColxnsCollection(db));
            colxnsDB.OtherColxns   = new OtherColxnsRepo1(new OtherColxnsCollection(db));
            colxnsDB.BankDeposits  = new BankDepositsRepo1(new BankDepositsCollection(db));
            colxnsDB.BalanceAdjs   = new BalanceAdjsRepo1(date, new BalanceAdjsCollection(db), _mkt.Balances);
            return(colxnsDB);
        }
Esempio n. 13
0
 internal BankDepositsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB)
 {
 }
Esempio n. 14
0
 internal NoOperationsCollection(SectionDTO section, SharedLiteDB sharedLiteDB)
     : base(GetCollectionName(section), sharedLiteDB)
 {
 }
Esempio n. 15
0
 internal SectionsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB)
 {
 }
Esempio n. 16
0
 internal IntendedColxnsCollection(SectionDTO section, SharedLiteDB sharedLiteDB)
     : base(GetCollectionName(section), sharedLiteDB)
 {
 }
Esempio n. 17
0
 public BalanceAdjsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB)
 {
 }
Esempio n. 18
0
 public GLAccountsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB)
 {
 }
Esempio n. 19
0
 public DailyBillsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB)
 {
 }
Esempio n. 20
0
 internal ActiveLeasesCollection(SharedLiteDB sharedLiteDB) : base(sharedLiteDB)
 {
     BsonMapper.Global.Entity <LeaseDTO>()
     .DbRef(_ => _.Stall, StallsCollection.COLXN_NAME);
 }
Esempio n. 21
0
 internal StallsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB)
 {
     BsonMapper.Global.Entity <StallDTO>()
     .DbRef(_ => _.Section, SectionsCollection.COLXN_NAME);
 }
Esempio n. 22
0
 public InactiveFundReqsRepo(SharedLiteDB sharedLiteDB, string collectionName = "FundReqs_Inactive") : base(sharedLiteDB, collectionName)
 {
 }
 internal InactiveRequestsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB)
 {
 }
Esempio n. 24
0
 internal VacantStallsCollection(SectionDTO section, SharedLiteDB sharedLiteDB)
     : base(GetCollectionName(section), sharedLiteDB)
 {
 }
Esempio n. 25
0
 public override void Validate(GLAccountDTO model, SharedLiteDB db)
 {
 }
Esempio n. 26
0
 internal UncollectedsCollection(SectionDTO section, SharedLiteDB sharedLiteDB)
     : base(GetCollectionName(section), sharedLiteDB)
 {
 }
 internal AmbulantColxnsCollection(SectionDTO section, SharedLiteDB sharedLiteDB)
     : base(GetCollectionName(section), sharedLiteDB)
 {
 }
 public override void Validate(RequestedChequeDTO model, SharedLiteDB db)
 {
 }
 public ActiveChequesRepo(SharedLiteDB sharedLiteDB, string collectionName = "RequestedCheques_Active") : base(collectionName, sharedLiteDB)
 {
 }
Esempio n. 30
0
 public GLAccountsRepo(SharedLiteDB sharedLiteDB) : base(sharedLiteDB)
 {
 }