StableVersion4.3/HL_FristAidPlatform_DataBase/Service/T_Service_FollowUpTemplateD...

47 lines
1.6 KiB
C#

using HL_FristAidPlatform_Help;
using HL_FristAidPlatform_IDataBase;
using HL_FristAidPlatform_Models;
using SqlSugar;
using System.Collections.Generic;
namespace HL_FristAidPlatform_DataBase
{
public class T_Service_FollowUpTemplateDB : BaseDB, IT_Service_FollowUpTemplate
{
public SqlSugarClient db = GetClient();
public bool Add(T_Service_FollowUpTemplate model)
{
return db.Insertable(model).ExecuteCommand() == 0 ? false : true;
}
public bool Delete(string ID)
{
return db.Deleteable<T_Service_FollowUpTemplate>(it => it.ID.ToString() == ID).ExecuteCommand() == 0 ? false : true; ;
}
public T_Service_FollowUpTemplate Get(string ID)
{
return db.Queryable<T_Service_FollowUpTemplate>().First(it => it.ID.ToString() == ID);
}
public TableModel<T_Service_FollowUpTemplate> GetPageList(int pageIndex, int pageSize, string guid)
{
int total = 0;
List<T_Service_FollowUpTemplate> data = db.Queryable<T_Service_FollowUpTemplate>().Where(it => it.DeleteFlag == 0).ToPageList(pageIndex, pageSize, ref total);
TableModel<T_Service_FollowUpTemplate> t = new TableModel<T_Service_FollowUpTemplate>();
t.Code = 0;
t.PageCount = data.Count;
t.TotalNumber = total;
t.Data = data;
t.Msg = "成功";
return t;
}
public bool Update(T_Service_FollowUpTemplate model)
{
return db.Updateable(model).ExecuteCommand() == 0 ? false : true;
}
}
}