Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EndorsementComment endorsementComment = db.EndorsementComments.Find(id);

            db.EndorsementComments.Remove(endorsementComment);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "EndorsementCommentId,EndorsementId,Body,DateTimeCreated")] EndorsementComment endorsementComment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(endorsementComment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EndorsementId = new SelectList(db.Endorsements, "EndorsementId", "CreatedBy", endorsementComment.EndorsementId);
     return(View(endorsementComment));
 }
Ejemplo n.º 3
0
        // GET: EndorsementComments/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EndorsementComment endorsementComment = db.EndorsementComments.Find(id);

            if (endorsementComment == null)
            {
                return(HttpNotFound());
            }
            return(View(endorsementComment));
        }
Ejemplo n.º 4
0
        // GET: EndorsementComments/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EndorsementComment endorsementComment = db.EndorsementComments.Find(id);

            if (endorsementComment == null)
            {
                return(HttpNotFound());
            }
            ViewBag.EndorsementId = new SelectList(db.Endorsements, "EndorsementId", "CreatedBy", endorsementComment.EndorsementId);
            return(View(endorsementComment));
        }