예제 #1
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));
        }
예제 #2
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));
        }
예제 #3
0
        /// <summary>
        /// 根据通道号返回当日成交数据,这里包括清算后移动到历史表中还是当日的数据
        /// </summary>
        /// <param name="channleID">通道号</param>
        /// <returns></returns>
        public List <XH_TodayTradeTableInfo> GetTodayTradeListByChannleID(string channleID)
        {
            StringBuilder sb = new StringBuilder("");

            sb.Append(" select TradeNumber,EntrustNumber,PortfolioLogo,TradePrice,TradeAmount,");
            sb.Append(" EntrustPrice,StampTax,Commission,TransferAccountFee,TradeProceduresFee, ");
            sb.Append(" MonitoringFee,TradingSystemUseFee,TradeCapitalAmount,ClearingFee,StockAccount, ");
            sb.Append(" CapitalAccount,SpotCode,TradeTypeId,TradeUnitId,BuySellTypeId,CurrencyTypeId,TradeTime ");
            sb.Append("  from XH_TodayTradeTable ");
            sb.AppendFormat(" where  TradeNumber in(select TradeNumber from dbo.XH_PushBackOrderTable where channelID='{0}')", channleID);
            sb.Append(" union  all");
            sb.Append(" select TradeNumber,EntrustNumber,PortfolioLogo,TradePrice,TradeAmount,");
            sb.Append(" EntrustPrice,StampTax,Commission,TransferAccountFee,TradeProceduresFee, ");
            sb.Append(" MonitoringFee,TradingSystemUseFee,TradeCapitalAmount=0.00,ClearingFee,StockAccount, ");
            sb.Append(" CapitalAccount,SpotCode,TradeTypeId,TradeUnitId,BuySellTypeId,CurrencyTypeId,TradeTime ");
            sb.Append(" from XH_HistoryTradeTable ");
            sb.AppendFormat(" where  TradeNumber in(select TradeNumber from dbo.XH_PushBackOrderTable where channelID='{0}')", channleID);
            XH_TodayTradeTableDal dal = new XH_TodayTradeTableDal();
            CommonDALOperate <XH_TodayTradeTableInfo> com = new CommonDALOperate <XH_TodayTradeTableInfo>();

            return(com.ExecuterReaderDataBind(sb.ToString(), dal.ReaderBind));
        }