Ejemplo n.º 1
0
 private void GetValue()
 {
     this.search     = base.Request.QueryString["search"].ToString();
     this.startTime  = base.Request.QueryString["startTime"].ToString();
     this.endTime    = base.Request.QueryString["endTime"].ToString();
     this.reportType = base.Request.QueryString["reportType"].ToString();
     this.tzCase     = base.Request.QueryString["tzCase"].ToString();
     this.tzType     = base.Request.QueryString["tzType"].ToString();
     this.ballType   = base.Request.QueryString["ballType"].ToString();
     this.gdid       = base.Request.QueryString["gdid"].ToString();
     this.pathStr    = "search=" + this.search;
     this.pathStr    = this.pathStr + "&startTime=" + this.startTime;
     this.pathStr    = this.pathStr + "&endTime=" + this.endTime;
     this.pathStr    = this.pathStr + "&reportType=" + this.reportType;
     this.pathStr    = this.pathStr + "&tzCase=" + this.tzCase;
     this.pathStr    = this.pathStr + "&tzType=" + this.tzType;
     this.pathStr    = this.pathStr + "&ballType=" + this.ballType;
     this.creditSql  = "select sum(mgd*csgd) as csmgd,zdlid,(select username from agence where userid =ball_order.zdlid) as zdlname,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mdls) as mdls,sum(mdls*csdls) as csmdls,sum(mzdl) as mzdl,sum(mzdl*cszdl) as csmzdl,sum(mgd) as mgd,isnull(sum(csdls)/count(*),0) as csdls,isnull(sum(cszdl)/count(*),0) as cszdl FROM ball_order WHERE userid in (select userid from member where usertype='信用' and gdid = '" + this.gdid + "') and gdid = '" + this.gdid + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by zdlid";
     this.cashSql    = "select sum(mgd*csgd) as csmgd,zdlid,(select username from agence where userid =ball_order.zdlid) as zdlname,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mdls) as mdls,sum(mdls*csdls) as csmdls,sum(mzdl) as mzdl,sum(mzdl*cszdl) as csmzdl,sum(mgd) as mgd,isnull(sum(csdls)/count(*),0) as csdls,isnull(sum(cszdl)/count(*),0) as cszdl FROM ball_order WHERE userid in (select userid from member where usertype='现金' and gdid = '" + this.gdid + "') and gdid = '" + this.gdid + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by zdlid";
 }
Ejemplo n.º 2
0
 private void GetValue()
 {
     this.search       = base.Request.QueryString["search"].ToString();
     this.startTime    = base.Request.QueryString["startTime"].ToString();
     this.endTime      = base.Request.QueryString["endTime"].ToString();
     this.tzType       = base.Request.QueryString["tzType"].ToString();
     this.username     = base.Request.QueryString["username"].ToString();
     this.pathStr      = "?search=" + this.search;
     this.pathStr      = this.pathStr + "&startTime=" + this.startTime;
     this.pathStr      = this.pathStr + "&endTime=" + this.endTime;
     this.pathStr      = this.pathStr + "&username="******"&tzType=" + this.tzType;
     this.creditSql    = "SELECT od.csgd,od.tzmoney*od.csgd as csres,convert(numeric(5,2),od.hsuser_w) as hsuser_w,convert(numeric(5,2),od.hsuser_l) as hsuser_l,dbo.GettzType_Func(od.tzType) as tzTypeName,od.tzType as tzType,od.updatetime as updatetime,od.username as username,od.content as content,od.tzmoney as tzmoney,isnull((od.win-od.lose),0) as result,convert(numeric(7,3),od.curpl) as curpl,od.abc as abc,od.iscancel as iscancel,od.isdanger as isdanger FROM ball_order as od inner join member as mb on od.userid = mb.userid where datediff(s,'" + this.startTime + "',od.balltime) > 0 and datediff(d,od.balltime,'" + this.endTime + "') >= 0 and od.username = '******' and od.tzType in (" + MyFunc.GettzType(this.tzType) + ")";
     this.cashSql      = "SELECT od.csgd,od.tzmoney*od.csgd as csres,convert(numeric(5,2),od.hsuser_w) as hsuser_w,convert(numeric(5,2),od.hsuser_l) as hsuser_l,dbo.GettzType_Func(od.tzType) as tzTypeName,od.tzType as tzType,od.updatetime as updatetime,od.username as username,od.content as content,od.tzmoney as tzmoney,isnull((od.win-od.lose),0) as result,convert(numeric(7,3),od.curpl) as curpl,od.abc as abc,od.iscancel as iscancel,od.isdanger as isdanger FROM ball_order as od inner join member as mb on od.userid = mb.userid where datediff(s,'" + this.startTime + "',od.balltime) > 0 and datediff(d,od.balltime,'" + this.endTime + "') >= 0 and od.username = '******' and od.tzType in (" + MyFunc.GettzType(this.tzType) + ")";
     this.sumCreditSql = "SELECT count(*) FROM ball_order WHERE datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and username = '******' and tzType in (" + MyFunc.GettzType(this.tzType) + ")";
     this.sumCashSql   = "SELECT count(*) FROM ball_order WHERE datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and username = '******' and tzType in (" + MyFunc.GettzType(this.tzType) + ")";
 }
Ejemplo n.º 3
0
 private void GetValue()
 {
     this.startTime = base.Request.QueryString["startTime"].ToString();
     this.endTime = base.Request.QueryString["endTime"].ToString();
     this.reportType = base.Request.QueryString["reportType"].ToString();
     this.tzCase = base.Request.QueryString["tzCase"].ToString();
     this.tzType = base.Request.QueryString["tzType"].ToString();
     this.pathStr = "";
     this.pathStr = this.pathStr + "&startTime=" + this.startTime;
     this.pathStr = this.pathStr + "&endTime=" + this.endTime;
     this.pathStr = this.pathStr + "&reportType=" + this.reportType;
     this.pathStr = this.pathStr + "&tzCase=" + this.tzCase;
     this.pathStr = this.pathStr + "&tzType=" + this.tzType;
     this.pathStr = this.pathStr + "&ballType=" + this.ballType;
     this.pathPartStr = "";
     this.pathPartStr = this.pathPartStr + "&startTime=" + this.startTime;
     this.pathPartStr = this.pathPartStr + "&endTime=" + this.endTime;
     this.pathPartStr = this.pathPartStr + "&reportType=" + this.reportType;
     this.pathStr = this.pathStr + "&tzCase=" + this.tzCase;
     this.pathPartStr = this.pathPartStr + "&ballType=" + this.ballType;
     this.creditSql = "select max(csgd) as csgd,max(1-csgd-cszdl-csdls) csgs,gdid,(select username from agence where userid =ball_order.gdid) as gdname,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mgd*(1-csgd-cszdl-csdls)) as mgs,sum(mgd) as mgd,isnull(sum(mgd*csgd),0) as csmgd,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order WHERE gdid in (" + this.Session.Contents["adminarrgd"].ToString().Trim() + "-1) and userid in (select userid from member where usertype='信用') and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by gdid";
     this.cashSql = "select max(csgd) as csgd,max(1-csgd-cszdl-csdls) csgs,gdid,(select username from agence where userid =ball_order.gdid) as gdname,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mgd*(1-csgd-cszdl-csdls)) as mgs,sum(mgd) as mgd,isnull(sum(mgd*csgd),0) as csmgd,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order WHERE gdid in (" + this.Session.Contents["adminarrgd"].ToString().Trim() + "-1) and userid in (select userid from member where usertype='现金') and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by gdid";
     this.allSql = "SELECT count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mgd*(1-csgd-cszdl-csdls)) as mgs,sum(mgd) as mgd,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order WHERE gdid in (" + this.Session.Contents["adminarrgd"].ToString().Trim() + "-1) and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ")";
     this.creditPartSql = "SELECT max(csgd) as csgd,max(1-csgd-cszdl-csdls) csgs,dbo.GettzType_Func(tzType) as tzTypeName,tzType,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mgd*(1-csgd-cszdl-csdls)) as mgs,sum(mzdl) as mzdl,sum(mdls) as mdls,sum(mgd) as mgd,isnull(sum(mgd*csgd),0) as csmgd FROM ball_order WHERE gdid in (" + this.Session.Contents["adminarrgd"].ToString().Trim() + "-1) and userid in (select userid from member where usertype='信用') and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by tzType";
     this.cashPartSql = "SELECT max(csgd) as csgd,max(1-csgd-cszdl-csdls) csgs,dbo.GettzType_Func(tzType) as tzTypeName,tzType,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mgd*(1-csgd-cszdl-csdls)) as mgs,sum(mzdl) as mzdl,sum(mdls) as mdls,sum(mgd) as mgd,isnull(sum(mgd*csgd),0) as csmgd FROM ball_order WHERE gdid in (" + this.Session.Contents["adminarrgd"].ToString().Trim() + "-1) and userid in (select userid from member where usertype='现金') and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by tzType";
     this.allPartSql = "SELECT count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mgd*(1-csgd-cszdl-csdls)) as mgs,sum(mgd) as mgd,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order WHERE gdid in (" + this.Session.Contents["adminarrgd"].ToString().Trim() + "-1) and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ")";
 }
Ejemplo n.º 4
0
 private void GetValue()
 {
     this.startTime     = base.Request.QueryString["startTime"].ToString();
     this.endTime       = base.Request.QueryString["endTime"].ToString();
     this.reportType    = base.Request.QueryString["reportType"].ToString();
     this.tzCase        = base.Request.QueryString["tzCase"].ToString();
     this.tzType        = base.Request.QueryString["tzType"].ToString();
     this.pathStr       = "";
     this.pathStr       = this.pathStr + "&startTime=" + this.startTime;
     this.pathStr       = this.pathStr + "&endTime=" + this.endTime;
     this.pathStr       = this.pathStr + "&reportType=" + this.reportType;
     this.pathStr       = this.pathStr + "&tzCase=" + this.tzCase;
     this.pathStr       = this.pathStr + "&tzType=" + this.tzType;
     this.pathStr       = this.pathStr + "&ballType=" + this.ballType;
     this.pathPartStr   = "";
     this.pathPartStr   = this.pathPartStr + "&startTime=" + this.startTime;
     this.pathPartStr   = this.pathPartStr + "&endTime=" + this.endTime;
     this.pathPartStr   = this.pathPartStr + "&reportType=" + this.reportType;
     this.pathStr       = this.pathStr + "&tzCase=" + this.tzCase;
     this.pathPartStr   = this.pathPartStr + "&ballType=" + this.ballType;
     this.creditSql     = "select sum(mzdl*cszdl) as csmzdl,sum(mdls*csdls) as csmdls,dlsid,(select username from agence where userid =ball_order.dlsid) as dlsname,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(cszdl)/count(*) as cszdl,sum(mdls) as mdls,sum(csdls)/count(*) as csdls FROM ball_order WHERE userid in (select userid from member where usertype='信用' and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "') and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by dlsid";
     this.cashSql       = "select sum(mzdl*cszdl) as csmzdl,sum(mdls*csdls) as csmdls,dlsid,(select username from agence where userid =ball_order.dlsid) as dlsname,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(cszdl)/count(*) as cszdl,sum(mdls) as mdls,sum(csdls)/count(*) as csdls FROM ball_order WHERE userid in (select userid from member where usertype='现金' and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "') and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by dlsid";
     this.allSql        = "SELECT count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order WHERE zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ")";
     this.creditPartSql = "SELECT sum(mzdl*cszdl) as csmzdl,sum(mdls*csdls) as csmdls,dbo.GettzType_Func(tzType) as tzTypeName,tzType,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(cszdl)/count(*) as cszdl,sum(mdls) as mdls,sum(csdls)/count(*) as csdls FROM ball_order WHERE userid in (select userid from member where usertype='信用' and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "') and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by tzType";
     this.cashPartSql   = "SELECT sum(mzdl*cszdl) as csmzdl,sum(mdls*csdls) as csmdls,dbo.GettzType_Func(tzType) as tzTypeName,tzType,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(cszdl)/count(*) as cszdl,sum(mdls) as mdls,sum(csdls)/count(*) as csdls FROM ball_order WHERE userid in (select userid from member where usertype='现金' and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "') and zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by tzType";
     this.allPartSql    = "SELECT count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(mdls) as mdls,sum(mgd) as mgd FROM ball_order WHERE zdlid = '" + this.Session.Contents["adminuserid"].ToString() + "' and datediff(s,'" + this.startTime + "',balltime) > 0 and datediff(d,balltime,'" + this.endTime + "') >= 0 and tzType in (" + MyFunc.GettzType(this.tzType) + ")";
 }
Ejemplo n.º 5
0
        private void CashDeal()
        {
            string   text  = "";
            string   sql   = "";
            string   text3 = "";
            DataBase db    = new DataBase(MyFunc.GetConnStr(2));

            text  = "SELECT username,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(tzmoney*truewin) as realtzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order_view WHERE userid in (select userid from member where usertype='信用' and dlsid = '" + this.Session.Contents["adminuserid"].ToString() + "') and dlsid = '" + this.Session.Contents["adminuserid"].ToString() + "' and (updatetime between '" + this.startTime + "' and '" + this.endTime + "') and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by username";
            sql   = "SELECT username,count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(tzmoney*truewin) as realtzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order_view WHERE userid in (select userid from member where usertype='现金' and dlsid = '" + this.Session.Contents["adminuserid"].ToString() + "') and  dlsid = '" + this.Session.Contents["adminuserid"].ToString() + "' and (updatetime between '" + this.startTime + "' and '" + this.endTime + "') and tzType in (" + MyFunc.GettzType(this.tzType) + ") group by username";
            text3 = "SELECT count(*) as tzNumber,sum(tzmoney) as tzmoney,sum(tzmoney*truewin) as realtzmoney,sum(win-lose) as result,sum(mzdl) as mzdl,sum(mdls) as mdls FROM ball_order_view WHERE userid in (select userid from member where usertype='现金' and dlsid = '" + this.Session.Contents["adminuserid"].ToString() + "') and dlsid = '" + this.Session.Contents["adminuserid"].ToString() + "' and (updatetime between '" + this.startTime + "' and '" + this.endTime + "') and tzType in (" + MyFunc.GettzType(this.tzType) + ")";
            switch (this.reportType.ToLower())
            {
            case "ledger":
                this.tableHeader.Visible = false;
                this.ShowCashContent(db, sql);
                this.ShowZongShuContent(db, text3);
                goto Label_02F7;

            case "breakdown":
                this.tableHeader.Visible = false;
                this.ShowCashContent(db, sql);
                this.tableBottom.Visible = false;
                goto Label_02F7;

            case "soccer":
                this.tableHeader.Visible = false;
                this.ShowCashContent(db, sql);
                this.ShowZongShuContent(db, text3);
                break;

            case "basketball":
                this.tableHeader.Visible = false;
                this.tableMiddle.Visible = false;
                this.tableBottom.Visible = false;
                break;
            }
Label_02F7:
            db.CloseConnect();
            db.Dispose();
        }