tx
2025-04-22 e0b138b3e057de6f57021e6c8963868f5c5acc5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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();
            }
        }
 
    }
}