Esempio n. 1
0
 public TransactionTable FindTransactionsTable(int transactionId)
 {
     try {
         TransactionTable transaction = restaurantDB.TransactionTables.Find(transactionId);
         return(transaction);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 2
0
 public int EditTransactionsTable(TransactionTable transaction)
 {
     try {
         restaurantDB.Entry(transaction).State = EntityState.Modified;
         int flag = restaurantDB.SaveChanges();
         return(flag);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 3
0
 public int CreateTransactionsTableEntry(TransactionTable transaction)
 {
     try {
         restaurantDB.TransactionTables.Add(transaction);
         int flag = restaurantDB.SaveChanges();
         return(flag);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 4
0
 public int DeleteTransactionsTable(int transactionId)
 {
     try {
         TransactionTable transaction = restaurantDB.TransactionTables.Find(transactionId);
         restaurantDB.TransactionTables.Remove(transaction);
         int flag = restaurantDB.SaveChanges();
         return(flag);
     }
     catch (Exception e)
     {
         throw e;
     }
 }