123456789101112131415161718192021222324252627 |
- using DbHelper;
- using WCS.Entity.Protocol;
- namespace WCS.Service.Helpers
- {
- /// <summary>
- /// 系统设置
- /// </summary>
- public class SystemConfigHelpers
- {
- /// <summary>
- /// 获取指定设备配置信息 true表示设备启用,false标识设备未启用
- /// </summary>
- /// <param name="DEVICECODE">设备编号</param>
- /// <returns></returns>
- public static bool GetDeviceConfig(string DEVICECODE)
- {
- bool result = true;
- Db.Do(db =>
- {
- var systemConfig = db.Default.Queryable<WCS_SystemConfig>().Single(p => p.DEVICECODE == DEVICECODE);
- if (systemConfig != null) result = systemConfig.ENABLED;
- });
- return result;
- }
- }
- }
|