예제 #1
0
 public virtual ActionResult Delete(Act act)
 {
     try
     {
         OpenErpConnection.GetConnection().DeleteEntity(act);
         return RedirectToAction("Index");
     }
     catch (Exception ex)
     {
         act.ExceptionMessage = ex.Message;
         return View(act);
     }
 }
예제 #2
0
 //
 // 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));
 }