Exemplo n.º 1
0
 /*Abonnement*/
 public static Abonnement VersAbonnement(this AbonnementCreation e)
 {
     if (e == null)
     {
         return(null);
     }
     return(new Abonnement {
         description = e.description, nom = e.nom, prix = e.prix, nombreMaxPersonnes = e.nombreMaxPersonnes, nombreMaxArbres = e.nombreMaxArbres
     });
 }
 public ActionResult Creer(AbonnementCreation e)
 {
     if (ModelState.IsValid)
     {
         AbonnementServiceAPI rsa = new AbonnementServiceAPI();
         int i = rsa.Creer(e.VersAbonnement());
         if (i > 0)
         {
             return(RedirectToAction("Index"));
         }
     }
     return(View(e));
 }
        public ActionResult Creer()
        {
            AbonnementCreation r = new AbonnementCreation();

            return(View(r));
        }