protected override ISimpleRepo <PassbookRowDTO> ConnectToDB(string dbPath) { var txnDB = new SharedLiteDB(dbPath, _usr); var colxn = new PassbookRowCollection(BankAccountID, txnDB); return(new PassbookRowsSimpleRepo(colxn)); }
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)); }
public override void Validate(SoaRowDTO model, SharedLiteDB db) { if (model.GetDate() < BaseDate) { throw new PredatesBaseBalanceException(model, BaseDate); } }
protected override ISimpleRepo <JournalVoucherDTO> ConnectToDB(string databasePath) { var db = new SharedLiteDB(databasePath, _usr); var col = new JournalVouchersCollection(db); return(new JournalSoloShard1(col)); }
public IPassbookRowsRepo GetRepo(int bankAccountId) { var pbkDB = new SharedLiteDB(_pbkDbPath, _usr); var meta = pbkDB.Metadata; return(new TransactionsByMonthRepo(bankAccountId, _dir, _usr, meta)); }
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); } }
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); } }
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(); }
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; }
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); }
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); }
internal BankDepositsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB) { }
internal NoOperationsCollection(SectionDTO section, SharedLiteDB sharedLiteDB) : base(GetCollectionName(section), sharedLiteDB) { }
internal SectionsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB) { }
internal IntendedColxnsCollection(SectionDTO section, SharedLiteDB sharedLiteDB) : base(GetCollectionName(section), sharedLiteDB) { }
public BalanceAdjsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB) { }
public GLAccountsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB) { }
public DailyBillsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB) { }
internal ActiveLeasesCollection(SharedLiteDB sharedLiteDB) : base(sharedLiteDB) { BsonMapper.Global.Entity <LeaseDTO>() .DbRef(_ => _.Stall, StallsCollection.COLXN_NAME); }
internal StallsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB) { BsonMapper.Global.Entity <StallDTO>() .DbRef(_ => _.Section, SectionsCollection.COLXN_NAME); }
public InactiveFundReqsRepo(SharedLiteDB sharedLiteDB, string collectionName = "FundReqs_Inactive") : base(sharedLiteDB, collectionName) { }
internal InactiveRequestsCollection(SharedLiteDB sharedLiteDB) : base(COLXN_NAME, sharedLiteDB) { }
internal VacantStallsCollection(SectionDTO section, SharedLiteDB sharedLiteDB) : base(GetCollectionName(section), sharedLiteDB) { }
public override void Validate(GLAccountDTO model, SharedLiteDB db) { }
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) { }
public GLAccountsRepo(SharedLiteDB sharedLiteDB) : base(sharedLiteDB) { }