Example #1
0
 public static List <Event> GetEvenements()
 {
     try
     {
         if (_events == null)
         {
             using (var service = new HackathonServiceClient())
             {
                 var data = service.GetEvenements();
                 var list = new List <Event>();
                 foreach (var m in data)
                 {
                     if (!list.Exists(i => i.Name == m.Name))
                     {
                         list.Add(m);
                     }
                 }
                 _events = list;
             }
         }
         return(_events);
     }
     catch (Exception ex)
     {
         Logger.Error(ex, "SHManager.GetEvenements");
         throw ex;
     }
 }
Example #2
0
 public static List <FilmFicheDetail> GetFilms()
 {
     try
     {
         if (_movies == null)
         {
             using (var service = new HackathonServiceClient())
             {
                 var data = service.GetFilms();
                 var list = new List <FilmFicheDetail>();
                 foreach (var m in data)
                 {
                     if (!list.Exists(i => i.Titre_Film == m.Titre_Film))
                     {
                         list.Add(m);
                     }
                 }
                 _movies = list;
             }
         }
         return(_movies);
     }
     catch (Exception ex)
     {
         Logger.Error(ex, "SHManager.GetCinemas");
         throw ex;
     }
 }
Example #3
0
 public static FicheResultatMobile GetCompanyByAddress(string address)
 {
     try
     {
         using (var service = new HackathonServiceClient())
         {
             var data = service.GetTiersByAddress(address);
             return(data);
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex, "SHManager.GetCompanyByAddress");
         throw ex;
     }
 }
Example #4
0
 public static FicheInfoMobile GetCompany(int id)
 {
     try
     {
         using (var service = new HackathonServiceClient())
         {
             var data = service.GetTiers(id);
             return(data);
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex, "SHManager.GetCompany");
         throw ex;
     }
 }
Example #5
0
 public static Salle GetSalle(int id)
 {
     try
     {
         using (var service = new HackathonServiceClient())
         {
             var data = service.GetSalle(id);
             return(data);
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex, "SHManager.GetSalle");
         throw ex;
     }
 }
Example #6
0
 public static FicheResultatMobile GetNightClubs()
 {
     try
     {
         if (_clubs == null)
         {
             using (var service = new HackathonServiceClient())
             {
                 var data = service.GetNightClubs();
                 _clubs = data;
             }
         }
         return(_clubs);
     }
     catch (Exception ex)
     {
         Logger.Error(ex, "SHManager.GetNightClubs");
         throw ex;
     }
 }