コード例 #1
0
 public void updateExpense(Expense e)
 {
     em.updateExpense(e);
 }
コード例 #2
0
 public void updateExpense(Expense e)
 {
     try {
         if(e is AbroadExpense)
             Abroaddb.Save (e as AbroadExpense);
         if(e is DomesticExpense)
             Domesticdb.Save (e as DomesticExpense);
     } catch (Exception ex) {
         throw new ExpenseException("Error while updating expense "+ e.ToString() +" in database.", ex);
     }
 }
コード例 #3
0
 public void deleteExpense(Expense e)
 {
     em.deleteExpense(e);
 }
コード例 #4
0
 public void deleteExpense(Expense e)
 {
     try {
         if(e is AbroadExpense)
             Abroaddb.Delete (e.ID);
         if(e is DomesticExpense)
             Domesticdb.Delete (e.ID);
     } catch (Exception ex) {
         throw new ExpenseException("Error while deleting expense "+ e.ToString() +" from database.", ex);
     }
 }