示例#1
0
 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 }
     });
 }
示例#2
0
        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();
        }