string DeleteAC(HHPrincipal principal, HttpContext context, ref bool result) { string msg = string.Empty; if (principal.IsInRole("NewsCategoryModule-Delete")) { DataActionStatus s = ArticleManager.DeleteCategories(context.Request["categoryIds"]); switch (s) { case DataActionStatus.Success: msg = "已成功删除所选的资讯分类!"; result = true; break; case DataActionStatus.RelationshipExist: result = false; msg = "当前资讯下存在关联数据[子分类/资讯],无法被删除!"; break; case DataActionStatus.UnknownFailure: result = false; msg = "删除资讯信息时发生了未知的错误!"; break; } } else { throw new Exception("您没有执行此操作的权限!"); } return(msg); }