📄 user_rolebll.cs
字号:
//------------------------------------*/
//版权所有:杭州商易信息技术有限公司
//功能描述:用户权限类
// 作者:沈伟
// 日期:2008/08/26
//------------------------------------*/
using System;
using System.Collections.Generic;
using System.Data;
using Itsv.Model;
namespace Itsv.BLL.SystemManage
{
public class User_RoleBLL
{
private static readonly Itsv.DAL.SystemManage.User_RoleDAL dal = new Itsv.DAL.SystemManage.User_RoleDAL();
#region
public bool ExistsUser(int role_id)
{
try
{
return dal.ExistsUser(role_id);
}
catch
{
return false;
}
}
///<summary>
///增加一条数据
///</summary>
public bool Add(Itsv.Model.User_Role model, ref string msg)
{
try
{
Itsv.Model.User_Role u = dal.GetModel(model.account);
if (u != null)
{
model.ur_id = u.ur_id;
dal.Update(model);
u = null;
model = null;
return true;
}
dal.Add(model);
model = null;
return true;
}
catch (Exception ex)
{
msg = ex.Message;
return false;
}
}
///<summary>
///更新一条数据
///</summary>
public void Update(Itsv.Model.User_Role model)
{
dal.Update(model);
}
/// <summary>
/// 删除一条数据
/// </summary>
public void Delete(int ur_id)
{
dal.Delete(ur_id);
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Itsv.Model.User_Role GetModel(string account, ref string msg)
{
try
{
return dal.GetModel(account);
}
catch (Exception ex)
{
msg = ex.Message;
return null;
}
}
/// <summary>
/// 获得数据列表
/// </summary>
public DataSet GetList(string strWhere)
{
return dal.GetList(strWhere);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -