Beispiel #1
0
 public static FinancialAccounts GetAll()
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetFinancialAccountsAll()));
 }
Beispiel #2
0
 public static ExpenseClaims FromClaimingPerson(Person person)
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetExpenseClaimsByClaimer(person.Identity)));
 }
Beispiel #3
0
 public static DateTime CheckLatest(PWLogItem affectedItemType, int affectedItemId, PWLogAction actionType)
 {
     return(SwarmDb.GetDatabaseForReading()
            .CheckLogEntry(affectedItemType.ToString(), affectedItemId, actionType.ToString()));
 }
Beispiel #4
0
 public double GetBudget(int year)
 {
     return(SwarmDb.GetDatabaseForReading().GetFinancialAccountBudget(Identity, year));
 }
Beispiel #5
0
 public static MediaCategories FromIdentities(int[] identities)
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetMediaCategories(identities)));
 }
Beispiel #6
0
 public Int64 GetDeltaCents(DateTime start, DateTime end)
 {
     return(SwarmDb.GetDatabaseForReading().GetFinancialAccountBalanceDeltaCents(Identity, start, end));
 }
Beispiel #7
0
 public FinancialAccountRows GetRows(DateTime start, DateTime end)
 {
     BasicFinancialAccountRow[] basicRows = SwarmDb.GetDatabaseForReading()
                                            .GetFinancialAccountRows(Identity, start, end, false);
     return(FinancialAccountRows.FromArray(basicRows));
 }
Beispiel #8
0
        // nothing much here

        public static Ballots ForElection(Election election)
        {
            return(FromArray(SwarmDb.GetDatabaseForReading().GetBallots(election, Organization.PPSE))); // HACK HACK HACK -- PPSE hardcoded
        }
Beispiel #9
0
 public static Dictionary <int, int> GetBallotsForPerson(Person person)
 {
     return(SwarmDb.GetDatabaseForReading().GetBallotsForPerson(person.Identity));
 }
Beispiel #10
0
 public static PersonRole FromIdentity(int roleId)
 {
     return(FromBasic(SwarmDb.GetDatabaseForReading().GetRole(roleId)));
 }
Beispiel #11
0
 public static Currencies GetAll()
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetCurrencies()));
 }
Beispiel #12
0
 private static FinancialAccounts FromOptionalData(ObjectOptionalDataType dataType, string data)
 {
     return
         (FromIdentities(SwarmDb.GetDatabaseForReading()
                         .GetObjectsByOptionalData(ObjectType.FinancialAccount, dataType, data)));
 }
Beispiel #13
0
 public static FinancialAccounts ForOwner(Person person)
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetFinancialAccountsOwnedByPerson(person.Identity)));
 }
Beispiel #14
0
 public static FinancialAccounts ForOrganization(Organization organization)
 {
     return
         (FromArray(SwarmDb.GetDatabaseForReading()
                    .GetFinancialAccountTreeForOrganization(organization.Identity)));
 }
Beispiel #15
0
 public static Geography FromOfficialDesignation(int countryId, GeographyLevel level, string designation)
 {
     return
         (FromIdentity(SwarmDb.GetDatabaseForReading().GetGeographyIdFromOfficialDesignation(countryId, level,
                                                                                             designation)));
 }
Beispiel #16
0
 public static Currency FromIdentity(int currencyId)
 {
     return(FromBasic(SwarmDb.GetDatabaseForReading().GetCurrency(currencyId)));
 }
Beispiel #17
0
 public static FinancialAccount FromIdentity(int identity)
 {
     return(FromBasic(SwarmDb.GetDatabaseForReading().GetFinancialAccount(identity)));
 }
Beispiel #18
0
        public static Currency FromCode(string code)
        {
            code = code.ToUpperInvariant();

            return(FromBasic(SwarmDb.GetDatabaseForReading().GetCurrency(code)));
        }
Beispiel #19
0
 public FinancialAccountRows GetLastRows(int rowCount)
 {
     BasicFinancialAccountRow[] basicRows = SwarmDb.GetDatabaseForReading()
                                            .GetLastFinancialAccountRows(Identity, rowCount);
     return(FinancialAccountRows.FromArray(basicRows));
 }
Beispiel #20
0
 public static ChurnData ForOrganization(Organization organization)
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetChurnData(organization)));
 }
Beispiel #21
0
 public FinancialAccountRows GetRowsFar(DateTime start, DateTime end)  // selects lowerbound < x <= upperbound
 {
     BasicFinancialAccountRow[] basicRows = SwarmDb.GetDatabaseForReading()
                                            .GetFinancialAccountRows(Identity, start, end, true);
     return(FinancialAccountRows.FromArray(basicRows));
 }
Beispiel #22
0
 public static ChurnData ForPerson(Person person)
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetChurnData(person)));
 }
Beispiel #23
0
 public Int64[] GetBudgetMonthly(int year)
 {
     return(SwarmDb.GetDatabaseForReading().GetFinancialAccountBudgetMonthly(Identity, year));
 }
Beispiel #24
0
 public static ChurnData GetByDate(Organization organization, DateTime dateLower, DateTime dateUpper)
 {
     return
         (FromArray(SwarmDb.GetDatabaseForReading()
                    .GetChurnDataForOrganization(organization, dateLower, dateUpper)));
 }
Beispiel #25
0
 public static MediaCategories GetAll()
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetMediaCategories()));
 }
Beispiel #26
0
 public static FinancialTransactionTagSets ForOrganization(Organization organization)
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetFinancialTransactionTagSets(organization)));
 }
Beispiel #27
0
 public static ExpenseClaims FromOrganization(Organization org)
 {
     return(FromArray(SwarmDb.GetDatabaseForReading().GetExpenseClaimsByOrganization(org.Identity)));
 }
Beispiel #28
0
 public BasicGeographyDesignation[] GetGeographyDesignations()
 {
     return(SwarmDb.GetDatabaseForReading().GetGeographyDesignationsForGeographyId(Identity));
 }
Beispiel #29
0
 public static Dictionary <int, bool> GetPeopleWhoDeclineLocalMail(int[] personIds)
 {
     return(SwarmDb.GetDatabaseForReading().GetPeopleWhoDeclineLocalMail(personIds));
 }
Beispiel #30
0
 public Int64 GetBudgetSumCents(int year)
 {
     // TODO: Add support in database
     return((Int64)(SwarmDb.GetDatabaseForReading().GetFinancialAccountsBudget(Identities, year) * 100));
 }