Beispiel #1
0
        public ActionResult Delete(PostDTO dto)
        {
            OpPostDelete delete = new OpPostDelete();

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

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 // 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"));
     }
 }
Beispiel #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());
            }
        }