public bool Update(FunctionEntity entity) { bool isSuccess = functiondao.Update(entity); if (isSuccess) { ClearCacheOrSession.ClearFunctionsCacheByCRUD(); } return(isSuccess); }
/// <summary> /// 删除功能菜单 /// 如果功能菜单已被用户使用,则不可删除 /// </summary> /// <param name="functionID"></param> /// <returns></returns> public bool Delete(int functionID) { bool isSuccess = functiondao.Delete(functionID); if (isSuccess) { ClearCacheOrSession.ClearFunctionsCacheByCRUD(); } return(isSuccess); }
/// <summary> /// 新建分类 /// </summary> /// <param name="entity"></param> /// <returns></returns> public bool Insert(CategoriesEntity entity) { bool isSuccess = categories.Insert(entity); if (isSuccess) { ClearCacheOrSession.ClearFunctionsCacheByCRUD(); } return(isSuccess); }