Пример #1
0
        /// <summary>
        /// Title:根据要更新的委托单列表更新回推的通道
        /// Desc.:本方法逻辑,首先这里要更新现货今日委托表中的通道
        ///       更新之后再根据委托单列表在今日成交和历史成交表获取对应的交易单编号更新回推故障中的通道.
        /// </summary>
        /// <param name="numberList">要更新的委托单列表</param>
        /// <param name="newClientId">列新的通道号</param>
        public void UpdateEntrustPushBackChannelID(List <string> numberList, string newClientId)
        {
            StringBuilder sb = new StringBuilder("");

            foreach (var item in numberList)
            {
                if (item != null && !string.IsNullOrEmpty(item.Trim()))
                {
                    sb.AppendFormat(",  '{0}'", item);
                }
            }
            string updateStr = sb.ToString();

            if (!string.IsNullOrEmpty(updateStr))
            {
                updateStr = updateStr.Substring(updateStr.IndexOf(',') + 1);
            }
            if (string.IsNullOrEmpty(updateStr.Trim()))
            {
                return;
            }
            //根据委托单列表获取今日成交的成交编号并在历史表中获取,
            //因为会在清算时会把当日的移到了历史表中
            string tradeNumberList = GetTodayAndHistroyTradeNumberString(updateStr);

            XH_TodayEntrustTableDal dal = new XH_TodayEntrustTableDal();

            DataManager.ExecuteInTransaction((db, trans) =>
            {
                //更新完今日委托表中的通道号
                dal.UpdateChannel(updateStr, newClientId, db, trans);
                //更新回推数据表中的通道
                Update(tradeNumberList, newClientId, db, trans);
            });
        }
Пример #2
0
        /// <summary>
        /// 根据委托单号,从今日委托和历史委托中查询相关的委托单数据
        /// 这里如果在历史委托表中的数据因为没有可撤标识,这里为了能转换回今日委托,所以直接转为不可撤0
        /// 通道号附为空字符串""
        /// </summary>
        /// <param name="entrustStr">委托单号</param>
        /// <returns></returns>
        public List <XH_TodayEntrustTableInfo> GetEntrustListByEnturstNo(string entrustStr)
        {
            XH_TodayEntrustTableDal dal = new XH_TodayEntrustTableDal();
            CommonDALOperate <XH_TodayEntrustTableInfo> com = new CommonDALOperate <XH_TodayEntrustTableInfo>();

            return(com.ExecuterReaderDataBind(string.Format(GetEntrustListByEnturstNoSqlScript(), entrustStr.ToString()), dal.ReaderBind));
        }
Пример #3
0
        /// <summary>
        /// 根据通道号返回要回道的所有委托数据,这里包含历史委托的数据
        /// </summary>
        /// <param name="channleID">通道号</param>
        /// <returns></returns>
        public List <XH_TodayEntrustTableInfo> GetEntrustListByChannleID(string channleID)
        {
            string sql = string.Format(GetDistincEntrustNumberSqlScript(), channleID);
            XH_TodayEntrustTableDal dal = new XH_TodayEntrustTableDal();
            CommonDALOperate <XH_TodayEntrustTableInfo> com = new CommonDALOperate <XH_TodayEntrustTableInfo>();

            return(com.ExecuterReaderDataBind(string.Format(GetEntrustListByEnturstNoSqlScript(), sql), dal.ReaderBind));
        }