void GetDataMem() { try { #region Allcode DataMemory.c_hs_Allcode.Clear(); AllCodeBL _AllCodeBL = new AllCodeBL(); List <AllcodeInfo> _lst_al = _AllCodeBL.AllCode_Gets_List(); if (_lst_al.Count > 0) { foreach (AllcodeInfo item in _lst_al) { if (DataMemory.c_hs_Allcode.ContainsKey(item.CdName + "|" + item.CdType) == false) { List <AllcodeInfo> _lst = new List <AllcodeInfo>(); _lst.Add(item); DataMemory.c_hs_Allcode[item.CdName + "|" + item.CdType] = _lst; } else { List <AllcodeInfo> _lst = (List <AllcodeInfo>)DataMemory.c_hs_Allcode[item.CdName + "|" + item.CdType]; _lst.Add(item); } } } #endregion #region Custom DataMemory.Get_ListCustom(); #endregion } catch (Exception ex) { NaviCommon.Common.log.Error(ex.ToString()); } }
/// <summary> /// Create:Dangtq /// Ham thưc kiện kiểm tra kết nối tới services gắn lại timeout cho services /// </summary> void CheckConnectToWCFProvideData() { try { while (true) { AllCodeBL _AllCodeBL = new AllCodeBL(); NaviCommon.Common.ConnectedWCF = _AllCodeBL.CheckWCF(); if (NaviCommon.Common.ConnectedWCF == false) { NaviCommon.Common.log.Error("Loi ket noi toi Service"); } Thread.Sleep(3000);//3s chekc 1 lan } } catch (Exception ex) { NaviCommon.Common.log.Error(ex.ToString()); NaviCommon.Common.ConnectedWCF = false; } }