コード例 #1
0
 /// <summary>
 /// 根据品种标识返回股指期货持仓限制
 /// </summary>
 /// <param name="breedClassID">品种标识</param>
 /// <returns></returns>
 public Entity.QH_SIFPosition GetSIFPositionByBreedClassID(int breedClassID)
 {
     try
     {
         LogHelper.WriteDebug("Debug-8518根据品种标识返回股指期货持仓限制方法名称:GetSIFPositionByBreedClassID(int breedClassID)参数是:" + breedClassID + "时间是:" + DateTime.Now);
         QH_SIFPositionBLL            qH_SIFPositionBLL  = new QH_SIFPositionBLL();
         List <Entity.QH_SIFPosition> qH_SIFPositionList =
             qH_SIFPositionBLL.GetListArray(string.Format("BreedClassID={0}", breedClassID));
         if (qH_SIFPositionList.Count > 0)
         {
             Entity.QH_SIFPosition qH_SIFPosition = qH_SIFPositionList[0];
             if (qH_SIFPosition != null)
             {
                 return(qH_SIFPosition);
             }
         }
         return(null);
     }
     catch (Exception ex)
     {
         string      errCode = "GL-8518";
         string      errMsg  = "根据品种标识返回股指期货持仓限制失败";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         return(null);
     }
 }
コード例 #2
0
 /// <summary>
 /// 获取所有的股指期货持仓限制
 /// </summary>
 /// <returns></returns>
 public List <Entity.QH_SIFPosition> GetAllSIFPosition()
 {
     try
     {
         LogHelper.WriteDebug("Debug-8517获取所有的股指期货持仓限制方法名称:GetAllSIFPosition()" + DateTime.Now);
         QH_SIFPositionBLL qH_SIFPositionBLL = new QH_SIFPositionBLL();
         return(qH_SIFPositionBLL.GetListArray(string.Empty));
     }
     catch (Exception ex)
     {
         string      errCode = "GL-8517";
         string      errMsg  = "获取所有的股指期货持仓限制失败";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         return(null);
     }
 }