public ActionResult DeleteConfirmed(int id) { BusinessSubCatageory businessSubCatageory = db.BusinessSubCatageories.Find(id); db.BusinessSubCatageories.Remove(businessSubCatageory); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name,BussinessCatageoryId")] BusinessSubCatageory businessSubCatageory) { if (ModelState.IsValid) { db.Entry(businessSubCatageory).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BussinessCatageoryId = new SelectList(db.BusinessCatageories, "Id", "Name", businessSubCatageory.BussinessCatageoryId); return(View(businessSubCatageory)); }
// GET: BusinessSubCatageories/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BusinessSubCatageory businessSubCatageory = db.BusinessSubCatageories.Find(id); if (businessSubCatageory == null) { return(HttpNotFound()); } return(View(businessSubCatageory)); }
// GET: BusinessSubCatageories/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BusinessSubCatageory businessSubCatageory = db.BusinessSubCatageories.Find(id); if (businessSubCatageory == null) { return(HttpNotFound()); } ViewBag.BussinessCatageoryId = new SelectList(db.BusinessCatageories, "Id", "Name", businessSubCatageory.BussinessCatageoryId); return(View(businessSubCatageory)); }