Exemplo n.º 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));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 5
0
        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));
        }