Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tblIssueCategory tblIssueCategory = db.tblIssueCategories.Find(id);

            db.tblIssueCategories.Remove(tblIssueCategory);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "categoryID,categoryTitle,categoryDescription")] tblIssueCategory tblIssueCategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblIssueCategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblIssueCategory));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "categoryID,categoryTitle,categoryDescription")] tblIssueCategory tblIssueCategory)
        {
            if (ModelState.IsValid)
            {
                db.tblIssueCategories.Add(tblIssueCategory);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tblIssueCategory));
        }
Пример #4
0
        // GET: IssueCategories/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblIssueCategory tblIssueCategory = db.tblIssueCategories.Find(id);

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