You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
773 B
C#
33 lines
773 B
C#
using SqlSugar;
|
|
using ZJ_BYD.Model;
|
|
using ZJ_BYD.Untils;
|
|
|
|
namespace ZJ_BYD.DB
|
|
{
|
|
public class YearHelper
|
|
{
|
|
public YearHelper() : base()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询年份
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static ISugarQueryable<T_Year> QueryYears()
|
|
{
|
|
return DBHelper.sqlSugarDb.Queryable<T_Year>().Where(m => !m.IsDeleted);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据年份查询年份代码
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static string QueryYearCode(string year)
|
|
{
|
|
return DBHelper.sqlSugarDb.Queryable<T_Year>().First(m => m.YearName == year && !m.IsDeleted)?.YearCode;
|
|
}
|
|
}
|
|
}
|