Exemplo n.º 1
0
 public IEnumerable <Expenditure> GetProjectExpenditures(string projectId)
 {
     return(Expenditures.Where(q => q.ProjectId == projectId).OrderBy(q => q.CreateTime).ToArray());
 }
Exemplo 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());
 }
Exemplo 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);
        }