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