Пример #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);
     }
 }