예제 #1
0
        public bool Update(FunctionEntity entity)
        {
            bool isSuccess = functiondao.Update(entity);

            if (isSuccess)
            {
                ClearCacheOrSession.ClearFunctionsCacheByCRUD();
            }
            return(isSuccess);
        }
예제 #2
0
        /// <summary>
        /// 删除功能菜单
        /// 如果功能菜单已被用户使用,则不可删除
        /// </summary>
        /// <param name="functionID"></param>
        /// <returns></returns>
        public bool Delete(int functionID)
        {
            bool isSuccess = functiondao.Delete(functionID);

            if (isSuccess)
            {
                ClearCacheOrSession.ClearFunctionsCacheByCRUD();
            }
            return(isSuccess);
        }
예제 #3
0
        /// <summary>
        /// 新建分类
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public bool Insert(CategoriesEntity entity)
        {
            bool isSuccess = categories.Insert(entity);

            if (isSuccess)
            {
                ClearCacheOrSession.ClearFunctionsCacheByCRUD();
            }
            return(isSuccess);
        }