示例#1
0
        public ActionResult Supprimer(int id)
        {
            BlocageServiceAPI rsa = new BlocageServiceAPI();
            BlocageDetails    r   = new BlocageDetails(rsa.Donner(id));

            return(View(r));
        }
示例#2
0
        public ActionResult Modifier(int id)
        {
            BlocageServiceAPI   rs = new BlocageServiceAPI();
            BlocageModification r  = new BlocageModification(rs.Donner(id));

            return(View(r));
        }
示例#3
0
        public ActionResult Index()
        {
            BlocageServiceAPI          rs = new BlocageServiceAPI();
            IEnumerable <BlocageIndex> ri = rs.Donner().Select(j => new BlocageIndex(j));

            return(View(ri));
        }
示例#4
0
        public ActionResult Desactiver(int id)
        {
            BlocageServiceAPI rsa = new BlocageServiceAPI();
            bool b = rsa.Desactiver(id);

            return(RedirectToAction("Index"));
        }
示例#5
0
        public ActionResult Details(int id)
        {
            BlocageServiceAPI rsa = new BlocageServiceAPI();
            Blocage           r   = rsa.Donner(id);
            BlocageDetails    rd  = new BlocageDetails(r);

            return(View(rd));
        }
示例#6
0
 public ActionResult Creer(BlocageCreation e)
 {
     if (ModelState.IsValid)
     {
         BlocageServiceAPI rsa = new BlocageServiceAPI();
         int i = rsa.Creer(e.VersBlocage());
         if (i > 0)
         {
             return(RedirectToAction("Index"));
         }
     }
     return(View(e));
 }
示例#7
0
 public ActionResult Supprimer(int id, BlocageDetails r)
 {
     if (ModelState.IsValid)
     {
         BlocageServiceAPI rsa = new BlocageServiceAPI();
         bool b = rsa.Supprimer(id);
         if (b)
         {
             return(RedirectToAction("Index"));
         }
     }
     return(View(r));
 }
示例#8
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));
        }