using System; using System.Collections.Generic; using System.Data; using System.Linq; using SqlSugar; namespace IStation.DAL { /// /// 客户字典值 /// public partial class CorpDictData : CorpDAL_Sorter_UseStatus { /// /// /// public override ConnectionConfig ConnectionConfig { get { return ConfigHelper.DefaultConnectionConfig; } } /// /// 通过 TypeID 获取 /// public List GetByTypeID(long CorpID, long TypeID) { using (var db = new SqlSugarClient(ConnectionConfig)) { return db.Queryable() .Where(x => x.CorpID == CorpID && x.TypeID == TypeID) .OrderBy(x => x.SortCode) .ToList(); } } /// /// 通过 TypeID 删除 /// public bool DeleteByTypeID(long CorpID, long TypeID) { using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig)) { return db.Deleteable() .Where(x => x.CorpID == CorpID && x.TypeID == TypeID) .ExecuteCommandHasChange(); } } } }