public virtual ActionResult Delete(Act act) { try { OpenErpConnection.GetConnection().DeleteEntity(act); return RedirectToAction("Index"); } catch (Exception ex) { act.ExceptionMessage = ex.Message; return View(act); } }
// // GET: /Act/Delete/5 public virtual ActionResult Delete(int id) { var act = new Act {ID = id}; return View(OpenErpConnection.GetConnection().GetEntity<Act>(c => c.ID == act.ID)); }