Exemple #1
0
        /// <summary>
        /// 获取列表(终端日志)
        /// <param name="strSQL">查询语句</param>
        /// <param name="param">查询参数</param>
        /// </summary>
        /// <returns>终端日志列表对象</returns>
        public List <TBTerminalLog> GetList(string strSQL, Param param)
        {
            List <TBTerminalLog> list = new List <TBTerminalLog>();

            try
            {
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                while (dr.Read())
                {
                    list.Add(ReadData(dr));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(list);
        }
Exemple #2
0
 /// <summary>
 /// 获取列表(退款明细)
 /// <param name="strSQL">查询语句</param>
 /// <param name="param">查询参数</param>
 /// </summary>
 /// <returns>退款明细列表对象</returns>
 public virtual List<TTClientRecharge2> GetList(string strSQL,Param param)
 {
     List<TTClientRecharge2> list = new List<TTClientRecharge2>();
     try
     {
         db.Open();
         ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
         while(dr.Read())
         {
             list.Add(ReadData(dr));
         }
         dr.Close();
     }
     catch (Exception e)
     {
         throw e;
     }
     finally
     {
         db.Close();
     }
     return list;
 }
Exemple #3
0
        public List <TBEnforcementType> GetCaseTypeIdHash(string caseId)
        {
            List <TBEnforcementType> hashCaseTypeId = new List <TBEnforcementType>();

            hashCaseTypeId.Clear();
            string strSQL = " select *   from TBCase_EnforcementType where  CaseId=@caseId";
            Param  param  = new Param();

            param.Clear();
            param.Add("@caseId", caseId);
            try
            {
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                while (dr.Read())
                {
                    var item = new TBEnforcementType()
                    {
                        EnforcementTypeId   = dr["EnforcementTypeId"].ToString(),
                        EnforcementTypeName = dr["EnforcementTypeName"].ToString()
                    };
                    hashCaseTypeId.Add(item);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                param.Clear();
                db.Close();
            }
            return(hashCaseTypeId);
        }
Exemple #4
0
        /// <summary>
        /// 获取列表(彩票订单)
        /// </summary>
        /// <param name="strSQL">查询语句</param>
        /// <param name="param">查询参数</param>
        /// <returns>彩票订单列表对象</returns>
        public List <LotteryOrderSale> GetLotteryOrderSaleList(string strSQL, Param param)
        {
            List <LotteryOrderSale> list = new List <LotteryOrderSale>();

            try
            {
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                while (dr.Read())
                {
                    list.Add(LotteryOrderSaleReadData(dr));
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(list);
        }
Exemple #5
0
        /// <summary>
        /// 获取列表(代理佣金结算)
        /// <param name="strSQL">查询语句</param>
        /// <param name="param">查询参数</param>
        /// </summary>
        /// <returns>代理佣金结算列表对象</returns>
        public List <TTAgentSettlement> GetAgentSettlementList(string strSQL, Param param)
        {
            List <TTAgentSettlement> list = new List <TTAgentSettlement>();

            try
            {
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                while (dr.Read())
                {
                    list.Add(ReadAgentSettlementData(dr));
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(list);
        }
Exemple #6
0
        /// <summary>
        /// 根据终端号起始结束获取相应的终端
        /// </summary>
        /// <param name="startCardId">起始终端</param>
        /// <param name="endCardId">结束终端</param>
        /// <param name="operaType">0 发放 1 回收</param>
        /// <returns></returns>
        public List <TBTerminal> GetListByStartEndTerminal(string startTerminalId, string endTerminalId, int operaType)
        {
            List <TBTerminal> list = new List <TBTerminal>();

            try
            {
                string strSQL = "";
                if (operaType == 0)
                {
                    strSQL = "select * from TBTerminal where terminalId>=@startTerminalId and terminalId<=@endTerminalId and status='" + (int)TerminalStatus.InStore + "' order by terminalId ";
                }
                if (operaType == 1)
                {
                    strSQL = "select * from TBTerminal where terminalId>=@startTerminalId and terminalId<=@endTerminalId and status not in('" + (int)TerminalStatus.InStore + "','" + (int)TerminalStatus.Invalid + "') order by terminalId ";
                }
                Param param = new Param();
                param.Clear();
                param.Add("@startTerminalId", startTerminalId);
                param.Add("@endTerminalId", endTerminalId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                while (dr.Read())
                {
                    list.Add(ReadData(dr));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(list);
        }
Exemple #7
0
        /// <summary>
        /// 根据加密狗号起始结束获取相应数据
        /// </summary>
        /// <param name="startCardId">起始号</param>
        /// <param name="endCardId">结束号</param>
        /// <returns></returns>
        public List <TBUKey> GetListByStartEndUKey(string startUKeyId, string endUKeyId, int operaType)
        {
            List <TBUKey> list = new List <TBUKey>();

            try
            {
                string strSQL = "";
                if (operaType == 0)
                {
                    strSQL = "select * from TBUKey where UkeyId>=@startUKeyId and UkeyId<=@endUKeyId and status='" + (int)UKeyStatus.InStore + "' order by ukeyId ";
                }
                if (operaType == 1)
                {
                    strSQL = "select * from TBUKey where UkeyId>=@startUKeyId and UkeyId<=@endUKeyId and status in('" + (int)UKeyStatus.Draw + "','" + (int)UKeyStatus.Activation + "') order by ukeyId ";
                }
                Param param = new Param();
                param.Clear();
                param.Add("@startUKeyId", startUKeyId);
                param.Add("@endUKeyId", endUKeyId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                while (dr.Read())
                {
                    list.Add(ReadData(dr));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(list);
        }
Exemple #8
0
        /// <summary>
        /// 根据卡号起始结束获取相应的卡片
        /// </summary>
        /// <param name="startCardId">起始卡号</param>
        /// <param name="endCardId">结束卡号</param>
        /// <param name="operaType">0 发放 1 回收</param>
        /// <returns></returns>
        public List <TBCard> GetListByStartEndCard(string startCardId, string endCardId, int operaType)
        {
            List <TBCard> list = new List <TBCard>();

            try
            {
                string strSQL = "";
                if (operaType == 0)
                {
                    strSQL = "select * from TBCard where cardId>=@startCardId and cardId<=@endCardId and status='" + (int)CardStatus.StayUsed + "' order by cardId ";
                }
                if (operaType == 1)
                {
                    strSQL = "select * from TBCard where cardId>=@startCardId and cardId<=@endCardId and status='" + (int)CardStatus.StayBinding + "' order by cardId ";
                }
                Param param = new Param();
                param.Clear();
                param.Add("@startCardId", startCardId);
                param.Add("@endCardId", endCardId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                while (dr.Read())
                {
                    list.Add(ReadData(dr));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(list);
        }