public ActionResult DeleteConfirmed(int id) { OurWorkGalleryType ourWorkGalleryType = db.OurWorkGalleryType.Find(id); db.OurWorkGalleryType.Remove(ourWorkGalleryType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,Title,Lanid")] OurWorkGalleryType ourWorkGalleryType) { if (ModelState.IsValid) { db.Entry(ourWorkGalleryType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.languageType = new SelectList(db.languageType, "Lanid", "Type", ourWorkGalleryType.LanguageType); return(PartialView(ourWorkGalleryType)); }
public ActionResult Create([Bind(Include = "id,Title,Lanid")] OurWorkGalleryType ourWorkGalleryType) { if (ModelState.IsValid) { db.OurWorkGalleryType.Add(ourWorkGalleryType); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.languageType = new SelectList(db.languageType, "Lanid", "Type", ourWorkGalleryType.LanguageType); return(View(ourWorkGalleryType)); }
// GET: Admin/OurWorkGalleryTypes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OurWorkGalleryType ourWorkGalleryType = db.OurWorkGalleryType.Find(id); if (ourWorkGalleryType == null) { return(HttpNotFound()); } return(View(ourWorkGalleryType)); }
// GET: Admin/OurWorkGalleryTypes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OurWorkGalleryType ourWorkGalleryType = db.OurWorkGalleryType.Find(id); if (ourWorkGalleryType == null) { return(HttpNotFound()); } ViewBag.languageType = new SelectList(db.languageType, "Lanid", "Type", ourWorkGalleryType.LanguageType); return(PartialView(ourWorkGalleryType)); }