namespace IStation.Service { /// /// /// public class LogicHelper { /// /// 获取名称 /// 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; } /// /// 获取说明 /// 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; } } }