public ActionResult Delete(PostDTO dto) { OpPostDelete delete = new OpPostDelete(); delete.idzabriranje = dto.Id; var result = _manager.ExecuteOperation(delete); return(RedirectToAction("Index")); }
// POST: Admin/Post/Delete/5 public ActionResult Delete(int id) { try { OpPostDelete op = new OpPostDelete(); op.Dto.Id = id; OperationResult result = _manager.ExecuteOperation(op); return(RedirectToAction("Index")); } catch { return(RedirectToAction("Index")); } }
// GET: Admin/Post/Delete/5 // POST: Admin/Post/Delete/5 public ActionResult Delete(int id) { try { OperationManager manager = OperationManager.Singleton; OpPostDelete op = new OpPostDelete(); op.Dto.id_posta = id; ResultOperation result = manager.ExecuteOperation(op); return(RedirectToAction("Index")); } catch { return(View()); } }