Esempio n. 1
0
 public IEnumerable <Expenditure> GetProjectExpenditures(string projectId)
 {
     return(Expenditures.Where(q => q.ProjectId == projectId).OrderBy(q => q.CreateTime).ToArray());
 }
Esempio n. 2
0
 public IEnumerable <Expenditure> GetProjectExpenditures(string projectId, BudgetCategory category)
 {
     return(Expenditures.Where(q => q.ProjectId == projectId && q.BudgetCategory == (int)category).OrderBy(q => q.CreateTime).ToArray());
 }
Esempio n. 3
0
        private double GetExpendituresTotalCount(string projectId, int budgetCategory)
        {
            double?result = Expenditures.Where(q => q.ProjectId == projectId && q.BudgetCategory == budgetCategory).Select(q => (double?)q.Count).Sum();

            return(result ?? 0.0);
        }