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