namespace Yw.DAL
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public partial class SysUnitValue : BaseDAL_Sorter<Entity.SysUnitValue>
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public override ConnectionConfig ConnectionConfig
|
{
|
get { return ConfigHelper.DefaultConnectionConfig; }
|
|
}
|
|
|
/// <summary>
|
/// 通过 TypeID 获取
|
/// </summary>
|
public List<Entity.SysUnitValue> GetByTypeID(long TypeID)
|
{
|
using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig))
|
{
|
return db.Queryable<Entity.SysUnitValue>()
|
.Where(x => x.TypeID == TypeID)
|
.OrderBy(x => x.SortCode).ToList();
|
}
|
}
|
|
/// <summary>
|
/// 更新编码
|
/// </summary>
|
public bool UpdateCode(long ID, string Code)
|
{
|
using (SqlSugarClient db = new(ConnectionConfig))
|
{
|
return db.Updateable<Entity.SysUnitLang>()
|
.SetColumns(x => x.Code == Code)
|
.Where(x => x.ID == ID)
|
.ExecuteCommandHasChange();
|
}
|
}
|
|
|
|
|
|
}
|
}
|