/// <summary> /// 初始化PDA基本参数 /// </summary> public static void Init() { if (string.IsNullOrEmpty(PDANumber)) { PDANumber = DictionaryServer.GetPDAInfo(Enum_DicKey.pdaNumber); } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.pdaNumber, PDANumber); } if (string.IsNullOrEmpty(StorageName)) { StorageName = DictionaryServer.GetPDAInfo(Enum_DicKey.storageName); } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.storageName, StorageName); } if (string.IsNullOrEmpty(Destination)) { Destination = DictionaryServer.GetPDAInfo(Enum_DicKey.destination); } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.destination, Destination); } if (string.IsNullOrEmpty(LastSyncTime)) { LastSyncTime = DictionaryServer.GetPDAInfo(Enum_DicKey.lastSyncTime); } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.lastSyncTime, LastSyncTime); } //上报周期 if (UploadCycle == 10) { string tempCount = DictionaryServer.GetPDAInfo(Enum_DicKey.uploadCycle); if (!string.IsNullOrEmpty(tempCount)) { UploadCycle = int.Parse(tempCount); } else { _UploadCycle = 120; } } //运单最大查询数量 if (MaxUploadOrderCount == 1) { string tempCount = DictionaryServer.GetPDAInfo(Enum_DicKey.maxUploadOrderCount); if (!string.IsNullOrEmpty(tempCount)) { MaxUploadOrderCount = int.Parse(tempCount); } else { _MaxUploadOrderCount = 1; } } //节点最大查询数量 if (MaxUploadNodeCount == 1) { string tempCount = DictionaryServer.GetPDAInfo(Enum_DicKey.maxUploadNodeCount); if (!string.IsNullOrEmpty(tempCount)) { MaxUploadNodeCount = int.Parse(tempCount); } else { _MaxUploadNodeCount = 1; } } if (string.IsNullOrEmpty(WebServiceAddress)) { string tempAddress = DictionaryServer.GetPDAInfo(Enum_DicKey.webServiceAddress); if (!string.IsNullOrEmpty(tempAddress)) { WebServiceAddress = tempAddress; } else { _WebServiceAddress = "www1.huadongbio.com:8005"; } } }
/// <summary> /// 初始化PDA基本参数 /// </summary> public static void Init() { if (string.IsNullOrEmpty(PDANumber)) { PDANumber = DictionaryServer.GetPDAInfo(Enum_DicKey.pdaNumber); } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.pdaNumber, PDANumber); } if (string.IsNullOrEmpty(StorageName)) { StorageName = DictionaryServer.GetPDAInfo(Enum_DicKey.storageName); } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.storageName, StorageName); } if (string.IsNullOrEmpty(Destination)) { Destination = DictionaryServer.GetPDAInfo(Enum_DicKey.destination); } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.destination, Destination); } if (string.IsNullOrEmpty(LastSyncTime)) { LastSyncTime = DictionaryServer.GetPDAInfo(Enum_DicKey.lastSyncTime); if (string.IsNullOrEmpty(LastSyncTime)) { _LastSyncTime = "2017-01-01 00:00"; } } if (ValueChangeEvent != null) { ValueChangeEvent(Enum_DicKey.lastSyncTime, LastSyncTime); } //上报周期 if (DefaultProvince != "浙江省") { string tempStr = DictionaryServer.GetPDAInfo(Enum_DicKey.defaultProvince); if (!string.IsNullOrEmpty(tempStr)) { DefaultProvince = tempStr; } else { _DefaultProvince = "浙江省"; } } //上报周期 if (UploadCycle != 3) { string tempCount = DictionaryServer.GetPDAInfo(Enum_DicKey.uploadCycle); if (!string.IsNullOrEmpty(tempCount)) { UploadCycle = int.Parse(tempCount); } else { _UploadCycle = 10; } } //运单最大查询数量 if (MaxUploadOrderCount != 1) { string tempCount = DictionaryServer.GetPDAInfo(Enum_DicKey.maxUploadOrderCount); if (!string.IsNullOrEmpty(tempCount)) { MaxUploadOrderCount = int.Parse(tempCount); } else { _MaxUploadOrderCount = 1; } } //节点最大查询数量 if (MaxUploadNodeCount != 1) { string tempCount = DictionaryServer.GetPDAInfo(Enum_DicKey.maxUploadNodeCount); if (!string.IsNullOrEmpty(tempCount)) { MaxUploadNodeCount = int.Parse(tempCount); } else { _MaxUploadNodeCount = 1; } } if (string.IsNullOrEmpty(WebServiceAddress)) { string tempAddress = DictionaryServer.GetPDAInfo(Enum_DicKey.webServiceAddress); if (!string.IsNullOrEmpty(tempAddress)) { WebServiceAddress = tempAddress; } else { _WebServiceAddress = "www1.huadongbio.com:8005"; } } //操作界面n秒后无操作则自动返回主界面 if (AutoReturnDelay != 120) { string tempCount = DictionaryServer.GetPDAInfo(Enum_DicKey.autoReturnDelay); if (!string.IsNullOrEmpty(tempCount)) { AutoReturnDelay = int.Parse(tempCount); } else { _AutoReturnDelay = 120; } } }