예제 #1
0
        protected override ActionResult RedirectToActionAfterSuccessDelete(AfterDeleteParam afterDeleteParam)
        {
            MenuDeletionDto menuDeletionDto = (MenuDeletionDto)afterDeleteParam.DeletionDto;

            if (menuDeletionDto.ParentMenuItemId.HasValue)
            {
                return(Json(JsonTreeResult.CreateTreeSuccess(menuDeletionDto.ParentMenuItemId.Value, afterDeleteParam.TargetHtml, null, afterDeleteParam.Action)));
            }

            //if(afterDeleteParam.DeletionDto == null)
            return(Json(JsonTreeResult.CreateTreeSuccess(null, afterDeleteParam.TargetHtml, null, afterDeleteParam.Action)));
            //if (affectedId.HasValue)
            //{
            //    return base.RedirectToActionAfterSuccessDelete(affectedId, affectedId.ToString(), action, routeValues, JsonRefreshMode.TREE);
            //}
            //return base.RedirectToActionAfterSuccessDelete(affectedId, targetId, action, routeValues, JsonRefreshMode.FULL);
            //if(!Guid.Empty.Equals(id))
            //{
            //    return RedirectToActionAfterSuccessDelete(id, actionName, controllerName, targetId, routeValues);
            //}
            //return RedirectToActionAfterSuccessDelete(id, actionName, controllerName, targetId, routeValues);
        }
예제 #2
0
 public ActionResult DeleteConfirmed(MenuDeletionDto menuDeletionDto)
 {
     menuDeletionDto.ParentMenuItemId = GetService().GetParentId(menuDeletionDto.Id);
     return(DoDeleteConfirmed(AfterDeleteParam.Create(menuDeletionDto, Message.CreateSuccessMessage(MessageKeyConstants.INFO_OBJECT_DELETED_SUCCESS_MESSAGE), WebConstants.VIEW_LIST, WebConstants.CONTROLLER_MENU, null, HtmlConstants.TREE_MENU_ITEM)));
 }