Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            update_content_type update_content_type = db.update_content_type.Single(u => u.ContentTypeID == id);

            db.update_content_type.DeleteObject(update_content_type);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult Create(update_content_type update_content_type)
        {
            if (ModelState.IsValid)
            {
                db.update_content_type.AddObject(update_content_type);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(update_content_type));
        }
Example #3
0
 public ActionResult Edit(update_content_type update_content_type)
 {
     if (ModelState.IsValid)
     {
         db.update_content_type.Attach(update_content_type);
         db.ObjectStateManager.ChangeObjectState(update_content_type, EntityState.Modified);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(update_content_type));
 }
Example #4
0
        //
        // GET: /Admin/UpdateContentTypes/Delete/5

        public ActionResult Delete(int id)
        {
            update_content_type update_content_type = db.update_content_type.Single(u => u.ContentTypeID == id);

            return(View(update_content_type));
        }
Example #5
0
        //
        // GET: /Admin/UpdateContentTypes/Details/5

        public ViewResult Details(int id)
        {
            update_content_type update_content_type = db.update_content_type.Single(u => u.ContentTypeID == id);

            return(View(update_content_type));
        }