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