예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ArticleExternalLinks articleExternalLinks = db.ArticleExternalLinks.Find(id);

            db.ArticleExternalLinks.Remove(articleExternalLinks);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "articleExternalLinkID,articleID,url")] ArticleExternalLinks articleExternalLinks)
 {
     if (ModelState.IsValid)
     {
         db.Entry(articleExternalLinks).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.articleID = new SelectList(db.Article, "articleID", "title", articleExternalLinks.articleID);
     return(View(articleExternalLinks));
 }
예제 #3
0
        // GET: ArticleExternalLinks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ArticleExternalLinks articleExternalLinks = db.ArticleExternalLinks.Find(id);

            if (articleExternalLinks == null)
            {
                return(HttpNotFound());
            }
            return(View(articleExternalLinks));
        }
예제 #4
0
        // GET: ArticleExternalLinks/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ArticleExternalLinks articleExternalLinks = db.ArticleExternalLinks.Find(id);

            if (articleExternalLinks == null)
            {
                return(HttpNotFound());
            }
            ViewBag.articleID = new SelectList(db.Article, "articleID", "title", articleExternalLinks.articleID);
            return(View(articleExternalLinks));
        }