public ActionResult Delete(int id, FormCollection collection) { try { RecordsDAO r = new RecordsDAO(); r.DeleteRecord(id); return(RedirectToAction("Index")); } catch (Exception ex) { return(View()); } }
public ActionResult Delete(Int64 id) { try { int rec_id = Convert.ToInt32(id); recordsDAO.DeleteRecord(rec_id); return(View("OK")); } catch { return(View("Ошибка")); } }