Ejemplo n.º 1
0
 public bool InsetMenu(Menu menu)
 {
     try
     {
         cf.Menu.Add(menu);
         cf.SaveChanges();
         return(true);
     }
     catch { return(false); }
 }
Ejemplo n.º 2
0
 public bool Insert(Food food)
 {
     try
     {
         cf.Food.Add(food);
         cf.SaveChanges();
         return(true);
     }
     catch { return(false); }
 }
Ejemplo n.º 3
0
 public bool Insert(CustomerUser customer)
 {
     try
     {
         cf.CustomerUser.Add(customer);
         cf.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Ejemplo n.º 4
0
 public bool SendFeedBack(FeedBack feed)
 {
     try
     {
         cf.FeedBack.Add(feed);
         cf.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Ejemplo n.º 5
0
 public bool Insert(Contact contact)
 {
     try
     {
         cf.Contact.Add(contact);
         cf.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Ejemplo n.º 6
0
 public bool Insert(OrderInfo infos)
 {
     try
     {
         cf.OrderInfo.Add(infos);
         cf.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Ejemplo n.º 7
0
 public bool Update(BookTable book)
 {
     try
     {
         var table = cf.Table.Find(book.IDTable);
         table.Status = "Đã đặt bàn";
         cf.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Ejemplo n.º 8
0
        public bool Insert(BookTable book)
        {
            try
            {
                book.Status = "Đang đặt bàn";
                cf.BookTable.Add(book);
                cf.SaveChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Ejemplo n.º 9
0
 public int Insert(Order order)
 {
     cf.Order.Add(order);
     cf.SaveChanges();
     return(order.ID);
 }
Ejemplo n.º 10
0
 public int InsertAccount(Account account)
 {
     cf.Account.Add(account);
     cf.SaveChanges();
     return(account.ID);
 }