예제 #1
0
 public static void DeleteReservation(int idReservation)
 {
     using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
     {
         oExamenSgbdEntities.DeleteReservation(idReservation);
     }
 }
예제 #2
0
 public static void UpdateDetailReservation(int idReservation, string prenom, int entree, int plat, int dessert, int prix)
 {
     using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
     {
         oExamenSgbdEntities.UpdateDetailReservation(idReservation, prenom, entree, plat, dessert, prix);
     }
 }
예제 #3
0
 public static void UpdateReservation(int idReservation, int prixTotal)
 {
     using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
     {
         oExamenSgbdEntities.ConfirmReservation(idReservation, prixTotal);
     }
 }
예제 #4
0
 public static void InsertReservation(string numero, int idTables, DateTime date, string prenom, string nom,
                                      int nombre)
 {
     using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
     {
         oExamenSgbdEntities.InsertReservation(numero, idTables, date, prenom, nom, nombre);
     }
 }
예제 #5
0
 public static void InsertDetailReservationMenu(int idReservation, string prenom, int entree, int plat, int dessert, int prix, int idMenu)
 {
     using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
     {
         oExamenSgbdEntities.InsertDetailReservationMenu(idReservation, prenom, entree, plat, dessert, prix,
                                                         idMenu);
     }
 }
예제 #6
0
        public static List <SelectCarteMenu_Result> SelectCarteMenu(int idMenu, int type)
        {
            List <SelectCarteMenu_Result> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.SelectCarteMenu(idMenu, type).ToList();
            }

            return(valueToReturn);
        }
예제 #7
0
        public static List <CarteRestaurant> SelectCarteRestaurant()
        {
            List <CarteRestaurant> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.CarteRestaurants.ToList();
            }

            return(valueToReturn);
        }
예제 #8
0
        public static List <DetailReservation> SelectDetailReservation()
        {
            List <DetailReservation> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.DetailReservations.ToList();
            }

            return(valueToReturn);
        }
예제 #9
0
        //static ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities();

        public static int SelectNbreDeChaise(int idTables)
        {
            int nbreDePlace;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                nbreDePlace = oExamenSgbdEntities.TablesChaises.FirstOrDefault(x =>
                                                                               x.idTables == idTables).nbreDePlaces;
            }
            return(nbreDePlace);
        }
예제 #10
0
        public static List <DetailMenu> SelectDetailMenu()
        {
            List <DetailMenu> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.DetailMenus.ToList();
            }

            return(valueToReturn);
        }
예제 #11
0
        public static List <SelectParticipantsParReservation_Result> SelectParticipantsParReservation(int idReservation)
        {
            List <SelectParticipantsParReservation_Result> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.SelectParticipantsParReservation(idReservation).ToList();
            }

            return(valueToReturn);
        }
예제 #12
0
        public static List <SelectCarteByRestaurantAndType_Result> SelectCarteByRestaurantAndType(int idRestaurant, int type)
        {
            List <SelectCarteByRestaurantAndType_Result> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.SelectCarteByRestaurantAndType(idRestaurant, type).ToList();
            }

            return(valueToReturn);
        }
예제 #13
0
        public static List <SelectTablesByRestaurant_Result> SelectTablesByRestaurant(int idRestaurant, DateTime date)
        {
            List <SelectTablesByRestaurant_Result> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.SelectTablesByRestaurant(idRestaurant, date).ToList();
            }

            return(valueToReturn);
        }
예제 #14
0
        public static List <TablesChaise> SelectTablesChaise()
        {
            List <TablesChaise> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.TablesChaises.ToList();
            }

            return(valueToReturn);
        }
예제 #15
0
        public static List <SelectAllRestaurants_Result> SelectAllRestaurants()
        {
            List <SelectAllRestaurants_Result> valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn = oExamenSgbdEntities.SelectAllRestaurants().ToList();
            }

            return(valueToReturn);
        }
예제 #16
0
        public static List <Reservation> SelectListReservation()
        {
            List <Reservation> lstReservation = new List <Reservation>();

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                lstReservation = oExamenSgbdEntities.Reservations.ToList();
            }

            return(lstReservation);
        }
예제 #17
0
        public static int SumPrixDetailReservation(int idReservation)
        {
            int valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn =
                    (Int32)oExamenSgbdEntities.SumPrixDetailReservation(idReservation).FirstOrDefault();
            }

            return(valueToReturn);
        }
예제 #18
0
        public static int SelectPrixGroupe(int idCarteRestaurant)
        {
            int valueToReturn;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                valueToReturn =
                    (Int32)oExamenSgbdEntities.SelectPrixGroupe(idCarteRestaurant).FirstOrDefault();
            }

            return(valueToReturn);
        }
예제 #19
0
        public static int?SelectIdMenu(int idDetailReservation)
        {
            int?idMenu = null;

            using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
            {
                if (oExamenSgbdEntities.SelectMenu(idDetailReservation).FirstOrDefault() != null)
                {
                    idMenu = (Int32)oExamenSgbdEntities.SelectMenu(idDetailReservation).FirstOrDefault();
                }
            }

            return(idMenu);
        }