Exemple #1
0
        public ActionResult Create([Bind(Include = "id,nom")] Responsable responsable)
        {
            if (ModelState.IsValid)
            {
                db.Responsable.Add(responsable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(responsable));
        }
        public ActionResult Create([Bind(Include = "id,nom,id_responsable")] Projet projet)
        {
            if (ModelState.IsValid)
            {
                db.Projet.Add(projet);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.id_responsable = new SelectList(db.Responsable, "id", "nom", projet.id_responsable);
            return(View(projet));
        }
Exemple #3
0
        public ActionResult Create([Bind(Include = "id,nom,type,description,id_projet")] Exigence exigence)
        {
            if (ModelState.IsValid)
            {
                db.Exigence.Add(exigence);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.id_projet = new SelectList(db.Projet, "id", "nom", exigence.id_projet);
            return(View(exigence));
        }
Exemple #4
0
        public ActionResult Create([Bind(Include = "id,id_projet,id_responsable,date_prevue,date_livraison")] Jalon jalon)
        {
            if (ModelState.IsValid)
            {
                db.Jalon.Add(jalon);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.id_projet      = new SelectList(db.Projet, "id", "nom", jalon.id_projet);
            ViewBag.id_responsable = new SelectList(db.Responsable, "id", "nom", jalon.id_responsable);
            return(View(jalon));
        }
        public ActionResult Create([Bind(Include = "id,nom,description,id_responsable,date_debut,id_jalon,date_fin,date__debut_prevue")] Tache tache)
        {
            if (ModelState.IsValid)
            {
                db.Tache.Add(tache);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.id_jalon       = new SelectList(db.Jalon, "id", "id", tache.id_jalon);
            ViewBag.id_responsable = new SelectList(db.Responsable, "id", "nom", tache.id_responsable);
            return(View(tache));
        }