public void Delete() { database.DeleteExpense(Expense.ID); Insights.Track("ExpenseReportDeleted", new Dictionary <string, string> { { "ExpenseId", Expense.ExpenseId }, { "ExpenseReportId", Expense.ExpenseReportIdentifier }, { "ExpenseName", Expense.Name }, { "Price", Expense.FormattedPrice }, { "ShortDescription", Expense.ShortDescription } }); }
public void DeleteExpense(int id) { var expense = expenseDatabase.GetExpense(id); expenseDatabase.DeleteExpense(id); Insights.Track("ExpenseReportDeleted", new Dictionary <string, string> { { "ExpenseId", expense.ExpenseId }, { "ExpenseReportId", expense.ExpenseReportIdentifier }, { "ExpenseName", expense.Name }, { "Price", expense.FormattedPrice }, { "ShortDescription", expense.ShortDescription } }); GetReportExpenses(); }