Beispiel #1
0
 public static void DeleteReservation(int idReservation)
 {
     using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
     {
         oExamenSgbdEntities.DeleteReservation(idReservation);
     }
 }
Beispiel #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);
     }
 }
Beispiel #3
0
 public static void UpdateReservation(int idReservation, int prixTotal)
 {
     using (ExamenSGBDEntities oExamenSgbdEntities = new ExamenSGBDEntities())
     {
         oExamenSgbdEntities.ConfirmReservation(idReservation, prixTotal);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
        }
Beispiel #7
0
        public static List <CarteRestaurant> SelectCarteRestaurant()
        {
            List <CarteRestaurant> valueToReturn;

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

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

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

            return(valueToReturn);
        }
Beispiel #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);
        }
Beispiel #10
0
        public static List <DetailMenu> SelectDetailMenu()
        {
            List <DetailMenu> valueToReturn;

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

            return(valueToReturn);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #14
0
        public static List <TablesChaise> SelectTablesChaise()
        {
            List <TablesChaise> valueToReturn;

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

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

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

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

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

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

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

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

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

            return(valueToReturn);
        }
Beispiel #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);
        }