Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            HealthFactMilestone healthFactMilestone = db.HealthFactMilestones.Find(id);

            db.HealthFactMilestones.Remove(healthFactMilestone);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public ActionResult Edit([Bind(Include = "ID,DaysIn,FactBody,ImageID")] HealthFactMilestone healthFactMilestone)
        {
            if (ModelState.IsValid)
            {
                db.Entry(healthFactMilestone).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(healthFactMilestone));
        }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "ID,DaysIn,FactBody,ImageID")] HealthFactMilestone healthFactMilestone)
        {
            if (ModelState.IsValid)
            {
                db.HealthFactMilestones.Add(healthFactMilestone);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }


            return(View(healthFactMilestone));
        }
Esempio n. 4
0
        // GET: HealthFactMilestones/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HealthFactMilestone healthFactMilestone = db.HealthFactMilestones.Find(id);

            if (healthFactMilestone == null)
            {
                return(HttpNotFound());
            }
            return(View(healthFactMilestone));
        }