using SqlSugar;
|
using System.Collections.Generic;
|
using System.Linq;
|
using TProduct.HttpClient;
|
|
namespace TProduct.DAL
|
{
|
/// <summary>
|
/// 测试台测试测点
|
/// </summary>
|
public class WorkBenchMonitorPoint : BaseLiteSqlDAL_Sorter_DataSync<Entity.WorkBenchMonitorPoint>
|
{
|
public override ISqlSugarClient Connection
|
{
|
get { return TProduct.DAL.SQLite.ConfigHelper.MainConn; }
|
}
|
|
/// <summary>
|
/// 编号是否存在
|
/// </summary>
|
public bool IsExistCode(string Code)
|
{
|
if (string.IsNullOrEmpty(Code))
|
return default;
|
using (ISqlSugarClient db = Connection)
|
{
|
return db.Queryable<Entity.WorkBenchMonitorPoint>().Where(x => x.Code == Code).Any();
|
}
|
}
|
|
/// <summary>
|
///是否存在Name
|
/// </summary>
|
public bool IsExistName( string Name)
|
{
|
if (string.IsNullOrEmpty(Name))
|
return default;
|
using (ISqlSugarClient db = Connection)
|
{
|
return db.Queryable<Entity.WorkBenchMonitorPoint>().Where(x => x.Name == Name ).Any();
|
}
|
}
|
|
}
|
}
|