StableVersion4.3/HL_FristAidPlatform_Bussiness/SYS/T_SYS_PositionBLL.cs

82 lines
2.5 KiB
C#

using HL_FristAidPlatform_DataBase;
using HL_FristAidPlatform_Help;
using HL_FristAidPlatform_IDataBase;
using HL_FristAidPlatform_Models;
namespace HL_FristAidPlatform_Bussiness
{
public class T_SYS_PositionBLL
{
private IT_SYS_Position IService = new T_SYS_PositionDB();
public MessageModel<T_SYS_Position> Add(T_SYS_Position entity)
{
if (IService.Add(entity))
{
return new MessageModel<T_SYS_Position> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_SYS_Position> { Success = false, Msg = "操作失败" };
}
}
public MessageModel<T_SYS_Position> Dels(dynamic[] ids)
{
if (IService.Dels(ids))
{
return new MessageModel<T_SYS_Position> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_SYS_Position> { Success = false, Msg = "操作失败" };
}
}
public T_SYS_Position Get(long id)
{
return IService.Get(id);
}
public TableModel<T_SYS_Position> GetList()
{
return IService.GetList();
}
public TableModel<T_SYS_PositionModel> GetPageList(int pageIndex, int pageSize, string keyWord)
{
return IService.GetPageList(pageIndex, pageSize, keyWord);
}
public MessageModel<T_SYS_Position> Update(T_SYS_Position entity)
{
if (IService.Update(entity))
{
return new MessageModel<T_SYS_Position> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_SYS_Position> { Success = false, Msg = "操作失败" };
}
}
/// <summary>
/// 逻辑删除
/// </summary>
/// <param name="id">编号</param>
/// <param name="deleteFlag">标记:0取消删除 1删除</param>
/// <returns></returns>
public MessageModel<T_SYS_Position> LogicalDelete(long id, int deleteFlag)
{
if (IService.LogicalDelete(id, deleteFlag) > 0)
{
return new MessageModel<T_SYS_Position> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_SYS_Position> { Success = false, Msg = "操作失败" };
}
}
}
}