Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            StrategicGoal strategicGoal = db.StrategicGoals.Find(id);

            db.StrategicGoals.Remove(strategicGoal);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Goals,StrategicPillarId")] StrategicGoal strategicGoal)
 {
     if (ModelState.IsValid)
     {
         db.Entry(strategicGoal).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.StrategicPillarId = new SelectList(db.StrategicPillars, "Id", "StrategicPillar1", strategicGoal.StrategicPillarId);
     return(View(strategicGoal));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,Goals,StrategicPillarId")] StrategicGoal strategicGoal)
        {
            if (ModelState.IsValid)
            {
                db.StrategicGoals.Add(strategicGoal);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.StrategicPillarId = new SelectList(db.StrategicPillars, "Id", "StrategicPillar1", strategicGoal.StrategicPillarId);
            return(View(strategicGoal));
        }
Exemplo n.º 4
0
        // GET: StrategicGoals/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StrategicGoal strategicGoal = db.StrategicGoals.Find(id);

            if (strategicGoal == null)
            {
                return(HttpNotFound());
            }
            return(View(strategicGoal));
        }
Exemplo n.º 5
0
        // GET: StrategicGoals/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StrategicGoal strategicGoal = db.StrategicGoals.Find(id);

            if (strategicGoal == null)
            {
                return(HttpNotFound());
            }
            ViewBag.StrategicPillarId = new SelectList(db.StrategicPillars, "Id", "StrategicPillar1", strategicGoal.StrategicPillarId);
            return(View(strategicGoal));
        }