lixiaojun
2023-12-26 3c05a19c6896c197953df955c729d26c8dc94536
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
46
47
48
49
50
51
52
53
54
55
56
namespace IStation.Service
{
    /// <summary>
    /// 
    /// </summary>
    public class LogicHelper
    {
        /// <summary>
        /// 获取名称
        /// </summary>
        public static string GetName(string LogicType, long LogicID)
        {
            var name = string.Empty;
            switch (LogicType)
            {
                case DataType.LogicArea:
                    {
                        name = new Service.LogicArea().GetByID(LogicID)?.Name;
                    }
                    break;
                case DataType.LogicSite:
                    {
                        name = new Service.LogicSite().GetByID(LogicID)?.Name;
                    }
                    break;
                default: break;
            }
            return name;
        }
 
        /// <summary>
        /// 获取说明
        /// </summary>
        public static string GetDescription(string LogicType, long LogicID)
        {
            var description = string.Empty;
            switch (LogicType)
            {
                case DataType.LogicArea:
                    {
                        description = new Service.LogicArea().GetByID(LogicID)?.Description;
                    }
                    break;
                case DataType.LogicSite:
                    {
                        description = new Service.LogicSite().GetByID(LogicID)?.Description;
                    }
                    break;
                default: break;
            }
            return description;
        }
 
 
    }
}