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