Esempio n. 1
0
 public void updateExpense(Expense e)
 {
     em.updateExpense(e);
 }
 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);
     }
 }
Esempio n. 3
0
 public void deleteExpense(Expense e)
 {
     em.deleteExpense(e);
 }
 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);
     }
 }