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>
 public void Add(ManagementCenter.Model.RC_TradeCommodityAssign model)
 {
     dal.Add(model);
 }