You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
3.5 KiB
115 lines
3.5 KiB
9 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Data;
|
||
|
|
||
|
namespace FangYar.BLL.TBL
|
||
|
{
|
||
|
public class SysUSerRulesBLL
|
||
|
{
|
||
|
private static readonly FangYar.IDAL.TBL.SysUSerRulesIDAL dal = FangYar.DALFactory.Factory.GetSysUSerRulesDAL();
|
||
|
/// <summary>
|
||
|
/// 根据ID获取model
|
||
|
/// </summary>
|
||
|
public FangYar.Model.TBL.TBL_SYS_USERSRULES_Model GetModelByID(string ID)
|
||
|
{
|
||
|
return dal.GetModelByID(ID);
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 添加
|
||
|
/// </summary>
|
||
|
public bool Add(FangYar.Model.TBL.TBL_SYS_USERSRULES_Model model)
|
||
|
{
|
||
|
return dal.Add(model);
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 删除
|
||
|
/// </summary>
|
||
|
public bool Delete(string IDList)
|
||
|
{
|
||
|
return dal.Delete(IDList);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 编辑
|
||
|
/// </summary>
|
||
|
public bool Edit(FangYar.Model.TBL.TBL_SYS_USERSRULES_Model model)
|
||
|
{
|
||
|
|
||
|
return dal.Edit(model);
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 根据用户和访问规则类型删除
|
||
|
/// </summary>
|
||
|
/// <param name="userID"></param>
|
||
|
/// <param name="ruleType"></param>
|
||
|
/// <returns></returns>
|
||
|
public bool Delete(string userID, string ruleType) {
|
||
|
return dal.Delete(userID, ruleType);
|
||
|
}
|
||
|
|
||
|
/// 根据角色ID删除
|
||
|
public bool DeleteByRulesId(string userID, string ruleType)
|
||
|
{
|
||
|
return dal.DeleteByRulesId(userID, ruleType);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取记录数
|
||
|
/// </summary>
|
||
|
public int Count(string where)
|
||
|
{
|
||
|
return dal.Count(where);
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 分页
|
||
|
/// </summary>
|
||
|
/// <param name="PageIndex"></param>
|
||
|
/// <param name="PageSize"></param>
|
||
|
/// <param name="strwhere"></param>
|
||
|
/// <param name="order"></param>
|
||
|
public void QueryProc(int PageIndex, int PageSize, string strwhere, string order)
|
||
|
{
|
||
|
dal.QueryProc(PageIndex, PageSize, strwhere, order);
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 分页
|
||
|
/// </summary>
|
||
|
/// <param name="PageIndex"></param>
|
||
|
/// <param name="PageSize"></param>
|
||
|
/// <param name="strwhere"></param>
|
||
|
/// <param name="order"></param>
|
||
|
/// <returns></returns>
|
||
|
public List<FangYar.Model.TBL.TBL_SYS_USERSRULES_Model> QueryList(int PageIndex, int PageSize, string strwhere, string order)
|
||
|
{
|
||
|
return dal.QueryList(PageIndex, PageSize, strwhere, order);
|
||
|
}
|
||
|
//当前用户下的角色或者权限
|
||
|
public DataTable getUserRules(string UsersUid, string appid, string rulesTypes)
|
||
|
{
|
||
|
return dal.getUserRules(UsersUid, appid, rulesTypes);
|
||
|
}
|
||
|
//当前用户下的角色或者权限 , 根据机构判断
|
||
|
public DataTable getUserRules(string UsersUid, string appid,string rulesTypes, string Org_Id)
|
||
|
{
|
||
|
return dal.getUserRules(UsersUid, appid,rulesTypes, Org_Id);
|
||
|
}
|
||
|
//当前角色下绑定的用户
|
||
|
public DataTable ChooseUSer(string AppId, string RuleID)
|
||
|
{
|
||
|
return dal.ChooseUSer(AppId, RuleID);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据账号删除用户角色表
|
||
|
/// </summary>
|
||
|
/// <param name="USERS_UID"></param>
|
||
|
/// <returns></returns>
|
||
|
public bool DeleteByUid(string USERS_UID)
|
||
|
{
|
||
|
return dal.DeleteByUid(USERS_UID);
|
||
|
}
|
||
|
}
|
||
|
}
|