コード例 #1
0
ファイル: Event.cs プロジェクト: garygsw/Camphor
 public void AddExpenditure(Budget newBudget)
 {
     // FUNCTION: Add new expenditure to the list
     // PRE-CONDITIONS:
     // POST-CONDITIONS:
     newBudget.budgetId = this.expenditureId++;
     expenditureList.Add(newBudget);
 }
コード例 #2
0
 public int AddIncome(string name, decimal amount, int eventId)
 {
     // FUNCTION: Add a new expenditure
     // PRE-CONDITIONS:
     // POST-CONDITIONS:
     Budget budget = new Budget();
     budget.description = name;
     budget.amount = amount;
     server.GetEvent(eventId).AddIncome(budget);
     return budget.budgetId;
 }
コード例 #3
0
ファイル: Event.cs プロジェクト: garygsw/Camphor
 //BudgetLists add/delete/edit
 public void AddIncome(Budget newBudget)
 {
     // FUNCTION: Add new income to the list
     // PRE-CONDITIONS:
     // POST-CONDITIONS:
     newBudget.budgetId = this.incomeId++;
     incomeList.Add(newBudget);
 }