222
schangxiang@126.com
2024-12-13 a5e54d60dbc5c695b8cadc21fcb44eb5c851f09c
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
using System;
using System.Configuration;
 
namespace iWareCommon.Utils
{
    /// <summary>
    /// web.config操作类
    /// Copyright (C) TBEA.WMS
    /// </summary>
    public sealed class WCSConfigHelper
    {
 
        /// <summary>
        /// 获取当前程序配置的 是否启用新入库口
        /// </summary>
        /// <returns></returns>
        public static bool GetConfig_IsEnableNewInStorePlace()
        {
            return ConfigHelper.GetConfigBool("IsEnableNewInStorePlace");
        }
 
        /// <summary>
        /// 获取当前程序配置的 是否模拟PLC
        /// </summary>
        /// <returns></returns>
        public static bool GetConfig_IsSimulationPLC()
        {
            return ConfigHelper.GetConfigBool("IsSimulationPLC");
            //*/
            //return false;//!!!!!注意:这里一定是FALSE!!!!!
        }
 
        /// <summary>
        /// 获取当前程序配置的 是否是随机寻找库位,默认是false
        /// </summary>
        /// <returns>true:随机寻找库位,false:不随机寻找库位</returns>
        public static bool GetConfig_IsRandomFindPlace()
        {
            var isRandomFindPlace = System.Configuration.ConfigurationManager.AppSettings["IsRandomFindPlace"];
            if (string.IsNullOrEmpty(isRandomFindPlace))
            {
                return false;
            }
            return Convert.ToBoolean(isRandomFindPlace);
        }
    }
}