#region
|
|
using System;
|
using System.Data;
|
using CSFrameworkV5.Common;
|
using CSFrameworkV5.Core;
|
using CSFrameworkV5.DataAccess;
|
using CSFrameworkV5.Interfaces;
|
using CSFrameworkV5.Models;
|
using CSFrameworkV5.WebRef.SystemModule;
|
|
#endregion
|
|
namespace CSFrameworkV5.Business.BLL_Permission
|
{
|
/// <summary>
|
/// 用户临时权限的业务逻辑层
|
/// </summary>
|
public class bllUserRole
|
{
|
private IBridge_UserRole _MyBridge;
|
|
public bllUserRole()
|
{
|
_MyBridge = CreateBridge();
|
}
|
|
private IBridge_UserRole CreateBridge()
|
{
|
if (BridgeFactory.IsADODirect)
|
return new dalUserRole(Loginer.CurrentUser);
|
|
if (BridgeFactory.IsWCFBridge) return new WCF_UserRole();
|
|
throw new CustomException(BridgeFactory.UNKNOW_BRIDGE_TYPE);
|
}
|
|
public bool DeleteUserRole(string account, string roleID)
|
{
|
return _MyBridge.DeleteUserRole(account, roleID);
|
}
|
|
/// <summary>
|
/// 搜索功能
|
/// </summary>
|
/// <param name="account"></param>
|
/// <param name="roleID"></param>
|
/// <param name="expireDateFrom"></param>
|
/// <param name="expireDateTo"></param>
|
/// <returns></returns>
|
public DataTable SearchUserRole(string account, string roleID,
|
DateTime expireDateFrom, DateTime expireDateTo)
|
{
|
return _MyBridge.SearchUserRole(account, roleID, expireDateFrom,
|
expireDateTo);
|
}
|
|
public bool Update(DataTable data)
|
{
|
var ds = new DataSet();
|
ds.Tables.Add(data.Copy());
|
var dd = BridgeFactory.CreateDataDictBridge(typeof(tb_MyUserRoles));
|
return dd.Update(ds);
|
}
|
}
|
}
|