/// <summary> /// 删除文章类别 /// </summary> /// <param name="topic"></param> /// <returns></returns> public static bool DeleteTopicCategory(TopicCategory topicCategory) { topicCategory = TopicDA.LoadTopicCategory(topicCategory.SysNo.Value); //查询当前分类下是否有关联文章 List <TopicInfo> topicList = TopicDA.LoadTopicInfoListByCategory(topicCategory.SysNo.Value); if (topicList != null && topicList.Count > 0) { throw new BusinessException("当前类别下有关联文章,不能删除此类别!"); } else { bool result = true; result = TopicDA.DeleteTopicCategory(topicCategory); return(result); } }
public static TopicCategory LoadTopicCategory(int sysNo) { return(TopicDA.LoadTopicCategory(sysNo)); }