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_FollowUpTemplateChildDB : BaseDB, IT_Service_FollowUpTemplateChild { public SqlSugarClient db = GetClient(); public bool Add(T_Service_FollowUpTemplateChild model) { return db.Insertable(model).ExecuteCommand() == 0 ? false : true; } public bool Delete(string ID) { return db.Deleteable(it => it.ID.ToString() == ID).ExecuteCommand() == 0 ? false : true; ; } public T_Service_FollowUpTemplateChild Get(string ID) { return db.Queryable().First(it => it.ID.ToString() == ID); } public TableModel GetPageList(int pageIndex, int pageSize, string parentGUID) { int total = 0; List data = db.Queryable().Where(it => it.DeleteFlag == 0 && it.ParentGUID == parentGUID).ToPageList(pageIndex, pageSize, ref total); TableModel t = new TableModel(); t.Code = 0; t.PageCount = data.Count; t.TotalNumber = total; t.Data = data; t.Msg = "成功"; return t; } public bool Update(T_Service_FollowUpTemplateChild model) { return db.Updateable(model).ExecuteCommand() == 0 ? false : true; } } }