Ejemplo n.º 1
0
        /// <summary>
        /// 获取代理门店用户
        /// </summary>
        /// <param name="userCode">用户帐号</param>
        /// <returns>代理门店用户对象</returns>
        public virtual TSAgentUser Get(string userCode)
        {
            TSAgentUser tsAgentUser = null;

            try
            {
                string strSQL = "select * from TSAgentUser where userCode=@userCode";
                Param  param  = new Param();
                param.Clear();
                param.Add("@userCode", userCode);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tsAgentUser = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tsAgentUser);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取彩票玩法
        /// </summary>
        /// <param name="code">玩法代码</param>
        /// <returns>彩票玩法对象</returns>
        public virtual TBPlayMode Get(string code)
        {
            TBPlayMode tbPlayMode = null;

            try
            {
                string strSQL = "select * from TBPlayMode where code=@code";
                Param  param  = new Param();
                param.Clear();
                param.Add("@code", code);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbPlayMode = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbPlayMode);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取客户账户交易
        /// </summary>
        /// <param name="tradeId">交易流水</param>
        /// <returns>客户账户交易对象</returns>
        public virtual TTClientTrade Get(string tradeId)
        {
            TTClientTrade ttClientTrade = null;

            try
            {
                string strSQL = "select * from TTClientTrade where tradeId=@tradeId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@tradeId", tradeId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttClientTrade = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttClientTrade);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 文书名称信息
        /// </summary>
        /// <param name="siteId">门店编号</param>
        /// <returns>门店信息对象</returns>
        public virtual TBEnforcementName Get(string EnforcementNameId)
        {
            TBEnforcementName tbSite = null;

            try
            {
                string strSQL = string.Format(@"select n.EnforcementName,n.IsEmpty,n.F1,
t.EnforcementTypeName from TBEnforcementName n ,TBEnforcementType t 
 where  n.statu=1 and t.statu=1 and   t.EnforcementTypeId=n.EnforcementTypeId
  and n.EnforcementNameId=@EnforcementNameId");
                Param  param  = new Param();
                param.Clear();
                param.Add("@EnforcementNameId", EnforcementNameId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbSite = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbSite);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取推荐人佣金结算
        /// <param name="Column_1">Column_1</param>
        /// </summary>
        /// <returns>推荐人佣金结算对象</returns>
        public virtual TTClientRecharge4 Get(string Column_1)
        {
            TTClientRecharge4 ttClientRecharge4 = null;

            try
            {
                string strSQL = "select * from TTClientRecharge4 where Column_1=@Column_1";
                Param  param  = new Param();
                param.Clear();
                param.Add("@Column_1", Column_1);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttClientRecharge4 = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttClientRecharge4);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 获取列表(彩种类型)
        /// </summary>
        /// <param name="field">字段名</param>
        /// <param name="value">字段值</param>
        /// <returns>彩种类型列表对象</returns>
        public virtual List <TBLottery> GetList(string field, string value)
        {
            List <TBLottery> list = new List <TBLottery>();

            try
            {
                string strSQL = "select * from TBLottery where " + field + "=@field";
                Param  param  = new Param();
                param.Clear();
                param.Add("@field", value);
                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);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 获取系统用户
        /// </summary>
        /// <param name="userId">用户登录名</param>
        /// <returns>系统用户对象</returns>
        public virtual TSUser GetTSUser(string USERCODE)
        {
            TSUser tsUser = null;

            try
            {
                string strSQL = "select * from TSUser where USERCODE=@USERCODE";
                Param  param  = new Param();
                param.Clear();
                param.Add("@USERCODE", USERCODE);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tsUser = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tsUser);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 获取收银登录日志
        /// </summary>
        /// <param name="logId">日志编号</param>
        /// <returns>收银登录日志对象</returns>
        public virtual TSLoginLog Get(long logId)
        {
            TSLoginLog tsLoginLog = null;

            try
            {
                string strSQL = "select * from TSLoginLog where logId=@logId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@logId", logId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tsLoginLog = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tsLoginLog);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 获取终端
        /// </summary>
        /// <param name="terminalId">终端编号</param>
        /// <returns>终端对象</returns>
        public virtual TBTerminal Get(string terminalId)
        {
            TBTerminal tbTerminal = null;

            try
            {
                string strSQL = "select * from TBTerminal where terminalId=@terminalId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@terminalId", terminalId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbTerminal = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbTerminal);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 获取追号订单
        /// </summary>
        /// <param name="chaseOrderId">追号订单号</param>
        /// <returns>追号订单对象</returns>
        public virtual TTChaseOrder Get(string chaseOrderId)
        {
            TTChaseOrder ttChaseOrder = null;

            try
            {
                string strSQL = "select * from TTChaseOrder where chaseOrderId=@chaseOrderId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@chaseOrderId", chaseOrderId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttChaseOrder = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttChaseOrder);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 获取部门
        /// </summary>
        /// <param name="deptId">部门编号</param>
        /// <returns>部门对象</returns>
        public virtual TSDept Get(string deptId)
        {
            TSDept tsDept = null;

            try
            {
                string strSQL = "select * from TSDept where deptId=@deptId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@deptId", deptId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tsDept = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tsDept);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 获取客户提现
        /// <param name="flowId">流水号</param>
        /// </summary>
        /// <returns>客户提现对象</returns>
        public override TTClientTakeCash Get(long flowId)
        {
            TTClientTakeCash ttClientTakeCash = null;

            try
            {
                string strSQL = @"select flowid, clientid,  clientname,  a.agentname agentid,  s.sitename siteid, lastbalance, fee, 
                                   balance,  operatorid, operatorname, createtime, cardid, sourcetype, description, timeStamp, p.modename handlemode 
                                   from Ttclienttakecash c,TBAgent a,TBSite s,TBPaymode p
                                   where c.agentid=a.agentid and c.siteid=s.siteid 
                                   and c.handlemode=p.modeid and flowId=@flowId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@flowId", flowId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttClientTakeCash = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttClientTakeCash);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 获取门店信息
        /// </summary>
        /// <param name="siteId">门店编号</param>
        /// <returns>门店信息对象</returns>
        public virtual TBEnforcementType Get(string EnforcementTypeId)
        {
            TBEnforcementType tbSite = null;

            try
            {
                string strSQL = "select * from tbEnforcementType where statu=1 and  EnforcementTypeId=@EnforcementTypeId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@EnforcementTypeId", EnforcementTypeId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbSite = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbSite);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 获取快开厅员工
        /// <param name="staffId">员工编号</param>
        /// </summary>
        /// <returns>快开厅员工对象</returns>
        public TBStaffClon GetClon(string staffId)
        {
            TBStaffClon tbStaffClon = null;

            try
            {
                string strSQL = "select a.*,b.roleId,b.userCode from TBStaff a,TSAgentUser b  where a.staffId=b.userId and b.roleId!='001' and a.staffId=@staffId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@staffId", staffId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbStaffClon = ReadDataClon(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbStaffClon);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 获取指定角色的权限模块ID哈希表
        /// </summary>
        /// <param name="roleIds">角色编号(可以多项用逗号分隔)</param>
        /// <returns>模块ID哈希表</returns>
        public Hashtable GetAgentModuleIdHash(string roleIds)
        {
            Hashtable hashModuleId = new Hashtable();

            hashModuleId.Clear();
            string strSQL = " select distinct moduleId from TSAgentRight where roleId in ('" + roleIds.Replace(",", "','") + "')";

            try
            {
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, null);
                while (dr.Read())
                {
                    hashModuleId.Add(dr["moduleId"], dr["moduleId"]);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(hashModuleId);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 获取代理商提现
        /// </summary>
        /// <param name="flowId">流水号</param>
        /// <returns>代理商提现对象</returns>
        public virtual TTAgentTakeCash Get(long flowId)
        {
            TTAgentTakeCash ttAgentTakeCash = null;

            try
            {
                string strSQL = "select * from TTAgentTakeCash where flowId=@flowId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@flowId", flowId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttAgentTakeCash = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttAgentTakeCash);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 获取UKey信息
        /// </summary>
        /// <param name="uKeyId">加密狗编号</param>
        /// <returns>UKey信息对象</returns>
        public virtual TBUKey Get(string uKeyId)
        {
            TBUKey tbUKey = null;

            try
            {
                string strSQL = "select * from TBUKey where uKeyId=@uKeyId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@uKeyId", uKeyId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbUKey = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbUKey);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 获取积分投注开奖公告
        /// </summary>
        /// <param name="flowId">流水号</param>
        /// <returns>积分投注开奖公告对象</returns>
        public virtual TBPNumNotice Get(string flowId)
        {
            TBPNumNotice tbPNumNotice = null;

            try
            {
                string strSQL = "select * from TBPNumNotice where flowId=@flowId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@flowId", flowId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbPNumNotice = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbPNumNotice);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 获取最大值表
        /// </summary>
        /// <param name="tabName">表名</param>
        /// <returns>最大值表对象</returns>
        public virtual TSMax Get(string tabName)
        {
            TSMax tsMax = null;

            try
            {
                string strSQL = "select * from TSMax where tabName=@tabName";
                Param  param  = new Param();
                param.Clear();
                param.Add("@tabName", tabName);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tsMax = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tsMax);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 文书名称信息
        /// </summary>
        /// <param name="siteId">门店编号</param>
        /// <returns>门店信息对象</returns>
        public virtual TBCase Get(string caseId)
        {
            TBCase tbCase = null;

            try
            {
                string strSQL = string.Format(@"SELECT  CaseId,CaseReason,CaseFrom,CasePersonName,CasePersonSex ,CasePersonAge ,CasePersonAddress,CasePersonRepresentative,CasePersonCompanyName ,CasePersonCompanyLegalPerson,CasePersonCompanyLegalRepresentative"
                                              + " ,CasePersonCompanyLegalAgent,convert(varchar, CaseOpenDate, 111) as CaseOpenDate,convert(varchar, CaseCloseDate, 111)as CaseCloseDate ,CaseFillingDate,CaseExpirationDate,CaseExecutive,StationName ,CaseProcessPersonOne,CaseProcessPersonOneEnforcementNumberOne"
                                              + " ,CaseProcessPersonTwo,CaseProcessPersonOneEnforcementNumberTwo ,CaseProcessPersonThree ,CaseProcessPersonOneEnforcementNumberThree ,CaseCarNo ,CaseResult ,CaseTypeName  ,CaseStateName  ,CreateUserName,CreateDate from TBCase a  where  a.CaseId=@CaseId");
                Param param = new Param();
                param.Clear();
                param.Add("@CaseId", caseId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbCase = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbCase);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 获取代理系统角色
        /// </summary>
        /// <param name="roleId">角色编号</param>
        /// <returns>代理系统角色对象</returns>
        public virtual TSAgentRole Get(string roleId)
        {
            TSAgentRole tsAgentRole = null;

            try
            {
                string strSQL = "select * from TSAgentRole where roleId=@roleId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@roleId", roleId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tsAgentRole = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tsAgentRole);
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 根据卡号获取客户信息
        /// <param name="cardId">客户卡号</param>
        /// </summary>
        /// <returns>客户信息对象</returns>
        public TBClient GetByCard(long cardId)
        {
            TBClient tbClient = null;

            try
            {
                string strSQL = "select * from TBClient where status='0' and cardId=@cardId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@cardId", cardId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbClient = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbClient);
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 获取彩种类型
        /// </summary>
        /// <param name="LotteryType">彩种编号</param>
        /// <returns>彩种类型对象</returns>
        public virtual TBLottery Get(string LotteryType)
        {
            TBLottery tbLottery = null;

            try
            {
                string strSQL = "select * from TBLottery where LotteryType=@LotteryType";
                Param  param  = new Param();
                param.Clear();
                param.Add("@LotteryType", LotteryType);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbLottery = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbLottery);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 获取类型设置
        /// <param name="typeCode">类型编号</param>
        /// <param name="tableName">使用表名</param>
        /// </summary>
        /// <returns>类型设置对象</returns>
        public virtual TBType Get(string typeCode, string tableName)
        {
            TBType tbType = null;

            try
            {
                string strSQL = "select * from TBType where typeCode=@typeCode and tableName=@tableName";
                Param  param  = new Param();
                param.Clear();
                param.Add("@typeCode", typeCode);
                param.Add("@tableName", tableName);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbType = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbType);
        }
Ejemplo n.º 25
0
        public TBAgentClon Get(DataAccess data, string agentId)
        {
            TBAgentClon tbAgent = null;
            string      strSQL  = "select a.*,t.usercode from TBAgent a,TSAgentUser t where a.agentid=t.userid and t.roleid='001' and agentId=@agentId";
            Param       param   = new Param();

            param.Clear();
            param.Add("@agentId", agentId);
            ComDataReader dr = data.ExecuteReader(CommandType.Text, strSQL, param);

            if (dr.Read())
            {
                tbAgent = ReadDataClon(dr);
            }
            dr.Close();
            return(tbAgent);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 获取订单
        /// <param name="orderId">订单号</param>
        /// </summary>
        /// <returns>订单对象</returns>
        public override TTLotteryOrder Get(string orderId)
        {
            TTLotteryOrder ttLotteryOrder = null;

            try
            {
                string strSQL = @"select t.orderid,a.agentname agentid,s.sitename siteid, t.terminalid, t.clientid, t.clientname, t.cardid, g.gamename, g.gameid,
                                   l.lotterytypename lotterytype,t.period, t.userBetCodes,t.centerBetCodes, t.multiple, t.betfee, t.bettime, t.ischase, t.chaseorderid,
                                   case t.orderstatus when '0' then '未出票' when '1' then '已出票' when '2' then '已撤单' else  '出票失败' end orderstatus ,
                                   t.ordertime,
                                   case t.awardresult when '0' then '未开奖' when '1' then '未中奖' when '2' then '小奖' when '3' then '大奖' end awardresult,
                                   t.awardmoney,t.awardtime,
                                   case t.settlestatus when '0' then '未结' when '1' then '已结' end settlestatus,
                                   case t.srcType when '0' then '游戏终端' when '1' then '手机APP' end srcType,
                                   t.settletime, t.createtime
                                   from TTLotteryOrder t,TBGame g,TBLottery l,TBAgent a,TBSite s
                                   where t.gameid=g.gameid
                                   and t.lotterytype=l.lotterytype
                                   and t.agentid=a.agentid
                                   and t.siteid=s.siteid and t.orderId=@orderId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@orderId", orderId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttLotteryOrder = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttLotteryOrder);
        }
Ejemplo n.º 27
0
        public List <TBEnforcementTemplate> GetCaseEnforcementTemplateHash(string caseId)
        {
            List <TBEnforcementTemplate> hashCaseEnforcementTemplate = new List <TBEnforcementTemplate>();

            hashCaseEnforcementTemplate.Clear();
            string strSQL = @"  select * from [dbo].[TBEnforcementTemplate] where TemplateId in 
                            (select en.EnforcementTemplateId from  [dbo].[TBCase_EnforementName] en 
                             join [dbo].[TBCase_EnforcementType] et on et.EnforcementTypeId=en.EnforcementTypeId
                             where en.CaseId=@caseId and et.CaseId=@caseId  and en.Statu=2
                            ) ";
            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 TBEnforcementTemplate()
                    {
                        TemplateCode = dr["TemplateCode"].ToString(),
                        TemplateName = dr["TemplateName"].ToString()
                    };
                    hashCaseEnforcementTemplate.Add(item);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                param.Clear();
                db.Close();
            }
            return(hashCaseEnforcementTemplate);
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 获取追号订单
        /// <param name="chaseOrderId">追号订单号</param>
        /// </summary>
        /// <returns>追号订单对象</returns>
        public override TTChaseOrder Get(string chaseOrderId)
        {
            TTChaseOrder ttChaseOrder = null;

            try
            {
                string strSQL = @"select c.chaseorderid,case c.chaseType when '0' then '普通追号' when '1' then '高级追号' end chaseType,      
                                   a.agentname agentid,s.sitename siteid,  c.terminalid, c.clientid,  c.clientname, c.cardid, g.gamename,g.gameid, 
                                   l.LotteryTypeName lotterytype, c.period, c.userBetCodes,c.centerBetCodes, c.betnum,  c.chasetotalfee, c.chasetime, 
                                   case c.endcondition when '0' then '不停止' when '1' then '固定奖金停止' when '2' then '达到中奖率停止' end endcondition, 
                                   c.conditionparam,
                                   c.usedperiod, c.usednum, c.usedfee,  c.backnum,  c.backfee, c.awardmoney, c.frozenfee,  
                                   case c.chasestatus when '0' then '正在追号' when '1' then '中奖停止' when '2' then '追期结束' when '3' then '手工停止'
                                   when '4' then '追号撤单' when '5' then '异常停止' end chasestatus,
                                   c.overtime, c.createtime,
                                   case c.srcType when '0' then '游戏终端' when '1' then '手机APP' end srcType
                                   from TTChaseOrder c,Tbgame g,TBlottery l,TBAgent a,TBSite s
                                   where c.gameid=g.gameid and c.lotterytype=l.lotterytype
                                   and c.agentid=a.agentid and c.siteid=s.siteid and chaseOrderId=@chaseOrderId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@chaseOrderId", chaseOrderId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttChaseOrder = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttChaseOrder);
        }
Ejemplo n.º 29
0
        /// <summary>
        /// 获取积分订单
        /// <param name="orderId">订单号</param>
        /// </summary>
        /// <returns>积分订单对象</returns>
        public override TTPointOrder Get(string orderId)
        {
            TTPointOrder ttPointOrder = null;

            try
            {
                string strSQL = @"select t.orderid,a.agentname agentid,s.sitename siteid, t.terminalid, t.clientid, t.clientname, t.cardid, g.gamename, g.gameid,
                                   t.period,t.betCodes,  t.betpoint, t.bettime,
                                   case t.orderstatus when '0' then '已投注' when '1' then '已撤单' end orderstatus ,
                                   t.ordertime,
                                   case t.awardresult when '0' then '未开奖' when '1' then '未中奖' when '2' then '中奖' end awardresult,
                                   t.awardpoint,t.awardtime,
                                   case t.srcType when '0' then '游戏终端' when '1' then '手机APP' end srcType,
                                   t.createtime
                                   from TTPointOrder t,TBGame g,TBAgent a,TBSite s
                                   where t.gameid=g.gameid
                                   and t.agentid=a.agentid
                                   and t.siteid=s.siteid and t.orderId=@orderId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@orderId", orderId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    ttPointOrder = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(ttPointOrder);
        }
Ejemplo n.º 30
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;
 }