public ActionResult DeleteConfirmed(int id) { subcategoryproperty subcategoryproperty = db.subcategoryproperties.Find(id); db.subcategoryproperties.Remove(subcategoryproperty); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "SubCategoryID,SubCategoryName,subcategorycode,PropertyTypeID,Status")] subcategoryproperty subcategoryproperty) { if (ModelState.IsValid) { db.Entry(subcategoryproperty).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(subcategoryproperty)); }
public ActionResult Create([Bind(Include = "SubCategoryID,SubCategoryName,subcategorycode,PropertyTypeID,Status")] subcategoryproperty subcategoryproperty) { if (ModelState.IsValid) { db.subcategoryproperties.Add(subcategoryproperty); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(subcategoryproperty)); }
// GET: Admin/subcategoryproperties/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } subcategoryproperty subcategoryproperty = db.subcategoryproperties.Find(id); if (subcategoryproperty == null) { return(HttpNotFound()); } return(View(subcategoryproperty)); }