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;
|
}
|
|
|
}
|
}
|