示例#1
0
 public static List <Agence> List(string query)
 {
     try
     {
         return(AgenceDAO.getList(query));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
示例#2
0
 public static bool CreateAgence(Agence uneConfig)
 {
     try
     {
         return(AgenceDAO.CreateAgence(uneConfig));
     }
     catch (Exception ex)
     {
         throw new Exception("Echec de Création de fichier", ex);
     }
 }
示例#3
0
 public static Agence ReturnAgence()
 {
     try
     {
         return(AgenceDAO.ReturnAgence());
     }
     catch (Exception ex)
     {
         throw new Exception("Echec de Création de fichier", ex);
     }
 }
示例#4
0
 public static Agence OneById(int id)
 {
     try
     {
         Agence a = TOOLS.Constantes.AGENCES.Find(x => x.Id == id);
         if (a != null ? a.Id < 1 : true)
         {
             a = AgenceDAO.getOneById(id);
             TOOLS.Constantes.AGENCES.Add(a);
         }
         return(a);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
 //appel de la couche DAL pour récupérer une collection de communications
 public List <Agence> GetAgences()
 {
     //ici on peut appliquer des règles métier
     return(AgenceDAO.GetInstance().GetAgences());
 }