public ActionResult DeleteConfirmed(int id)
        {
            TherapyPlanComments therapyPlanComments = db.TherapyPlanComments.Find(id);

            db.TherapyPlanComments.Remove(therapyPlanComments);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Body,Created,Updated,TicketId,UserId,FileUrl,IsDeleted")] TherapyPlanComments therapyPlanComments)
 {
     if (ModelState.IsValid)
     {
         db.Entry(therapyPlanComments).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.TicketId = new SelectList(db.Plans, "Id", "Name", therapyPlanComments.TicketId);
     ViewBag.UserId   = new SelectList(db.Users, "Id", "FirstName", therapyPlanComments.UserId);
     return(View(therapyPlanComments));
 }
        // GET: TherapyPlanComments/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TherapyPlanComments therapyPlanComments = db.TherapyPlanComments.Find(id);

            if (therapyPlanComments == null)
            {
                return(HttpNotFound());
            }
            return(View(therapyPlanComments));
        }
        // GET: TherapyPlanComments/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TherapyPlanComments therapyPlanComments = db.TherapyPlanComments.Find(id);

            if (therapyPlanComments == null)
            {
                return(HttpNotFound());
            }
            ViewBag.TicketId = new SelectList(db.Plans, "Id", "Name", therapyPlanComments.TicketId);
            ViewBag.UserId   = new SelectList(db.Users, "Id", "FirstName", therapyPlanComments.UserId);
            return(View(therapyPlanComments));
        }