Ejemplo n.º 1
0
 /// <summary>
 /// 获取代码所属的撮合机实体
 /// </summary>
 /// <returns></returns>
 public Entity.RC_MatchMachine GetMatchMachinebyCommodity(string CommodityCode)
 {
     try
     {
         LogHelper.WriteDebug("Debug-8234获取代码所属的撮合机实体方法名称:GetMatchMachinebyCommodity(string CommodityCode) 参数:" + CommodityCode + "  " + DateTime.Now);
         //根据代码返回其它商品代码所属的撮合机实体(普通现货和股指期货)
         RC_TradeCommodityAssignBLL            RC_TradeCommodityAssignBLL  = new RC_TradeCommodityAssignBLL();
         List <Entity.RC_TradeCommodityAssign> rC_TradeCommodityAssignList =
             RC_TradeCommodityAssignBLL.GetListArray(string.Format("CommodityCode='{0}'", CommodityCode));
         if (rC_TradeCommodityAssignList.Count > 0)
         {
             Entity.RC_TradeCommodityAssign rC_TradeCommodityAssign = rC_TradeCommodityAssignList[0];
             if (rC_TradeCommodityAssign != null)
             {
                 return(GetMatchMachine(rC_TradeCommodityAssign.MatchMachineID));
             }
         }
         return(null);
     }
     catch (Exception ex)
     {
         string      errCode = "GL-8234";
         string      errMsg  = "获取代码所属的撮合机实体失败";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         return(null);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 获取一个撮合机分配的代码列表
 /// </summary>
 /// <param name="MatchMachineID"></param>
 /// <returns></returns>
 public List <Entity.RC_TradeCommodityAssign> GetCommodityAssignByMachineID(int MatchMachineID)
 {
     try
     {
         LogHelper.WriteDebug("Debug-8232获取一个撮合机分配的代码列表方法名称:GetCommodityAssignByMachineID(int MatchMachineID)" + DateTime.Now);
         RC_TradeCommodityAssignBLL RC_TradeCommodityAssign = new RC_TradeCommodityAssignBLL();
         return(RC_TradeCommodityAssign.GetListArray(string.Format("MatchMachineID={0}", MatchMachineID)));
     }
     catch (Exception ex)
     {
         string      errCode = "GL-8232";
         string      errMsg  = "获取一个撮合机分配的代码列表失败";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         return(null);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 获取撮合机—代码分配列表
 /// </summary>
 /// <returns></returns>
 public List <Entity.RC_TradeCommodityAssign> GetAllTradeCommodityAssign()
 {
     try
     {
         LogHelper.WriteDebug("Debug-8231获取撮合机—代码分配列表方法名称:GetAllTradeCommodityAssign()" + DateTime.Now);
         RC_TradeCommodityAssignBLL RC_TradeCommodityAssign = new RC_TradeCommodityAssignBLL();
         return(RC_TradeCommodityAssign.GetListArray(string.Empty));
     }
     catch (Exception ex)
     {
         string      errCode = "GL-8231";
         string      errMsg  = "获取撮合机—代码分配列表失败";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         return(null);
     }
 }