Esempio n. 1
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string terminalId, string status, string supplierCode, string supplierBatch, string agentId, string siteId)
        {
            string strSQL = "select s.sitename,a.agentname,c.* from TBTerminal c left join tbsite s on c.siteid=s.siteid left join tbagent a on  c.agentid=a.agentid where 1=1";

            if (!string.IsNullOrEmpty(terminalId))
            {
                strSQL += " and c.terminalId='" + terminalId + "'";
            }
            if (!string.IsNullOrEmpty(status))
            {
                strSQL += " and c.status='" + status + "'";
            }
            if (!string.IsNullOrEmpty(supplierCode))
            {
                strSQL += " and c.supplierCode='" + supplierCode + "'";
            }
            if (!string.IsNullOrEmpty(supplierBatch))
            {
                strSQL += " and c.supplierBatch='" + supplierBatch + "'";
            }
            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and c.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(siteId))
            {
                strSQL += " and c.siteId='" + siteId + "'";
            }
            strSQL += " order by c.terminalId desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 2
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string agentId, string agentName, string payStatus, string startDate, string endDate)
        {
            string strSQL = @"select flowid,  agentid, agentname, startdate, enddate, salefee, rebate,  commissionfee,  paystatus, 
                               modeid,  settlementtime,  settlementid, settlementname, cashierid, cashiername,
                               case when payStatus='0' then '' else to_char(paytime,'yyyy-mm-dd hh24:mi:ss') end paytime
                               from TTAGENTSETTLEMENT t   where 1=1";

            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(agentName))
            {
                strSQL += " and agentName like '%" + agentName + "%'";
            }
            if (!string.IsNullOrEmpty(payStatus))
            {
                strSQL += " and payStatus='" + payStatus + "'";
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and settlementTime>=to_date('" + startDate + " 00:00:00','yyyy-MM-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and settlementTime<=to_date('" + endDate + " 23:59:59','yyyy-MM-dd hh24:mi:ss')";
            }
            strSQL += " order by settlementTime desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 3
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string agentId, string siteId, string clientQuery, string clientQueryText, string status, string startDate, string endDate)
        {
            string strSQL = "select c.*,a.agentName,s.siteName from TBClient c,TBAgent a,TBSite s where c.agentId=a.agentId and c.siteId=s.siteId";

            if (!string.IsNullOrEmpty(clientQueryText) && !string.IsNullOrEmpty(clientQuery))
            {
                if (clientQuery == ((int)ClientQuery.CardId).ToString())
                {
                    strSQL += " and c.cardId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientId).ToString())
                {
                    strSQL += " and c.clientId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientName).ToString())
                {
                    strSQL += " and c.clientName='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClinetPhone).ToString())
                {
                    strSQL += " and c.telephone='" + clientQueryText + "'";
                }
            }
            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and c.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(siteId))
            {
                strSQL += " and c.siteId='" + siteId + "'";
            }
            if (!string.IsNullOrEmpty(status))
            {
                strSQL += " and c.status='" + status + "'";
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and c.createTime>= To_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and c.createTime<= To_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')";
            }
            strSQL += " order by c.agentId,c.siteId,c.clientId desc,c.createTime desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 4
0
        /// <summary>
        /// 加载DataGrid
        /// </summary>
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        public void LoadGrid(int page, int rows, string period, string gameId, string startDate, string endDate)
        {
            string strSQL = @"select * from (select t.flowid,t.gameid,g.gamename,t.period,t.starttime,t.endtime,t.publishtime,t.numbers 
                               from TBPNUMNOTICE t
                               left join TBGame g  on t.gameid=g.gameid ) tt where 1=1 ";

            if (!string.IsNullOrEmpty(period))
            {
                strSQL += " and tt.period='" + period + "'";
            }
            if (!string.IsNullOrEmpty(gameId))
            {
                strSQL += " and tt.gameId='" + gameId + "'";
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and tt.publishTime>= '" + startDate + " 00:00:00'";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and tt.publishTime<= '" + endDate + " 23:59:59'";
            }
            strSQL += " order by tt.period desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 5
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string uKeyId, string status, string siteName, string agentName, string agentId)
        {
            string strSQL = "select s.sitename,a.agentname,c.* from TBUKey c left join tbsite s on c.siteid=s.siteid left join tbagent a on  c.agentid=a.agentid where 1=1";

            if (!string.IsNullOrEmpty(uKeyId))
            {
                strSQL += " and c.uKeyId='" + uKeyId + "'";
            }
            if (!string.IsNullOrEmpty(status))
            {
                strSQL += " and c.status='" + status + "'";
            }
            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and c.agentId ='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(siteName))
            {
                strSQL += " and s.siteName like '%" + siteName + "%'";
            }
            if (!string.IsNullOrEmpty(agentName))
            {
                strSQL += " and a.agentName like '%" + agentName + "%'";
            }
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 6
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string agentId, string agentName, string startDate, string endDate)
        {
            string strSQL = "select a.*,p.modename from TTAgentTakeCash a,TBPayMode p where a.handlemode=p.modeid ";

            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and a.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(agentName))
            {
                strSQL += " and a.agentName like '%" + agentName + "%'";
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and a.createTime >= To_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and a.createTime <= To_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')";
            }
            strSQL += " order by agentId,createTime desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 7
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows)
        {
            string strSQL = "select  TOP (100) PERCENT * from TSRole order by roleId asc";
            string str    = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 8
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// <param name="agentName">代理商名称</param>
        /// <param name="agentId">代理商编号</param>
        /// <param name="bankCardId">银行卡号</param>
        /// <param name="auditStatus">审核状态</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string agentName, string agentId, string bankCardId, string auditStatus)
        {
            string strSQL = "select a.*,b.areaName from TBAgent a,TBArea b where a.areaId=b.areaId ";

            if (!string.IsNullOrEmpty(agentName))
            {
                strSQL += " and a.agentName like '%" + agentName + "%'";
            }
            if (!string.IsNullOrEmpty(auditStatus))
            {
                strSQL += " and a.auditStatus in(" + auditStatus + ")";
            }
            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and a.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(bankCardId))
            {
                strSQL += " and a.bankCardId='" + bankCardId + "'";
            }
            strSQL += " order by a.agentId ";
            Param param = new Param();

            param.Clear();
            string str = commonDao.DataGrid(strSQL, param, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 9
0
        /// <summary>
        /// 加载DataGrid
        /// </summary>
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        public void LoadGrid(int page, int rows, string agentId, string auditStatus, string startDate, string endDate)
        {
            string strSQL = "select * from TTAgentPreRechg where 1=1 ";

            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(auditStatus))
            {
                strSQL += " and auditStatus='" + auditStatus + "'";
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and createtime>=to_date('" + startDate + " 00:00:00','yyyy-MM-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and createtime<=to_date('" + endDate + " 23:59:59','yyyy-MM-dd hh24:mi:ss')";
            }
            strSQL += " order by auditStatus asc, createtime desc";

            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 10
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows)
        {
            string strSQL = "select * from TBGame";
            string str    = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 11
0
        /// <summary>
        /// 加载GRID
        /// </summary>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <param name="agentId"></param>
        /// <param name="siteId"></param>
        /// <param name="clientQuery"></param>
        /// <param name="clientQueryText"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        public void LoadGrid(int page, int rows, string agentId, string siteId, string clientQuery, string clientQueryText, string startDate, string endDate)
        {
            //客户编号,客户名称,代理商编号,代理商名称,卡号,银行卡号,提现用户名 , 提现金额, 提现时间,发生时间,备注
            string strSql = @"select t.flowId, t.ClientId,c.clientname,AgentName,t.CardId,t.CardNo as cardno,t.UserName as username,t.telphoneno as telphoneno,t.Fee,withDrawTime,t.createtime,t.withDrawState,t.remark from TTClientAccDetail t inner join tbagent a on t.agentid=a.agentid
inner join tbclient c on t.clientid=c.clientid where t.SRCMODE in (7,8,9,10)";

            if (!string.IsNullOrEmpty(clientQueryText) && !string.IsNullOrEmpty(clientQuery))
            {
                if (clientQuery == ((int)ClientQuery.CardId).ToString())
                {
                    strSql += " and c.cardId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientId).ToString())
                {
                    strSql += " and c.clientId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientName).ToString())
                {
                    strSql += " and c.clientName='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClinetPhone).ToString())
                {
                    strSql += " and c.telephone='" + clientQueryText + "'";
                }
            }
            if (!string.IsNullOrEmpty(agentId))
            {
                strSql += " and c.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(siteId))
            {
                strSql += " and c.siteId='" + siteId + "'";
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSql += " and c.createTime>= To_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSql += " and c.createTime<=To_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')";
            }
            strSql += " order by c.agentId,c.siteId,c.clientId desc,c.createTime desc";
            string str = commonDao.DataGrid(strSql, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 12
0
        /// <summary>
        /// 加载DataGrid
        /// </summary>
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// <param name="orgId">机构编号</param>
        /// <param name="deptId">部门编号</param>
        /// <param name="userName">用户名称</param>
        public void LoadGrid(int page, int rows, string deptId, string userName)
        {
            string strSQL = " select TOP (100) PERCENT  a.*,b.deptName from TSUser a ,TSDept b";

            strSQL += " where a.deptId=b.deptId and b.status='1' ";
            if (deptId != null && !"".Equals(deptId))
            {
                strSQL += " and b.deptId = '" + deptId + "' ";
            }
            if (userName != null && !"".Equals(userName))
            {
                strSQL += " and a.userName = '******' ";
            }
            strSQL += " order by a.userId asc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 13
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(string chaseOrderId, string chaseStatus, string alreadyOrNotChase, string agentId)
        {
            string strSQL = "";

            if (chaseStatus == "0")//计划追号订单
            {
                if (alreadyOrNotChase == "1")
                {
                    strSQL = @"select * from Ttchaseplan c
                            where c.period>
                            (select case when max(l.period) is null then '0' else max(l.period) end 
                            from TTLotteryOrder l where 1=1 ";
                    if (!string.IsNullOrEmpty(agentId))
                    {
                        strSQL += " and l.agentId='" + agentId + "'";
                    }

                    strSQL += " and l.chaseorderid='" + chaseOrderId + "') and c.chaseorderid='" + chaseOrderId + "'";
                    strSQL += " order by c.period desc";
                }
                else if (alreadyOrNotChase == "0")//已追号的订单
                {
                    strSQL = @"select * from TTLotteryOrder l where  l.chaseorderid='" + chaseOrderId + "'";
                    if (!string.IsNullOrEmpty(agentId))
                    {
                        strSQL += " and l.agentId='" + agentId + "'";
                    }
                    strSQL += " order by l.period desc";
                }
            }
            else if (chaseStatus != "0")//已经完成追号的订单
            {
                strSQL = @"select * from TTLotteryOrder l where  l.chaseorderid='" + chaseOrderId + "'";
                if (!string.IsNullOrEmpty(agentId))
                {
                    strSQL += " and l.agentId='" + agentId + "'";
                }
                strSQL += " order by l.period desc";
            }
            string str = commonDao.DataGrid(strSQL, null);

            WebJson.Write(context, str);
        }
Esempio n. 14
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string roleType, string userId, string staffName)
        {
            string strSQL = "select a.*,b.sitename,c.roleId,d.rolename from tbstaff a,tbsite b,tsagentuser c,tsagentrole d where a.siteid=b.siteid and a.staffid=c.userid and c.roleid=d.roleid and c.roleId!='001'";

            if (!string.IsNullOrEmpty(staffName))
            {
                strSQL += " and a.staffName like '%" + staffName + "%'";
            }
            if (roleType == "0")//根据代理商查询员工
            {
                strSQL += " and a.agentId='" + userId + "'";
            }
            else //根据快开厅查询员工
            {
                strSQL += " and a.siteId='" + userId + "'";
            }
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 15
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string agentId, string startDate, string endDate)
        {
            string strSQL = "select a.* from TTAgentRechargeNotice a where 1=1";

            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and a.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and a.createTime >= To_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and a.createTime <= To_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')";
            }
            strSQL += " order by a.createTime desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 16
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string userName, string startDate, string endDate)
        {
            string strSQL = "select * from TSAgentLog where 1=1";

            if (startDate != null && !"".Equals(startDate))
            {
                strSQL += " and createDate >= To_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss')";
            }
            if (endDate != null && !"".Equals(endDate))
            {
                strSQL += " and createDate <= To_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')";
            }
            if (userName != null && !"".Equals(userName))
            {
                strSQL += " and userName ='******'";
            }
            strSQL += " order by logId desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 17
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string terminalId, string startDate, string endDate)
        {
            string strSQL = "select * from TBTerminalLog where 1=1 ";

            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and operateTime >= To_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and operateTime <= To_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')";
            }
            if (!string.IsNullOrEmpty(terminalId))
            {
                strSQL += " and terminalId ='" + terminalId + "'";
            }
            strSQL += " order by logId desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 18
0
        /// <summary>
        /// 加载DataGrid
        /// </summary>
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// <param name="orgName">机构名称</param>
        /// <param name="userName">用户名称</param>
        /// <param name="startDate">起始时间</param>
        /// <param name="endDate">结束时间</param>
        public void LoadGrid(int page, int rows, string userName, string startDate, string endDate)
        {
            string strSQL = "select    TOP (100) PERCENT * from TSLog where 1=1 ";

            if (startDate != null && !"".Equals(startDate))
            {
                strSQL += " and createDate >= '" + startDate + " 00:00:00'";
            }
            if (endDate != null && !"".Equals(endDate))
            {
                strSQL += " and createDate <= '" + endDate + " 23:59:59'";
            }
            if (userName != null && !"".Equals(userName))
            {
                strSQL += " and userName ='******'";
            }
            strSQL += " order by logId desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 19
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string EnforcementTypeId, string EnforcementTypeName, string PunishmentTypeId)
        {
            string strSQL = "select * from TBEnforcementType a where 1=1 and a.statu=1 ";

            if (!string.IsNullOrEmpty(EnforcementTypeId))
            {
                strSQL += " and a.EnforcementTypeId like '%" + EnforcementTypeId + "%'";
            }
            if (!string.IsNullOrEmpty(EnforcementTypeName))
            {
                strSQL += " and a.EnforcementTypeName like '%" + EnforcementTypeName + "%'";
            }
            if (!string.IsNullOrEmpty(PunishmentTypeId))
            {
                strSQL += " and a.PunishmentType = '" + PunishmentTypeId + "'";
            }

            Param param = new Param();

            param.Clear();
            string str = commonDao.DataGrid(strSQL, param, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 20
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string EnforcementNameId, string EnforcementName, string EnforcementTypeId)
        {
            string strSQL = "select a.*,b.EnforcementTypeName ,c.TemplateName  from TBEnForcementName a  ,TBEnforcementType b ,TBEnforcementTemplate c  where 1=1   and a.EnforcementTemplateId=c.TemplateId and  a.EnforcementTypeId=b.EnforcementTypeId and  a.statu=1   ";

            if (!string.IsNullOrEmpty(EnforcementNameId))
            {
                strSQL += " and a.EnforcementNameId   like '%" + EnforcementNameId + "%'";
            }
            if (!string.IsNullOrEmpty(EnforcementName))
            {
                strSQL += " and a.EnforcementName like '%" + EnforcementName + "%'";
            }
            if (!string.IsNullOrEmpty(EnforcementTypeId))
            {
                strSQL += " and a.EnforcementTypeId = '" + EnforcementTypeId + "'";
            }

            Param param = new Param();

            param.Clear();
            string str = commonDao.DataGrid(strSQL, param, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 21
0
        /// <summary>
        /// 加载DataGrid
        /// </summary>
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        public void LoadGrid(int page, int rows, string agentId, string siteId, string orderId, string period, string orderStatus, string srcType, string awardResult, string clientQuery, string clientQueryText, string startDate, string endDate)
        {
            string strSQL = @"select t.*,g.gamename
                                from ttpointorder t,tbgame g,TBClient bc
                                where t.gameid=g.gameid 
                                and t.clientId=bc.clientId ";

            if (!string.IsNullOrEmpty(orderId))
            {
                strSQL += " and t.orderId like'%" + orderId + "%'";
            }
            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and t.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(siteId))
            {
                strSQL += " and t.siteId='" + siteId + "'";
            }
            if (!string.IsNullOrEmpty(period))
            {
                strSQL += " and t.period='" + period + "'";
            }
            if (!string.IsNullOrEmpty(orderStatus))
            {
                strSQL += " and t.orderStatus='" + orderStatus + "'";
            }
            if (!string.IsNullOrEmpty(srcType))
            {
                strSQL += " and t.srcType='" + srcType + "'";
            }
            if (!string.IsNullOrEmpty(awardResult))
            {
                strSQL += " and t.awardResult='" + awardResult + "'";
            }
            if (!string.IsNullOrEmpty(clientQueryText) && !string.IsNullOrEmpty(clientQuery))
            {
                if (clientQuery == ((int)ClientQuery.CardId).ToString())
                {
                    strSQL += " and t.cardId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientId).ToString())
                {
                    strSQL += " and t.clientId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientName).ToString())
                {
                    strSQL += " and t.clientName='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClinetPhone).ToString())
                {
                    strSQL += " and bc.telephone='" + clientQueryText + "'";
                }
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and t.betTime>= '" + startDate + " 00:00:00'";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and t.betTime<='" + endDate + " 23:59:59'";
            }
            strSQL += " order by betTime desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }
Esempio n. 22
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string tbCaseId, string tbCaseReason, string openDateFrom, string openDateTo, string closeDateFrom, string closeDateTo, string caseState, string caseCarNo, string caseType, int CaseStatus)
        {
            Param  param  = new Param();
            string strSQL = "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 CaseStatus= " + CaseStatus;

            if (!string.IsNullOrEmpty(tbCaseId))
            {
                strSQL += " and a.CaseId =@tbCaseId ";
                param.Add("@tbCaseId", tbCaseId);
            }
            if (!string.IsNullOrEmpty(caseType))
            {
                PunishmentType punishmentType;
                if (Enum.TryParse(caseType, out punishmentType))
                {
                    strSQL += " and a.CaseTypeName=@CaseTypeName";
                    param.Add("@CaseTypeName", Enum.GetName(typeof(PunishmentType), punishmentType));
                }
            }

            if (!string.IsNullOrEmpty(tbCaseReason))
            {
                strSQL += " and a.CaseReason like @tbCaseReason";
                param.Add("@tbCaseReason", "%" + tbCaseReason + "%");
            }

            if (!string.IsNullOrEmpty(openDateFrom) && !string.IsNullOrEmpty(openDateTo))
            {
                strSQL += " and CaseOpenDate between @CaseOpenDateFrom and @CaseOpenTo";
                param.Add("@CaseOpenDateFrom", openDateFrom);
                param.Add("@CaseOpenTo", openDateTo);
            }
            else if (!string.IsNullOrEmpty(openDateFrom) && string.IsNullOrEmpty(openDateTo))
            {
                strSQL += " and CaseOpenDate > @CaseOpenDateFrom";
                param.Add("@CaseOpenDateFrom", openDateFrom);
            }
            else if (string.IsNullOrEmpty(openDateFrom) && !string.IsNullOrEmpty(openDateTo))
            {
                strSQL += " and CaseOpenDate < @CaseOpenTo";
                param.Add("@CaseOpenTo", openDateTo);
            }
            else
            {
            }


            if (!string.IsNullOrEmpty(closeDateFrom) && !string.IsNullOrEmpty(closeDateTo))
            {
                strSQL += " and CaseCloseDate between @CaseCloseDateFrom and @CaseCloseDateTo";
                param.Add("@CaseCloseDateFrom", closeDateFrom);
                param.Add("@CaseCloseDateTo", closeDateTo);
            }
            else if (!string.IsNullOrEmpty(closeDateFrom) && string.IsNullOrEmpty(closeDateTo))
            {
                strSQL += " and CaseCloseDate > @CaseCloseDateFrom";
                param.Add("@CaseCloseDateFrom", closeDateFrom);
            }
            else if (string.IsNullOrEmpty(closeDateFrom) && !string.IsNullOrEmpty(closeDateTo))
            {
                strSQL += " and CaseCloseDate < @CaseCloseDateTo";
                param.Add("@CaseCloseDateTo", closeDateTo);
            }
            else
            {
            }

            if (!string.IsNullOrEmpty(caseState))
            {
                strSQL += " and CaseStateName = @CaseStateName ";
                param.Add("@CaseStateName", caseState);
            }
            if (!string.IsNullOrEmpty(caseCarNo))
            {
                strSQL += " and CaseCarNo like @CaseCarNo ";
                param.Add("@CaseCarNo", '%' + caseCarNo + '%');
            }

            string str = commonDao.DataGrid(strSQL, param, page, rows);

            param.Clear();
            WebJson.Write(context, str);
        }
Esempio n. 23
0
        /// <summary>
        /// 加载DataGrid
        /// <param name="page">查询页数</param>
        /// <param name="rows">每页记录数</param>
        /// </summary>
        public void LoadGrid(int page, int rows, string agentId, string siteId, string chaseOrderId, string period, string srcType, string chaseStatus, string clientQuery, string clientQueryText, string startDate, string endDate)
        {
            string strSQL = @"select c.*,g.gamename ,l.lotterytypename 
                                from TTChaseOrder c,Tbgame g,Tblottery l
                                 where c.gameid=g.gameid
                                 and c.lotterytype=l.lotterytype ";

            if (!string.IsNullOrEmpty(chaseOrderId))
            {
                strSQL += " and c.chaseOrderId like '%" + chaseOrderId + "%'";
            }
            if (!string.IsNullOrEmpty(agentId))
            {
                strSQL += " and c.agentId='" + agentId + "'";
            }
            if (!string.IsNullOrEmpty(siteId))
            {
                strSQL += " and c.siteId='" + siteId + "'";
            }
            if (!string.IsNullOrEmpty(period))
            {
                strSQL += " and c.period='" + period + "'";
            }
            if (!string.IsNullOrEmpty(chaseStatus))
            {
                strSQL += " and c.chaseStatus='" + chaseStatus + "'";
            }
            if (!string.IsNullOrEmpty(srcType))
            {
                strSQL += " and c.srcType='" + srcType + "'";
            }
            if (!string.IsNullOrEmpty(clientQueryText) && !string.IsNullOrEmpty(clientQuery))
            {
                if (clientQuery == ((int)ClientQuery.CardId).ToString())
                {
                    strSQL += " and c.cardId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientId).ToString())
                {
                    strSQL += " and c.clientId='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClientName).ToString())
                {
                    strSQL += " and c.clientName='" + clientQueryText + "'";
                }
                if (clientQuery == ((int)ClientQuery.ClinetPhone).ToString())
                {
                    strSQL += " and bc.telephone='" + clientQueryText + "'";
                }
            }
            if (!string.IsNullOrEmpty(startDate))
            {
                strSQL += " and c.chaseTime>= '" + startDate + " 00:00:00'";
            }
            if (!string.IsNullOrEmpty(endDate))
            {
                strSQL += " and c.chaseTime<='" + endDate + " 23:59:59'";
            }
            strSQL += " order by chaseTime desc";
            string str = commonDao.DataGrid(strSQL, null, page, rows);

            WebJson.Write(context, str);
        }