42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using HL_FristAidPlatform_Help;
|
|
using HL_FristAidPlatform_IDataBase;
|
|
using HL_FristAidPlatform_Models;
|
|
using SqlSugar;
|
|
|
|
namespace HL_FristAidPlatform_DataBase
|
|
{
|
|
public class T_Service_Apoplexy_TransferDB:BaseDB, IT_Service_Apoplexy_Transfer
|
|
{
|
|
public SqlSugarClient db = GetClient();
|
|
|
|
/// <summary>
|
|
/// 增加一条数据
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public T_Service_Apoplexy_Transfer Add(T_Service_Apoplexy_Transfer model)
|
|
{
|
|
return db.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新一条数据
|
|
/// </summary>
|
|
public int Update(T_Service_Apoplexy_Transfer model)
|
|
{
|
|
return db.Updateable(model).Where(it => it.PatientGuid == model.PatientGuid).ExecuteCommand();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据患者GUID获取数据
|
|
/// </summary>
|
|
/// <param name="patientGuid"></param>
|
|
/// <returns></returns>
|
|
public T_Service_Apoplexy_Transfer GetByPatientGuid(string patientGuid)
|
|
{
|
|
return db.Queryable<T_Service_Apoplexy_Transfer>().First(it => it.PatientGuid == patientGuid);
|
|
}
|
|
|
|
}
|
|
}
|