/// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 private IList <HK_Commodity> GetAllHKCommodityFromWCF()
 {
     try
     {
         using (HKTradeRulesClient client = GetClient())
         {
             return(client.GetAllHKCommodity());
         }
     }
     catch (Exception ex)
     {
         string errCode = "GT-8003";
         string errMsg  = "无法从管理中心获取所有港股商品列表。";
         throw new VTException(errCode, errMsg, ex);
     }
 }
 /// <summary>
 /// 获取港股交易所有代码
 /// </summary>
 /// <returns></returns>
 protected List <HK_Commodity> GetAllHKCommodity()
 {
     try
     {
         using (HKTradeRulesClient client = ManagementCenterDataAgent.Instanse.GetHKTradeRulesInstance())
         {
             //List<HK_SpotTradeRules> r = client.GetAllHKSpotTradeRules();
             //List<HK_Commodity> ok = client.GetAllHKCommodity();
             return(client.GetAllHKCommodity());
         }
     }
     catch (Exception ex)
     {
         LogHelper.WriteError(GenerateInfo.CH_E006, ex);
         return(null);
     }
 }
 /// <summary>
 /// 获取所有的港股代码
 /// </summary>
 public static void GetAllHKCommodity()
 {
     hKCommodityList.Clear();
     hKCommodityList.Clear();
     //int[] breeid = { 44 };
     //int breeid = 44;//港股品种ID
     using (HKTradeRulesClient client = GetHKTradeRulesClient())
     {
         List <HK_Commodity> item = new List <HK_Commodity>();
         item = client.GetAllHKCommodity();
         hKCommodityList.AddRange(item);
     }
     using (HKTradeRulesClient client = GetHKTradeRulesClient())
     {
         hKSpotCostsList = client.GetAllHKSpotCosts();
     }
 }