StableVersion4.3/HL_FristAidPlatform_Bussiness/Service/T_Service_Apoplexy_DRAGONBL...

58 lines
1.6 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_DRAGONBLL
{
private IT_Service_Apoplexy_DRAGON IService = new T_Service_Apoplexy_DRAGONDB();
public int AddorUpdate(T_Service_Apoplexy_DRAGON 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_DRAGON> Delete(int id)
{
if (IService.Delete(id))
{
return new MessageModel<T_Service_Apoplexy_DRAGON> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_DRAGON> { Success = false, Msg = "操作失败" };
}
}
public T_Service_Apoplexy_DRAGON Get(long id)
{
return IService.Get(id);
}
public TableModel<T_Service_Apoplexy_DRAGON> GetPageList(int pageIndex, int pageSize)
{
return IService.GetPageList(pageIndex, pageSize);
}
public TableModel<T_Service_Apoplexy_DRAGON> GetByPatientGuid(string patientGuid)
{
return IService.GetByPatientGuid(patientGuid);
}
}
}