Пример #1
0
        /// <summary>
        /// 根据品种标识返回现货_交易商品品种_持仓限制
        /// </summary>
        /// <param name="breedClassID">品种标识</param>
        /// <returns></returns>
        public Entity.XH_SpotPosition GetSpotPositionByBreedClassID(int breedClassID)
        {
            try
            {
                LogHelper.WriteDebug("Debug-8408根据品种标识返回现货_交易商品品种_持仓限制方法名称:GetSpotPositionByBreedClassID(int breedClassID)参数是:" + breedClassID + "时间是:" + DateTime.Now);
                XH_SpotPositionBLL            xH_SpotPositionBLL  = new XH_SpotPositionBLL();
                List <Entity.XH_SpotPosition> xH_SpotPositionList =
                    xH_SpotPositionBLL.GetListArray(string.Format("BreedClassID={0}", breedClassID));
                if (xH_SpotPositionList.Count > 0)
                {
                    Entity.XH_SpotPosition xH_SpotPosition = xH_SpotPositionList[0];
                    if (xH_SpotPosition != null)
                    {
                        return(xH_SpotPosition);
                    }
                }

                return(null);
            }
            catch (Exception ex)
            {
                string      errCode = "GL-8408";
                string      errMsg  = "根据品种标识返回现货_交易商品品种_持仓限制失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
                return(null);
            }
        }
Пример #2
0
 /// <summary>
 /// 更新现货_交易商品品种_持仓限制
 /// </summary>
 /// <param name="model">现货_交易商品品种_持仓限制实体</param>
 /// <returns></returns>
 public bool Update(ManagementCenter.Model.XH_SpotPosition model)
 {
     try
     {
         return(xH_SpotPositionDAL.Update(model));
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-5653";
         string      errMsg    = "更新现货_交易商品品种_持仓限制失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return(false);
     }
 }
Пример #3
0
        /// <summary>
        /// 更新现货_交易商品品种_持仓限制
        /// </summary>
        /// <param name="model">现货_交易商品品种_持仓限制实体</param>
        /// <returns></returns>
        public static bool UpdateXHSpotPosition(ManagementCenter.Model.XH_SpotPosition model)
        {
            XH_SpotPositionBLL xHSpotPositionBLL = new XH_SpotPositionBLL();

            return(xHSpotPositionBLL.Update(model));
        }