public void Remove(int id)
 {
     using (DBEntities db = new DBEntities())
     {
         UserOrder userOrderModel     = db.UserOrder.Where(x => x.Reservation == id).FirstOrDefault();
         EquipmentOrderController EOC = new EquipmentOrderController();
         FoodOrderController      FOC = new FoodOrderController();
         EOC.Remove(userOrderModel.Order_code);
         FOC.Remove(userOrderModel.Order_code);
         db.UserOrder.Remove(userOrderModel);
         db.SaveChanges();
     }
 }
 public ActionResult Cancel(int id, FormCollection collection)
 {
     using (DBEntities db = new DBEntities())
     {
         UserOrder userOrderModel     = db.UserOrder.Where(x => x.Order_code == id).FirstOrDefault();
         EquipmentOrderController EOC = new EquipmentOrderController();
         FoodOrderController      FOC = new FoodOrderController();
         EOC.Remove(userOrderModel.Order_code);
         FOC.Remove(userOrderModel.Order_code);
         db.UserOrder.Remove(userOrderModel);
         db.SaveChanges();
     }
     return(RedirectToAction("UserOrderListView"));
 }