예제 #1
0
        public async Task <HttpResponseMessage> Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req,
            ILogger log)
        {
            log.LogInformation("C# HTTP trigger function processed a request.");


            string retour = "";

            try
            {
                retour = new SocieteDAO(sqlManager).GetAllSociete();
            }
            catch (Exception e)
            {
                return(new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError)
                {
                    Content = new StringContent(e.Message)
                });
            }
            return(new HttpResponseMessage(System.Net.HttpStatusCode.OK)
            {
                Content = new StringContent(retour)
            });
        }
예제 #2
0
 public static List <Societe> List(string query)
 {
     try
     {
         return(SocieteDAO.getList(query));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
예제 #3
0
 public static Societe OneById(int id)
 {
     try
     {
         return(SocieteDAO.getOneById(id));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
예제 #4
0
 public static Societe OneByName(string name)
 {
     try
     {
         return(SocieteDAO.getOneByName(name));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
예제 #5
0
 public static bool Update(Societe bean)
 {
     try
     {
         return(SocieteDAO.getUpdate(bean));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
예제 #6
0
 public static Societe ReturnSociete()
 {
     try
     {
         return(SocieteDAO.ReturnSociete());
     }
     catch (Exception ex)
     {
         throw new Exception("Echec de Création de fichier", ex);
     }
 }
예제 #7
0
 public static bool CreateSociete(Societe uneConfig)
 {
     try
     {
         return(SocieteDAO.CreateSociete(uneConfig));
     }
     catch (Exception ex)
     {
         throw new Exception("Echec de Création de fichier", ex);
     }
 }