StableVersion4.3/HL_FristAidPlatform_Bussiness/Service/T_Service_Apoplexy_HATBLL.cs

62 lines
1.7 KiB
C#

using HL_FristAidPlatform_DataBase;
using HL_FristAidPlatform_Help;
using HL_FristAidPlatform_IDataBase;
using HL_FristAidPlatform_Models;
namespace HL_FristAidPlatform_Bussiness
{
/// <summary>
/// 健康教育记录
/// </summary>
public class T_Service_Apoplexy_HATBLL
{
private IT_Service_Apoplexy_HAT IService = new T_Service_Apoplexy_HATDB();
public int AddorUpdate(T_Service_Apoplexy_HAT model)
{
int id = IService.GetIDByPatientGuid(model.PatientGuid);
if (id != 0)
{
model.ID = id;
return IService.Update(model);
}
else
{
return IService.Add(model);
}
}
public MessageModel<T_Service_Apoplexy_HAT> Delete(int id)
{
if (IService.Delete(id))
{
return new MessageModel<T_Service_Apoplexy_HAT> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_HAT> { Success = false, Msg = "操作失败" };
}
}
public T_Service_Apoplexy_HAT Get(long id)
{
return IService.Get(id);
}
public TableModel<T_Service_Apoplexy_HAT> GetPageList(int pageIndex, int pageSize)
{
return IService.GetPageList(pageIndex, pageSize);
}
/// <summary>
///
/// </summary>
/// <param name="patientGuid"></param>
/// <returns></returns>
public TableModel<T_Service_Apoplexy_HAT> GetByPatientGuid(string patientGuid)
{
return IService.GetByPatientGuid(patientGuid);
}
}
}