176 lines
4.9 KiB
C#
176 lines
4.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
using WMS.Model.SystemManage;
|
|
using WMS.IData;
|
|
using WMS.Common;
|
|
|
|
namespace WMS.Business.SystemManage
|
|
{
|
|
public class BussRoleDictionary : IBussFactory
|
|
{
|
|
|
|
|
|
#region 查
|
|
/// <summary>
|
|
/// 获得数据
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public List<RoleDictionaryModel> GetRoleDictionaryListData(RoleDictionaryModel model)
|
|
{
|
|
DataTable dt = DataProvider.Instance.RoleDictionary.GetRoleDictionaryListData(model);
|
|
|
|
List<RoleDictionaryModel> list = null;
|
|
if (DataLogErrWrite(dt, "根据查询条件获取角色维护结果集"))
|
|
{
|
|
list = ConvertHelper<RoleDictionaryModel>.ConvertToList(dt);
|
|
}
|
|
else
|
|
{
|
|
return list;
|
|
}
|
|
return list;
|
|
}
|
|
#endregion
|
|
|
|
#region 记录是否存在
|
|
/// <summary>
|
|
/// 判断是否存在记录
|
|
/// </summary>
|
|
/// <param name="role_id"></param>
|
|
/// <returns></returns>
|
|
public string ExistsRoleDictionary(string role_id)
|
|
{
|
|
string strResult = DataProvider.Instance.RoleDictionary.ExistsRoleDictionary(role_id);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return strResult;
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
#region 增一条
|
|
/// <summary>
|
|
/// 新增一条数据
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
public string AddRoleDictionary(RoleDictionaryModel model)
|
|
{
|
|
DataProvider.Instance.RoleDictionary.AddRoleDictionary(model);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
#region 增多条
|
|
/// <summary>
|
|
/// 新增多条数据
|
|
/// </summary>
|
|
/// <param name="list"></param>
|
|
public string AddRoleDictionaryList(List<RoleDictionaryModel> list)
|
|
{
|
|
DataProvider.Instance.RoleDictionary.AddRoleDictionaryList(list);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
#region 改一条
|
|
/// <summary>
|
|
/// 修改一条数据
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
public string UpdateRoleDictionary(RoleDictionaryModel model)
|
|
{
|
|
DataProvider.Instance.RoleDictionary.UpdateRoleDictionary(model);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 改多条
|
|
/// <summary>
|
|
/// 修改多条数据
|
|
/// </summary>
|
|
/// <param name="list"></param>
|
|
public string UpdateRoleDictionaryList(List<RoleDictionaryModel> list)
|
|
{
|
|
DataProvider.Instance.RoleDictionary.UpdateRoleDictionaryList(list);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
#region 删一条
|
|
/// <summary>
|
|
/// 删除一条数据
|
|
/// </summary>
|
|
/// <param name="ROLE_ID"></param>
|
|
public string DeleteRoleDictionary(string ROLE_ID)
|
|
{
|
|
DataProvider.Instance.RoleDictionary.DeleteRoleDictionary(ROLE_ID);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
|
|
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
|
|
#region 删多条
|
|
/// <summary>
|
|
/// 删除多条数据
|
|
/// </summary>
|
|
/// <param name="list"></param>
|
|
public string DeleteRoleDictionaryList(List<RoleDictionaryModel> list)
|
|
{
|
|
|
|
foreach (RoleDictionaryModel model in list)
|
|
{
|
|
DataProvider.Instance.RoleDictionary.DeleteRoleDictionaryList(model);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
////删 消息权限
|
|
//foreach (RoleDictionaryModel item in list)
|
|
//{
|
|
// DataProvider.Instance.RoleMessage.DeleteRoleMessageData(item.ROLE_ID);
|
|
// logList.Add(DataProvider.Instance.logData);
|
|
//}
|
|
|
|
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|