Exemple #1
0
        public List <REQUEST_TRAVEL> getListByUser(int id_user)
        {
            try
            {
                var Context = new connext_dbEntities();
                return(Context.REQUEST_TRAVEL.Where(r => r.ID_USER == id_user).ToList());
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de récupérer la liste des requests." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de récupérer la liste des requests.");
#endif
            }
        }
Exemple #2
0
        public GROUP get(int Id)
        {
            try
            {
                var Context = new connext_dbEntities();
                return(Context.GROUPs.Single(l => l.ID_GROUP == Id));
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de récupérer la groupe." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de récupérer la groupe.");
#endif
            }
        }
Exemple #3
0
        public CATEGORY get(int Id)
        {
            try
            {
                var Context = new connext_dbEntities();
                return(Context.CATEGORies.Single(l => l.ID_CATEGORY == Id));
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de récupérer l'agence." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de récupérer l'agence.");
#endif
            }
        }
Exemple #4
0
        public TRAVEL get(int Id)
        {
            try
            {
                var Context = new connext_dbEntities();
                return(Context.TRAVELs.Single(l => l.ID_TRAVEL == Id));
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de récupérer le covoiturage." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de récupérer le covoiturage.");
#endif
            }
        }
Exemple #5
0
        public List <TRAVEL> getList()
        {
            try
            {
                var Context = new connext_dbEntities();
                return(Context.TRAVELs.ToList());
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de récupérer la liste des covoiturages." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de récupérer la liste des covoiturages.");
#endif
            }
        }
Exemple #6
0
        public List <TRAVEL> getListByUser(int id_user)
        {
            try
            {
                var Context = new connext_dbEntities();
                return(Context.TRAVELs.Where(t => t.PUBLICATION.ID_USER == id_user).ToList());
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de récupérer la liste des covoiturages." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de récupérer la liste des covoiturages.");
#endif
            }
        }
Exemple #7
0
        public void add(GROUP group)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.GROUPs.Add(group);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible d'ajouter la groupe." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible d'ajouter la groupe.");
#endif
            }
        }
        public void add(PUBLICATION publication)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.PUBLICATIONs.Add(publication);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de modifier le lieu." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de modifier le lieu.");
#endif
            }
        }
Exemple #9
0
        public void add(REQUEST_TRAVEL request)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.REQUEST_TRAVEL.Add(request);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de modifier l'agence." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de modifier l'agence.");
#endif
            }
        }
        public List<REQUEST_TRAVEL> getList(int id_travel)
        {
            try
            {
                var Context = new connext_dbEntities();
                return Context.REQUEST_TRAVEL.Where(r => r.ID_TRAVEL == id_travel).ToList();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de récupérer la liste des requests." + Environment.NewLine + ex.StackTrace);
            #else
                throw new Exception("Impossible de récupérer la liste des requests.");

            #endif
            }
        }
        public List<PUBLICATION> getList()
        {
            try
            {
                var Context = new connext_dbEntities();
                return Context.PUBLICATIONs.ToList();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de récupérer la liste des agences." + Environment.NewLine + ex.StackTrace);
            #else
                throw new Exception("Impossible de récupérer la liste des agences.");

            #endif
            }
        }
Exemple #12
0
        public TRAVEL get(int Id)
        {
            try
            {
                var Context = new connext_dbEntities();
                return Context.TRAVELs.Single(l => l.ID_TRAVEL == Id);
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de récupérer le covoiturage." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de récupérer le covoiturage.");

            #endif
            }
        }
Exemple #13
0
        public void add(CATEGORY cat)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.CATEGORies.Add(cat);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de modifier l'agence." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de modifier l'agence.");
#endif
            }
        }
Exemple #14
0
        public void remove(CATEGORY cat)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.CATEGORies.Remove(cat);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de supprimer le lieu." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de supprimer le lieu.");
#endif
            }
        }
Exemple #15
0
        public GROUP get(int Id)
        {
            try
            {
                var Context = new connext_dbEntities();
                return Context.GROUPs.Single(l => l.ID_GROUP == Id);
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de récupérer la groupe." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de récupérer la groupe.");

            #endif
            }
        }
Exemple #16
0
        public AGENCY get(int Id)
        {
            try
            {
                var Context = new connext_dbEntities();
                return Context.AGENCies.Single(l => l.ID_AGENCY == Id);
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de récupérer l'agence." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de récupérer l'agence.");

            #endif
            }
        }
Exemple #17
0
        public void add(TRAVEL travel)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.TRAVELs.Add(travel);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de modifier le covoiturage." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de modifier le covoiturage.");
#endif
            }
        }
Exemple #18
0
        public void add(GROUP group)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.GROUPs.Add(group);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible d'ajouter la groupe." + Environment.NewLine + ex.StackTrace);
            #else
                throw new Exception("Impossible d'ajouter la groupe.");

            #endif
            }
        }
        public void add(PUBLICATION publication)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.PUBLICATIONs.Add(publication);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de modifier le lieu." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de modifier le lieu.");

            #endif
            }
        }
Exemple #20
0
        public void add(TRAVEL travel)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.TRAVELs.Add(travel);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de modifier le covoiturage." + Environment.NewLine + ex.StackTrace);
            #else
                throw new Exception("Impossible de modifier le covoiturage.");

            #endif
            }
        }
        public void add(REQUEST_TRAVEL request)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.REQUEST_TRAVEL.Add(request);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de modifier l'agence." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de modifier l'agence.");

            #endif
            }
        }
Exemple #22
0
        public void modify(int id, int idaction)
        {
            try
            {
                var            Context       = new connext_dbEntities();
                REQUEST_TRAVEL requesttravel = Context.REQUEST_TRAVEL.First(r => r.ID_REQUEST_TRAVEL == id);
                requesttravel.ID_ACTION = idaction;
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de modifier l'agence." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de modifier l'agence.");
#endif
            }
        }
Exemple #23
0
        public void remove(AGENCY agency)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.AGENCies.Remove(agency);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de supprimer le lieu." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de supprimer le lieu.");

            #endif
            }
        }
Exemple #24
0
        public void add(AGENCY agency)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.AGENCies.Add(agency);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de modifier l'agence." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de modifier l'agence.");

            #endif
            }
        }
Exemple #25
0
        public List <CATEGORY> getList()
        {
            try
            {
                var Context = new connext_dbEntities();
#if DEBUG
                return(Context.CATEGORies.ToList());
#else
                return(Context.CATEGORies.ToList());
#endif
            }
            catch (Exception ex)
            {
#if DEBUG
                throw new Exception("Impossible de récupérer la liste des agences." + Environment.NewLine + ex.StackTrace);
#else
                throw new Exception("Impossible de récupérer la liste des agences.");
#endif
            }
        }
Exemple #26
0
        public List<GROUP> getList()
        {
            try
            {
                var Context = new connext_dbEntities();
            #if DEBUG
                return Context.GROUPs.ToList();
            #else
                return Context.GROUPs.ToList();
            #endif
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de récupérer la liste des groupes." + Environment.NewLine + ex.StackTrace);
            #else
                throw new Exception("Impossible de récupérer la liste des groupes.");

            #endif
            }
        }
        public void modify(int id, int idaction)
        {
            try
            {
                var Context = new connext_dbEntities();
                REQUEST_TRAVEL requesttravel = Context.REQUEST_TRAVEL.First(r => r.ID_REQUEST_TRAVEL == id);
                requesttravel.ID_ACTION = idaction;
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de modifier l'agence." + Environment.NewLine + ex.StackTrace);
            #else
                throw new Exception("Impossible de modifier l'agence.");

            #endif
            }
        }
        public void remove(REQUEST_TRAVEL request)
        {
            try
            {
                var Context = new connext_dbEntities();
                Context.REQUEST_TRAVEL.Remove(request);
                Context.SaveChanges();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de supprimer le lieu." + Environment.NewLine + ex.StackTrace);
            #else
            throw new Exception("Impossible de supprimer le lieu.");

            #endif
            }
        }
Exemple #29
0
        public List<TRAVEL> getListByUser(int id_user)
        {
            try
            {
                var Context = new connext_dbEntities();
                return Context.TRAVELs.Where(t => t.PUBLICATION.ID_USER == id_user).ToList();
            }
            catch (Exception ex)
            {
            #if DEBUG
                throw new Exception("Impossible de récupérer la liste des covoiturages." + Environment.NewLine + ex.StackTrace);
            #else
                throw new Exception("Impossible de récupérer la liste des covoiturages.");

            #endif
            }
        }