DotNet.Business/DataAccess/Manager/BaseStaffManager.Web.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//-----------------------------------------------------------------
// All Rights Reserved , Copyright (C) 2014 , Hairihan TECH, Ltd.
//-----------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Caching;
namespace DotNet.Business
{
using DotNet.Utilities;
/// <remarks>
/// BaseStaffManager
/// 职员管理
///
/// 修改纪录
///
/// 版本:1.0 2012.12.17 JiRiGaLa 选项管理从缓存读取,通过编号显示名称的函数完善。
///
/// <author>
/// <name>JiRiGaLa</name>
/// <date>2012.12.17</date>
/// </author>
/// </remarks>
public partial class BaseStaffManager
{
#region public static void ClearCache() 清除缓存
/// <summary>
/// 清除缓存
/// </summary>
public static void ClearCache()
{
lock (BaseSystemInfo.UserLock)
{
if (HttpContext.Current.Cache[BaseStaffEntity.TableName] != null)
{
HttpContext.Current.Cache.Remove(BaseStaffEntity.TableName);
}
}
}
#endregion
#region public static List<BaseStaffEntity> GetEntities() 获取职员表,从缓存读取
/// <summary>
/// 获取职员表,从缓存读取
/// </summary>
public static List<BaseStaffEntity> GetEntities()
{
if (HttpContext.Current.Session == null || HttpContext.Current.Cache[BaseStaffEntity.TableName] == null)
{
lock (BaseSystemInfo.UserLock)
{
if (HttpContext.Current.Session == null || HttpContext.Current.Cache[BaseStaffEntity.TableName] == null)
{
// 读取目标表中的数据
List<BaseStaffEntity> entityList = null;
BaseStaffManager manager = new DotNet.Business.BaseStaffManager(BaseStaffEntity.TableName);
后面还有 38 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
