Ejemplo n.º 1
0
 /// <summary>
 /// 根据最后交易日标识返回最后交易日
 /// </summary>
 /// <param name="lastTradingDayID">最后交易日标识</param>
 /// <returns></returns>
 public Entity.QH_LastTradingDay GetLastTradingDayByLastTradingDayID(int lastTradingDayID)
 {
     try
     {
         LogHelper.WriteDebug("Debug-8512根据最后交易日标识返回最后交易日方法名称:GetLastTradingDayByLastTradingDayID(int lastTradingDayID)参数是:" + lastTradingDayID + "时间是:" + DateTime.Now);
         QH_LastTradingDayBLL            qH_LastTradingDayBLL  = new QH_LastTradingDayBLL();
         List <Entity.QH_LastTradingDay> qH_LastTradingDayList =
             qH_LastTradingDayBLL.GetListArray(string.Format("LastTradingDayID={0}", lastTradingDayID));
         if (qH_LastTradingDayList.Count > 0)
         {
             Entity.QH_LastTradingDay qH_LastTradingDay = qH_LastTradingDayList[0];
             if (qH_LastTradingDay != null)
             {
                 return(qH_LastTradingDay);
             }
         }
         return(null);
     }
     catch (Exception ex)
     {
         string      errCode = "GL-8512";
         string      errMsg  = "根据最后交易日标识返回最后交易日失败";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         return(null);
     }
 }
 /// <summary>
 /// 更新最后交易日
 /// </summary>
 /// <param name="model">最后交易日实体</param>
 /// <returns></returns>
 public bool UpdateQHLastTradingDay(ManagementCenter.Model.QH_LastTradingDay model)
 {
     try
     {
         QH_LastTradingDayDAL qHLastTradingDayDAL = new QH_LastTradingDayDAL();
         return(qHLastTradingDayDAL.Update(model));
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-6051";
         string      errMsg    = "更新最后交易日失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return(false);
     }
 }
 /// <summary>
 /// 添加最后交易日
 /// </summary>
 /// <param name="model">最后交易日实体</param>
 /// <returns></returns>
 public int AddQHLastTradingDay(ManagementCenter.Model.QH_LastTradingDay model)
 {
     try
     {
         QH_LastTradingDayDAL qHLastTradingDayDAL = new QH_LastTradingDayDAL();
         return(qHLastTradingDayDAL.Add(model));
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-6050";
         string      errMsg    = "添加最后交易日失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return(AppGlobalVariable.INIT_INT);
     }
 }
        /// <summary>
        /// 更新最后交易日
        /// </summary>
        /// <param name="model">最后交易日实体</param>
        /// <returns></returns>
        public static bool UpdateQHLastTradingDay(ManagementCenter.Model.QH_LastTradingDay model)
        {
            QH_LastTradingDayBLL qH_LastTradingDayBLL = new QH_LastTradingDayBLL();

            return(qH_LastTradingDayBLL.UpdateQHLastTradingDay(model));
        }
        //================================ (期货_品种_交易规则--最后交易日) 方法 ================================

        #region 添加最后交易日

        /// <summary>
        /// 添加最后交易日
        /// </summary>
        /// <param name="model">最后交易日实体</param>
        /// <returns></returns>
        public static int AddQHLastTradingDay(ManagementCenter.Model.QH_LastTradingDay model)
        {
            QH_LastTradingDayBLL qH_LastTradingDayBLL = new QH_LastTradingDayBLL();

            return(qH_LastTradingDayBLL.AddQHLastTradingDay(model));
        }