コード例 #1
0
 private IList <XH_ValidDeclareType> GetAllValidDeclareTypeFromWCF()
 {
     try
     {
         using (SpotTradeRulesClient client = GetClient())
             return(client.GetAllValidDeclareType());
     }
     catch (Exception ex)
     {
         string errCode = "GT-8119";
         string errMsg  = "无法从管理中心获取涨跌幅类型列表。";
         throw new VTException(errCode, errMsg, ex);
     }
 }
 /// <summary>
 /// 获取所有有效申报类型
 /// </summary>
 /// <returns></returns>
 protected List <XH_ValidDeclareType> GetAllValidDeclareType()
 {
     try
     {
         using (SpotTradeRulesClient client = ManagementCenterDataAgent.Instanse.GetSpotTradeRulesInstanse())
         {
             return(client.GetAllValidDeclareType());
         }
     }
     catch (Exception ex)
     {
         LogHelper.WriteError(GenerateInfo.CH_E006, ex);
         return(null);
     }
 }