Beispiel #1
0
        public ActionResult Modifier(int id)
        {
            BlocageServiceAPI   rs = new BlocageServiceAPI();
            BlocageModification r  = new BlocageModification(rs.Donner(id));

            return(View(r));
        }
Beispiel #2
0
 public static Blocage VersBlocage(this BlocageModification e)
 {
     if (e == null)
     {
         return(null);
     }
     return(new Blocage {
         id = e.id, description = e.description, nom = e.nom
     });
 }
Beispiel #3
0
        public ActionResult Modifier(int id, BlocageModification rm)
        {
            if (ModelState.IsValid)
            {
                BlocageServiceAPI rsa = new BlocageServiceAPI();
                Blocage           r   = rm.VersBlocage();
                bool b = rsa.Modifier(id, r);
                if (b)
                {
                    return(RedirectToAction("Index"));
                }
            }

            return(View(rm));
        }