コード例 #1
0
        public ActionResult Delete(PostDTO dto)
        {
            OpPostDelete delete = new OpPostDelete();

            delete.idzabriranje = dto.Id;
            var result = _manager.ExecuteOperation(delete);

            return(RedirectToAction("Index"));
        }
コード例 #2
0
ファイル: PostController.cs プロジェクト: nm1996/asp
 // 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"));
     }
 }
コード例 #3
0
        // 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());
            }
        }