public ActionResult Delete(Int32?Businesscategoryid) { using (BusinessCategoryCtl db = new BusinessCategoryCtl()) { db.delete(Businesscategoryid); return(RedirectToAction("Index")); } }
public ActionResult EditTableRowDelete(Int32?Businesscategoryid) { using (BusinessCategoryCtl db = new BusinessCategoryCtl()) { db.delete(Businesscategoryid); return(RedirectToAction("EditTable")); } }
public ActionResult EditTableRowsDelete(string records) { using (BusinessCategoryCtl db = new BusinessCategoryCtl()) { foreach (string id in records.Trim(',').Split(',')) { if (!string.IsNullOrEmpty(id.Trim())) { db.delete(Convert.ToInt32(id)); } } return(View()); } }