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