Esempio n. 1
0
        private void ajaxGetTranAccList()
        {
            string text     = base.q("d1");
            string text2    = base.q("d2");
            string text3    = base.q("sel");
            string text4    = base.q("u");
            string text5    = base.q("money");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);
            string text6    = "";
            string text7    = "";

            if (text.Trim().Length == 0)
            {
                text = DateTime.Now.AddDays(-1.0).ToString("yyyy-MM-dd");
            }
            if (text2.Trim().Length == 0)
            {
                text2 = this.EndTime;
            }
            if (Convert.ToDateTime(text) > Convert.ToDateTime(text2))
            {
                text = text2;
            }
            string text8 = base.q("id");

            if (!string.IsNullOrEmpty(text8))
            {
                text7 = text7 + " ssid ='" + text8 + "'";
            }
            else
            {
                if (text.Trim().Length > 0 && text2.Trim().Length > 0)
                {
                    string text9 = text7;
                    text7 = string.Concat(new string[]
                    {
                        text9,
                        " STime >='",
                        text,
                        "' and STime <'",
                        text2,
                        "'"
                    });
                }
                if (!string.IsNullOrEmpty(text4))
                {
                    string text9 = text7;
                    text7 = string.Concat(new string[]
                    {
                        text9,
                        " and dbo.f_GetUserName(",
                        text3,
                        ") like '%",
                        text4,
                        "%'"
                    });
                }
                if (!string.IsNullOrEmpty(text5))
                {
                    text7 = text7 + " and Inmoney >=" + text5;
                }
            }
            this.doh.Reset();
            this.doh.ConditionExpress = text7;
            int totalCount = this.doh.Count("N_UserChargeLog");

            text6  = text6 + " SELECT  '' as UserName,'' as ToUserName,'0' as [Id],'全部合计' as [ssid],'' as [Type],'' as [UserId],'' as [ToUserId],isnull(sum([MoneyChange]),0) as [MoneyChange],\r\n                        getdate() as [STime],'' as [Remark] FROM [N_UserChargeLog] where " + text7;
            text6 += " union all ";
            text6 += " select * from ( ";
            text6 += SqlHelp.GetSql0("dbo.f_GetUserName(UserId) as UserName,dbo.f_GetUserName(ToUserId) as ToUserName,*", "N_UserChargeLog", "Id", pageSize, num, "desc", text7);
            text6 += " ) YouleTable order by Id desc ";
            this.doh.Reset();
            this.doh.SqlCmd = text6;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, totalCount, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable),
                "}"
            });
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 2
0
        private void ajaxGetList()
        {
            string str1 = this.q("d1");
            string str2 = this.q("d2");
            string str3 = this.q("state");
            string str4 = this.q("lid");
            string str5 = this.q("pid");
            string str6 = this.q("sel");
            string str7 = this.q("u");
            string str8 = this.q("IsCheat");
            string str9 = this.q("yc");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            if (str1.Trim().Length == 0)
            {
                str1 = this.StartTime;
            }
            if (str2.Trim().Length == 0)
            {
                str2 = this.EndTime;
            }
            if (Convert.ToDateTime(str1) > Convert.ToDateTime(str2))
            {
                str1 = str2;
            }
            string str10    = "";
            string whereStr = " STime2 >='" + str1 + "' and STime2 <'" + str2 + "'";
            string str11    = this.q("id");

            if (!string.IsNullOrEmpty(str11))
            {
                whereStr = whereStr + " and ssid ='" + str11 + "'";
            }
            else
            {
                if (!string.IsNullOrEmpty(str7))
                {
                    string str12 = str7.Trim();
                    whereStr = !str6.Equals("username") ? (!str6.Equals("IssueNum") ? whereStr + " and ssid = '" + str12 + "'" : whereStr + " and IssueNum = '" + str12 + "'") : whereStr + " and UserName = '******'";
                }
                if (!string.IsNullOrEmpty(str4))
                {
                    whereStr = whereStr + " and LotteryId =" + str4;
                }
                if (!string.IsNullOrEmpty(str5))
                {
                    whereStr = whereStr + " and PlayId =" + str5;
                }
                if (!string.IsNullOrEmpty(str3))
                {
                    whereStr = whereStr + " and state =" + str3;
                }
                if (!string.IsNullOrEmpty(str8))
                {
                    whereStr = whereStr + " and IsCheat=" + str8 + " and State=0";
                }
                if (!string.IsNullOrEmpty(str9))
                {
                    whereStr += " and WarnState='异常'";
                }
            }
            string FldName = this.q("order");

            if (!string.IsNullOrEmpty(FldName))
            {
                if (FldName.Equals("bet"))
                {
                    FldName = "Times*Total";
                }
            }
            else
            {
                FldName = "Id";
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("V_UserBet");
            string str13      = str10 + SqlHelp.GetSql0("*", "V_UserBet", FldName, num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = str13;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 3
0
        private void ajaxGetZHList()
        {
            string str1 = this.q("d1");
            string str2 = this.q("d2");
            string str3 = this.q("lid");
            string str4 = this.q("pid");
            string str5 = this.q("sel");
            string str6 = this.q("u");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            if (str1.Trim().Length == 0)
            {
                str1 = this.StartTime;
            }
            if (str2.Trim().Length == 0)
            {
                str2 = this.EndTime;
            }
            if (Convert.ToDateTime(str1) > Convert.ToDateTime(str2))
            {
                str1 = str2;
            }
            string whereStr = "1=1";
            string str7     = this.q("id");

            if (!string.IsNullOrEmpty(str7))
            {
                whereStr = whereStr + " and ssid ='" + str7 + "'";
            }
            else
            {
                if (!string.IsNullOrEmpty(str6))
                {
                    whereStr = !str5.Equals("username") ? whereStr + " and ssid like '%" + str6 + "%'" : whereStr + " and dbo.f_GetUserName(UserId) like '%" + str6 + "%'";
                }
                if (!string.IsNullOrEmpty(str3))
                {
                    whereStr = whereStr + " and LotteryId =" + str3;
                }
                if (!string.IsNullOrEmpty(str4))
                {
                    whereStr = whereStr + " and PlayId ='" + str4 + "'";
                }
                if (str1.Trim().Length > 0 && str2.Trim().Length > 0)
                {
                    whereStr = whereStr + " and STime >='" + str1 + "' and STime <'" + str2 + "'";
                }
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("V_UserBetZh");
            string sql0       = SqlHelp.GetSql0("*", "V_UserBetZh", "STime", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"加载完成\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 4
0
 public void GetListJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("N_UserBank");
         string sql0       = SqlHelp.GetSql0("row_number() over (order by Id asc) as rowid,'************'+substring(Payaccount,len(Payaccount)-3,4) as tPayaccount,substring(PayName,1,1)+'**' as tPayName,*", "N_UserBank", "Id", _pagesize, _thispage, "asc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Esempio n. 5
0
        private void ajaxGetProListId()
        {
            string d2 = this.q("d2");

            this.q("keys");
            string d1   = this.q("d1");
            string str1 = this.q("id");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            string str2     = "IsDel=0";
            string whereStr = string.IsNullOrEmpty(str1) ? str2 + " and ParentId =-1" : str2 + " and ParentId =" + str1;

            if (d1.Trim().Length == 0)
            {
                d1 = this.StartTime;
            }
            if (d2.Trim().Length == 0)
            {
                d2 = this.EndTime;
            }
            if (Convert.ToDateTime(d1) > Convert.ToDateTime(d2))
            {
                d1 = d2;
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_User");
            string sql0       = SqlHelp.GetSql0("[Id]", "N_User a", "Id", num2, num1, "asc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable1 = this.doh.GetDataTable();
            string    str3       = "";

            for (int index = 0; index < dataTable1.Rows.Count; ++index)
            {
                str3 = str3 + "," + dataTable1.Rows[index]["Id"].ToString();
            }
            DataTable dataTable2 = new DataTable();

            if (str3.Length > 1)
            {
                string    userId1       = str3.Substring(1, str3.Length - 1);
                DataTable userMoneyStat = this.GetUserMoneyStat(d1, d2, userId1);
                this.doh.Reset();
                this.doh.SqlCmd = "select Id from N_User with(nolock) where " + whereStr;
                DataTable dataTable3 = this.doh.GetDataTable();
                string    str4       = "";
                for (int index = 0; index < dataTable3.Rows.Count; ++index)
                {
                    str4 = str4 + "," + dataTable3.Rows[index]["Id"].ToString();
                }
                DataTable dtsum = new DataTable();
                if (str4.Length > 1)
                {
                    string userId2 = str4.Substring(1, str4.Length - 1);
                    dtsum = this.GetUserMoneyStat(d1, d2, userId2);
                }
                this._response = "{\"result\" :\"1\",\"returnval\" :\"加载完成\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON123(dtsum, userMoneyStat, 0, "recordcount", "table", true) + "}";
                dataTable1.Clear();
                dataTable1.Dispose();
            }
            else
            {
                this._response = "{\"result\" :\"0\",\"returnval\" :\"加载完成\"}";
            }
        }
Esempio n. 6
0
        private void ajaxGetUserPointList()
        {
            int num1 = this.Int_ThisPage();
            int num2 = this.Str2Int(this.q("pagesize"), 20);

            this.doh.Reset();
            this.doh.SqlCmd = "select Point*0.1 as Upoint from N_User with(nolock) where Id=" + this.AdminId;
            string whereStr = "[Point]=" + this.doh.GetDataTable().Rows[0]["Upoint"];

            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_UserPointQuota");
            string sql0       = SqlHelp.GetSql0(string.Format("row_number() over (order by Point desc) as rowid\r\n                ,(select count(*) from N_User where ParentID={0} AND UserGroup<2 and Point=a.Point*10) as regNums,*", (object)this.AdminId), "[N_UserPointQuota] a", "Point", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, num2 * (num1 - 1)) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 7
0
        private void ajaxGetFKListOnLine()
        {
            string str1 = this.q("username");
            string str2 = this.q("money1");
            string str3 = this.q("money2");
            string str4 = this.q("online").Replace(",", "");

            this.Str2Int(this.q("gId"), 0);
            int num1 = this.Int_ThisPage();
            int num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            this.q("Id");
            string whereStr = "IsOnline=1 and dbo.f_GetUserCode(Id) like '%" + Strings.PadLeft(this.AdminId) + "%' and Id<>" + this.AdminId;

            if (str1.Trim().Length > 0)
            {
                whereStr = whereStr + " and UserName LIKE '" + str1 + "%'";
            }
            if (!string.IsNullOrEmpty(str2))
            {
                whereStr = whereStr + " and Money <=" + str2;
            }
            if (!string.IsNullOrEmpty(str3))
            {
                whereStr = whereStr + " and Money >=" + str3;
            }
            if (!string.IsNullOrEmpty(str4))
            {
                whereStr = whereStr + " and IsOnline =" + str4;
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("Flex_User");
            string str5       = "";

            this.doh.Reset();
            this.doh.SqlCmd = SqlHelp.GetSql0("Id,UserCode", "Flex_User", "ID", num2, num1, "asc", whereStr);
            DataTable dataTable1 = this.doh.GetDataTable();

            for (int index = 0; index < dataTable1.Rows.Count; ++index)
            {
                str5 += string.Format("select *,'" + this.ajaxGetUserNames(dataTable1.Rows[index]["UserCode"].ToString(), this.AdminId) + "' as usercodes from Flex_User where Id=" + dataTable1.Rows[index]["Id"].ToString());
                if (index != dataTable1.Rows.Count - 1)
                {
                    str5 += " union all ";
                }
            }
            if (!string.IsNullOrEmpty(str5))
            {
                this.doh.Reset();
                this.doh.SqlCmd = str5;
                DataTable dataTable2 = this.doh.GetDataTable();
                this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable2) + "}";
                dataTable2.Clear();
                dataTable2.Dispose();
            }
            else
            {
                this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"recordcount\":0,\"table\": []}";
            }
        }
        private void ajaxGetDetailByUserId()
        {
            string str  = this.q("id");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            DataTable dataTable1 = new DataTable();
            string    whereStr;

            if (string.IsNullOrEmpty(str))
            {
                whereStr = "UcId=0";
            }
            else
            {
                this.doh.Reset();
                this.doh.SqlCmd = "select top 1 Id from [N_UserContract] where userid=" + str + " and type=1";
                DataTable dataTable2 = this.doh.GetDataTable();
                whereStr = dataTable2.Rows.Count <= 0 ? "UcId=0" : "UcId=" + dataTable2.Rows[0]["Id"];
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_UserContractDetail");
            string sql0       = SqlHelp.GetSql0("*", "N_UserContractDetail", "id", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable3 = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable3) + "}";
            dataTable3.Clear();
            dataTable3.Dispose();
        }
        private void ajaxGetList()
        {
            string str1 = this.q("type");
            string str2 = this.q("p");
            string str3 = this.q("u");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            string whereStr = "1=1";

            if (!string.IsNullOrEmpty(str1))
            {
                whereStr = whereStr + " and type = " + str1;
            }
            if (!string.IsNullOrEmpty(str2))
            {
                whereStr = whereStr + " and dbo.f_GetUserName(ParentId) = '" + str2 + "'";
            }
            if (!string.IsNullOrEmpty(str3))
            {
                whereStr = whereStr + " and dbo.f_GetUserName(UserId) = '" + str3 + "'";
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_UserContract");
            string sql0       = SqlHelp.GetSql0("*,dbo.f_GetUserName(ParentId) as ParentName,dbo.f_GetUserName(UserId) as UserName", "N_UserContract", "id", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
        private void ajaxGetActiveRecord()
        {
            string str1 = this.q("d1");
            string str2 = this.q("d2");
            string str3 = this.q("type");
            string str4 = this.q("u");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            if (str1.Trim().Length == 0)
            {
                str1 = this.StartTime;
            }
            if (str2.Trim().Length == 0)
            {
                str2 = this.EndTime;
            }
            if (Convert.ToDateTime(str1) > Convert.ToDateTime(str2))
            {
                str1 = str2;
            }
            string str5     = "";
            string whereStr = "1=1";
            string str6     = this.q("id");

            if (!string.IsNullOrEmpty(str6))
            {
                whereStr = whereStr + " and ssid ='" + str6 + "'";
            }
            else
            {
                if (!string.IsNullOrEmpty(str4))
                {
                    whereStr = whereStr + " and dbo.f_GetUserName(UserId) LIKE '%" + str4 + "%'";
                }
                if (!string.IsNullOrEmpty(str3))
                {
                    whereStr = whereStr + " and ActiveType ='" + str3 + "'";
                }
                if (str1.Trim().Length > 0 && str2.Trim().Length > 0)
                {
                    whereStr = whereStr + " and STime >='" + str1 + "' and STime <'" + str2 + "'";
                }
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("Act_ActiveRecord");
            string str7       = str5 + " select '全部合计' as UserName,'0' as Id,'-' as SsId,'-' as UserId,'-' as ActiveType,'-' as ActiveName\r\n                        ,0 as Bet,isnull(sum(InMoney),0) as InMoney,getdate() as STime,'-' as CheckIp,'-' as CheckMachine,'0' as FromUserId,'-' as Remark \r\n                        from Act_ActiveRecord where " + whereStr + " union all " + " select * from ( " + SqlHelp.GetSql0("dbo.f_GetUserName(UserId) as UserName,*", "Act_ActiveRecord", "Id", num2, num1, "desc", whereStr) + " ) YouleTable order by Id desc ";

            this.doh.Reset();
            this.doh.SqlCmd = str7;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
        private void ajaxGetActDetail()
        {
            int num1 = this.Int_ThisPage();
            int num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            string whereStr = "";
            string str      = this.q("table");

            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int totalCount = this.doh.Count(str);

            this.doh.Reset();
            this.doh.SqlCmd = SqlHelp.GetSql0("*", str, "Id", num2, num1, "asc", whereStr);
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 12
0
        private void ajaxGetList()
        {
            string text     = base.q("keys");
            string text2    = base.q("bank");
            string text3    = base.q("state");
            string text4    = base.q("sel");
            string text5    = base.q("u");
            string text6    = base.q("money");
            string text7    = base.q("d1");
            string text8    = base.q("d2");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);
            string text9    = "";
            string text10   = "";

            if (text7.Trim().Length == 0)
            {
                text7 = DateTime.Now.AddDays(-1.0).ToString("yyyy-MM-dd");
            }
            if (text8.Trim().Length == 0)
            {
                text8 = this.EndTime;
            }
            if (Convert.ToDateTime(text7) > Convert.ToDateTime(text8))
            {
                text7 = text8;
            }
            string text11 = base.q("id");

            if (!string.IsNullOrEmpty(text11))
            {
                text10 = text10 + " ssid ='" + text11 + "'";
            }
            else
            {
                if (text7.Trim().Length > 0 && text8.Trim().Length > 0)
                {
                    string text12 = text10;
                    text10 = string.Concat(new string[]
                    {
                        text12,
                        " STime >='",
                        text7,
                        "' and STime <'",
                        text8,
                        "'"
                    });
                }
                if (!string.IsNullOrEmpty(text2))
                {
                    text10 = text10 + " and BankId=" + text2;
                }
                if (!string.IsNullOrEmpty(text3))
                {
                    text10 = text10 + " and state=" + text3;
                }
                if (!string.IsNullOrEmpty(text5))
                {
                    if (text4.Equals("username"))
                    {
                        text10 = text10 + " and dbo.f_GetUserName(UserId) like '" + text5 + "%'";
                    }
                    if (text4.Equals("ssid"))
                    {
                        text10 = text10 + " and ssid like '" + text5 + "%'";
                    }
                    if (text4.Equals("checkcode"))
                    {
                        text10 = text10 + " and checkcode like '" + text5 + "%'";
                    }
                }
                if (!string.IsNullOrEmpty(text6))
                {
                    text10 = text10 + " and Inmoney >=" + text6;
                }
            }
            this.doh.Reset();
            this.doh.ConditionExpress = text10;
            int totalCount = this.doh.Count("V_ChargeRecord");

            text9  = text9 + " SELECT '' as UserName,'0' as [Id],'全部合计' as [ssid],'' as [UserId],'0' as [money],'' as [BankId],\r\n                        '' as [BankName],'' as [CheckCode],isnull(sum([InMoney]),0) as[InMoney],isnull(sum([DzMoney]),0) as[DzMoney],getdate() as [STime],\r\n                        '-1' as [State],'' as [StateName],'' as [ActState] FROM [V_ChargeRecord] where " + text10;
            text9 += " union all ";
            text9 += " select * from ( ";
            text9 += SqlHelp.GetSql0("dbo.f_GetUserName(UserId) as UserName,*", "V_ChargeRecord", "Id", pageSize, num, "desc", text10);
            text9 += " ) YouleTable order by Id desc ";
            this.doh.Reset();
            this.doh.SqlCmd = text9;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, totalCount, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable),
                "}"
            });
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 13
0
        private void ajaxGetCashCheck()
        {
            string text     = base.q("keys");
            string text2    = base.q("d1");
            string text3    = base.q("d2");
            string text4    = base.q("u");
            string text5    = base.q("sel");
            string text6    = base.q("u2");
            string text7    = base.q("sel2");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);
            string text8    = "(State=0 or State=99)";

            this.doh.Reset();
            this.doh.ConditionExpress = "Id=@Id";
            this.doh.AddConditionParameter("@Id", this.AdminId);
            object[] fields = this.doh.GetFields("Sys_Admin", "GroupId,MinCash,MaxCash");
            if (Convert.ToInt32(fields[0]) == 2)
            {
                object obj = text8;
                text8 = string.Concat(new object[]
                {
                    obj,
                    " and (CashMoney>=",
                    fields[1],
                    " and CashMoney<",
                    fields[2],
                    ")"
                });
            }
            if (text2.Trim().Length == 0)
            {
                text2 = this.StartTime;
            }
            if (text3.Trim().Length == 0)
            {
                text3 = this.EndTime;
            }
            if (Convert.ToDateTime(text2) > Convert.ToDateTime(text3))
            {
                text2 = text3;
            }
            if (text2.Trim().Length > 0 && text3.Trim().Length > 0)
            {
                string text9 = text8;
                text8 = string.Concat(new string[]
                {
                    text9,
                    " and STime >='",
                    text2,
                    "' and STime <'",
                    text3,
                    "'"
                });
            }
            if (!string.IsNullOrEmpty(text4))
            {
                string text9 = text8;
                text8 = string.Concat(new string[]
                {
                    text9,
                    " and ",
                    text5,
                    "  like '%",
                    text4,
                    "%'"
                });
            }
            if (!string.IsNullOrEmpty(text6))
            {
                string text9 = text8;
                text8 = string.Concat(new string[]
                {
                    text9,
                    " and ",
                    text7,
                    " >=",
                    text6
                });
            }
            this.doh.Reset();
            this.doh.ConditionExpress = text8;
            int    totalCount = this.doh.Count("V_UserGetCash");
            string sql        = SqlHelp.GetSql0("*", "V_UserGetCash", "Id", pageSize, num, "desc", text8);

            this.doh.Reset();
            this.doh.SqlCmd = sql;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, totalCount, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable),
                "}"
            });
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 14
0
        private void ajaxGetCashList()
        {
            string text     = base.q("keys");
            string text2    = base.q("issoft");
            string text3    = base.q("u");
            string text4    = base.q("sel");
            string text5    = base.q("u2");
            string text6    = base.q("sel2");
            string text7    = base.q("d1");
            string text8    = base.q("d2");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);
            string text9    = "";
            string text10   = "";

            if (text7.Trim().Length == 0)
            {
                text7 = DateTime.Now.AddDays(-1.0).ToString("yyyy-MM-dd");
            }
            if (text8.Trim().Length == 0)
            {
                text8 = this.EndTime;
            }
            if (Convert.ToDateTime(text7) > Convert.ToDateTime(text8))
            {
                text7 = text8;
            }
            string text11 = base.q("id");

            if (!string.IsNullOrEmpty(text11))
            {
                text10 = text10 + " ssid ='" + text11 + "'";
            }
            else
            {
                if (text7.Trim().Length > 0 && text8.Trim().Length > 0)
                {
                    string text12 = text10;
                    text10 = string.Concat(new string[]
                    {
                        text12,
                        " STime >='",
                        text7,
                        "' and STime <'",
                        text8,
                        "'"
                    });
                }
                if (!string.IsNullOrEmpty(text2))
                {
                    text10 = text10 + " and State=" + text2;
                }
                if (!string.IsNullOrEmpty(text3))
                {
                    string text12 = text10;
                    text10 = string.Concat(new string[]
                    {
                        text12,
                        " and ",
                        text4,
                        "  like '%",
                        text3,
                        "%'"
                    });
                }
                if (!string.IsNullOrEmpty(text5))
                {
                    string text12 = text10;
                    text10 = string.Concat(new string[]
                    {
                        text12,
                        " and ",
                        text6,
                        " >=",
                        text5
                    });
                }
            }
            this.doh.Reset();
            this.doh.ConditionExpress = text10;
            int totalCount = this.doh.Count("V_UserGetCash");

            text9  = text9 + " SELECT '0' as [Id],'全部合计' as [ssid],'' as [UserId],'' as [UserName],'' as [BankId],'' as [PayMethod],\r\n                        '' as [PayBank],'' as [PayName],'' as [tPayName],'' as [PayAccount],'' as [tPayAccount],isnull(sum([CashMoney]),0) as [CashMoney],\r\n                        '0' as [Money],getdate() as [STime],'-1' as [State],'' as [StateName],getdate() as [STime2],'' as [Msg],'0' as [bet] \r\n                        FROM [V_UserGetCash] where " + text10;
            text9 += " union all ";
            text9 += " select * from ( ";
            text9 += SqlHelp.GetSql0("*", "V_UserGetCash", "Id", pageSize, num, "desc", text10);
            text9 += " ) YouleTable order by Id desc ";
            this.doh.Reset();
            this.doh.SqlCmd = text9;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, totalCount, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable),
                "}"
            });
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 15
0
 public string getPageBar(int mode, string stype, int stepNum, int totalCount, int PSize, int currentPage, string Http1, string HttpM, string HttpN, int limitPage)
 {
     return(PageBar.GetPageBar(mode, stype, stepNum, totalCount, PSize, currentPage, Http1, HttpM, HttpN, limitPage));
 }
Esempio n. 16
0
        private void ajaxGetList()
        {
            this.q("p");
            string str  = this.q("u");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            string whereStr = "type=2 and ParentId=" + this.AdminId;

            if (!string.IsNullOrEmpty(str))
            {
                whereStr = whereStr + " and UserName = '******'";
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("V_UserContract");
            string sql0       = SqlHelp.GetSql0("row_number() over (order by Id desc) as rowid,'2' as Type,*", "V_UserContract", "Id", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 17
0
        private void ajaxGetUserGroupList()
        {
            int num1 = this.Int_ThisPage();
            int num2 = this.Str2Int(this.q("pagesize"), 20);

            this.doh.Reset();
            this.doh.SqlCmd = "select UserGroup from N_User with(nolock) where Id=" + this.AdminId;
            string whereStr = "[Group]=" + this.doh.GetDataTable().Rows[0]["UserGroup"];

            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_UserGroupQuota");
            string sql0       = SqlHelp.GetSql0(string.Format("row_number() over (order by ToGroup desc) as rowid\r\n                ,case [Group] when 0 then '会员' when 1 then '代理' when 2 then '直属' when 3 then '特权直属' when 4 then '招商' when 5 then '主管' when 6 then '管理' end as GroupName\r\n                ,case [ToGroup] when 0 then '会员' when 1 then '代理' when 2 then '直属' when 3 then '特权直属' when 4 then '招商' when 5 then '主管' when 6 then '管理' end as ToGroupName\r\n                ,(select count(*) from N_User where ParentID={0} AND UserGroup=a.[ToGroup]) as regNums,*", (object)this.AdminId), "[N_UserGroupQuota] a", "ToGroup", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, num2 * (num1 - 1)) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 18
0
        private void ajaxGetContractGZRecord()
        {
            string str1 = this.q("d1");
            string str2 = this.q("d2");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            if (str1.Trim().Length == 0)
            {
                str1 = this.StartTime;
            }
            if (str2.Trim().Length == 0)
            {
                str2 = this.EndTime;
            }
            if (Convert.ToDateTime(str1) > Convert.ToDateTime(str2))
            {
                str1 = str2;
            }
            string whereStr = "ActiveType='ActGongziContract' and dbo.f_GetUserCode(UserId) like '%," + this.AdminId + ",%'";

            if (str1.Trim().Length > 0 && str2.Trim().Length > 0)
            {
                whereStr = whereStr + " and STime >='" + str1 + "' and STime <='" + str2 + "'";
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("Act_ActiveRecord");
            string sql0       = SqlHelp.GetSql0("*,dbo.f_GetUserName(UserId) as UserName,(select count(*) from N_UserContract where ParentId=a.userId and Type=1) as contractcount", "Act_ActiveRecord a", "id", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 19
0
        private void ajaxGetRegStrList()
        {
            int    num1     = this.Int_ThisPage();
            int    num2     = this.Str2Int(this.q("pagesize"), 20);
            string whereStr = "UserId=" + this.AdminId;

            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_UserRegLink");
            string sql0       = SqlHelp.GetSql0("row_number() over (order by Point desc) as rowid,*", "N_UserRegLink", "Point", num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, num2 * (num1 - 1)) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 20
0
        private void ajaxGetAgentFHRecord()
        {
            string text     = base.q("d1");
            string text2    = base.q("d2");
            string text3    = base.q("code");
            string text4    = base.q("u");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);

            if (text.Trim().Length == 0)
            {
                text = this.StartTime;
            }
            if (text2.Trim().Length == 0)
            {
                text2 = this.EndTime;
            }
            if (Convert.ToDateTime(text) > Convert.ToDateTime(text2))
            {
                text = text2;
            }
            string text5 = "";
            string text6 = "1=1";

            if (!string.IsNullOrEmpty(text4))
            {
                text6 = text6 + " and UserName LIKE '%" + text4 + "%'";
            }
            if (text.Trim().Length > 0 && text2.Trim().Length > 0)
            {
                string text7 = text6;
                text6 = string.Concat(new string[]
                {
                    text7,
                    " and STime >='",
                    text,
                    "' and STime <'",
                    text2,
                    "'"
                });
            }
            if (!string.IsNullOrEmpty(text3))
            {
                text6 = text6 + " and AgentId=" + text3;
            }
            this.doh.Reset();
            this.doh.ConditionExpress = text6;
            int totalCount = this.doh.Count("V_AgentFHRecord");

            text5  = text5 + " SELECT '0' as [Id],'0' as [UserId],'全部合计' as [username],'0' as [AgentId],'-' as [GroupName],isnull(sum(contractcount),0) as contractcount,max([StartTime]) as [StartTime],max([EndTime]) as [EndTime],isnull(sum([Bet]),0) as [Bet],isnull(sum([Total]),0) as [Total],0 as [Per],isnull(sum([InMoney]),0) as [InMoney],getdate() as [STime],'-' as [Remark]\r\n                    FROM [V_AgentFHRecord] where " + text6;
            text5 += " union all ";
            text5 += " select * from ( ";
            text5 += SqlHelp.GetSql0("*", "V_AgentFHRecord", "id", pageSize, num, "desc", text6);
            text5 += " ) YouleTable order by Id desc ";
            this.doh.Reset();
            this.doh.SqlCmd = text5;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, totalCount, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable),
                "}"
            });
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 21
0
        public void ajaxGetFKProListSub()
        {
            string str1        = this.q("d1") + " 00:00:00";
            string str2        = this.q("d2") + " 23:59:59";
            string inputString = this.q("id");
            string str3        = this.q("u");
            string str4        = this.q("tid");
            int    num1        = this.Int_ThisPage();
            int    num2        = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            if (str1.Trim().Length == 0)
            {
                str1 = this.StartTime;
            }
            if (str2.Trim().Length == 0)
            {
                str2 = this.EndTime;
            }
            if (Convert.ToDateTime(str1) > Convert.ToDateTime(str2))
            {
                str1 = str2;
            }
            string str5 = " STime >='" + str1 + "' and STime <='" + str2 + "'";
            bool   flag = true;

            if (string.IsNullOrEmpty(inputString))
            {
                if (!string.IsNullOrEmpty(str3.Trim()))
                {
                    this.doh.Reset();
                    this.doh.SqlCmd = "select Id,usercode from N_User where UserName='******'";
                    DataTable dataTable = this.doh.GetDataTable();
                    if (dataTable.Rows.Count > 0)
                    {
                        if (dataTable.Rows[0]["usercode"].ToString().Contains(this.AdminId))
                        {
                            inputString = dataTable.Rows[0]["Id"].ToString();
                        }
                        else
                        {
                            inputString = "-1";
                            flag        = false;
                        }
                    }
                    else
                    {
                        flag = false;
                    }
                }
                else
                {
                    inputString = this.AdminId;
                    flag        = true;
                }
            }
            if (flag)
            {
                int    num3 = 0;
                string str6 = string.Format("select {1} as totalcount, {0} as UserID,\r\n                                            (select Convert(varchar(10),cast(round([Point]/10.0,2) as numeric(5,2))) from N_User with(nolock) where Id={0} ) as userpoint,\r\n                                            dbo.f_GetUserName({0}) as userName,\r\n                                            (select isnull(sum(money),0) from N_User with(nolock) where Id = {0}) as money,\r\n                                            isnull(sum(b.Charge),0) Charge,isnull(sum(b.GetCash),0) GetCash,isnull(sum(b.Bet),0)-isnull(sum(b.Cancellation),0) Bet,isnull(sum(b.Point),0) Point,isnull(sum(b.Win),0) Win,isnull(sum(b.Cancellation),0) Cancellation,isnull(sum(b.TranAccIn),0) TranAccIn,isnull(sum(b.TranAccOut),0) TranAccOut,isnull(sum(b.Give),0) Give,isnull(sum(b.Other),0) Other,isnull(sum(b.Change),0) Change,\r\n                                            (isnull(sum(Win),0)+isnull(sum(Point),0)+isnull(sum(Change),0)+isnull(sum(Give),0)+isnull(sum(Cancellation),0))-isnull(sum(Bet),0) as total,\r\n                                            (isnull(sum(Charge),0)-isnull(sum(getcash),0)) as moneytotal\r\n                                            from Flex_UserMoneyStatAll b with(nolock)\r\n                                            where {2} and UserId={0}", (object)inputString, (object)num3, (object)str5) + " union all ";
                this.doh.Reset();
                this.doh.ConditionExpress = " ParentId = " + inputString;
                int totalCount = this.doh.Count("N_User");
                this.doh.Reset();
                this.doh.SqlCmd = SqlHelp.GetSql0("Id,UserName,Money,Point", "N_User", "ID", num2, num1, "asc", " ParentId = " + inputString);
                DataTable dataTable1 = this.doh.GetDataTable();
                for (int index = 0; index < dataTable1.Rows.Count; ++index)
                {
                    string str7 = str5 + " and UserCode like '%" + Strings.PadLeft(dataTable1.Rows[index]["Id"].ToString()) + "%'";
                    if (!string.IsNullOrEmpty(str4))
                    {
                        this.doh.Reset();
                        this.doh.ConditionExpress = "STime >='" + str1 + "' and STime <='" + str2 + "' and UserId=" + dataTable1.Rows[index]["Id"] + " and (Charge<>0 or GetCash<>0 or Bet<>0 or win<>0 or point<>0 or give<>0)";
                        if (this.doh.Count("Flex_UserMoneyStatAll") > 0)
                        {
                            str6 = str6 + string.Format("select {0} as totalcount, {1} as UserID,\r\n                                            Convert(varchar(10),cast(round({2}/10.0,2) as numeric(5,2))) as userpoint,\r\n                                            '{3}' as userName,\r\n                                            isnull(sum({4}),0)  as money,\r\n                                            isnull(sum(b.Charge),0) Charge,isnull(sum(b.GetCash),0) GetCash,isnull(sum(b.Bet),0)-isnull(sum(b.Cancellation),0)  Bet,isnull(sum(b.Point),0) Point,isnull(sum(b.Win),0) Win,isnull(sum(b.Cancellation),0) Cancellation,isnull(sum(b.TranAccIn),0) TranAccIn,isnull(sum(b.TranAccOut),0) TranAccOut,isnull(sum(b.Give),0) Give,isnull(sum(b.Other),0) Other,isnull(sum(b.Change),0) Change,\r\n                                            (isnull(sum(Win),0)+isnull(sum(Point),0)+isnull(sum(Change),0)+isnull(sum(Give),0)+isnull(sum(Cancellation),0))-isnull(sum(Bet),0) as total,\r\n                                            (isnull(sum(Charge),0)-isnull(sum(getcash),0)) as moneytotal\r\n                                            from Flex_UserMoneyStatAll b with(nolock)\r\n                                            where {5}", (object)totalCount, (object)dataTable1.Rows[index]["Id"].ToString(), (object)dataTable1.Rows[index]["Point"].ToString(), (object)dataTable1.Rows[index]["UserName"].ToString(), (object)dataTable1.Rows[index]["Money"].ToString(), (object)str7) + " union all ";
                        }
                    }
                    else
                    {
                        str6 = str6 + string.Format("select {0} as totalcount, {1} as UserID,\r\n                                            Convert(varchar(10),cast(round({2}/10.0,2) as numeric(5,2))) as userpoint,\r\n                                            '{3}' as userName,\r\n                                                                                        (select isnull(sum(money),0) from N_User with(nolock) where UserCode like '%,{1},%') as money,\r\n                                            isnull(sum(b.Charge),0) Charge,isnull(sum(b.GetCash),0) GetCash,isnull(sum(b.Bet),0)-isnull(sum(b.Cancellation),0)  Bet,isnull(sum(b.Point),0) Point,isnull(sum(b.Win),0) Win,isnull(sum(b.Cancellation),0) Cancellation,isnull(sum(b.TranAccIn),0) TranAccIn,isnull(sum(b.TranAccOut),0) TranAccOut,isnull(sum(b.Give),0) Give,isnull(sum(b.Other),0) Other,isnull(sum(b.Change),0) Change,\r\n                                            (isnull(sum(Win),0)+isnull(sum(Point),0)+isnull(sum(Change),0)+isnull(sum(Give),0)+isnull(sum(Cancellation),0))-isnull(sum(Bet),0) as total,\r\n                                            (isnull(sum(Charge),0)-isnull(sum(getcash),0)) as moneytotal\r\n                                            from Flex_UserMoneyStatAll b with(nolock)\r\n                                            where {5}", (object)totalCount, (object)dataTable1.Rows[index]["Id"].ToString(), (object)dataTable1.Rows[index]["Point"].ToString(), (object)dataTable1.Rows[index]["UserName"].ToString(), (object)dataTable1.Rows[index]["Money"].ToString(), (object)str7) + " union all ";
                    }
                }
                string str8 = str6 + string.Format("select {2} as totalcount, '-1' as UserID,'合计' as userpoint,'' as userName,\r\n                                            (select isnull(sum(money),0) from N_User with(nolock) where UserCode like '%,{0},%') as money,\r\n                                            isnull(sum(b.Charge),0) Charge,isnull(sum(b.GetCash),0) GetCash,isnull(sum(b.Bet),0)-isnull(sum(b.Cancellation),0)  Bet,isnull(sum(b.Point),0) Point,isnull(sum(b.Win),0) Win,isnull(sum(b.Cancellation),0) Cancellation,isnull(sum(b.TranAccIn),0) TranAccIn,isnull(sum(b.TranAccOut),0) TranAccOut,isnull(sum(b.Give),0) Give,isnull(sum(b.Other),0) Other,isnull(sum(b.Change),0) Change,\r\n                                            (isnull(sum(Win),0)+isnull(sum(Point),0)+isnull(sum(Change),0)+isnull(sum(Give),0)+isnull(sum(Cancellation),0))-isnull(sum(Bet),0) as total,\r\n                                            (isnull(sum(Charge),0)-isnull(sum(getcash),0)) as moneytotal\r\n                                            FROM Flex_UserMoneyStatAll b with(nolock) where {1}", (object)inputString, (object)(str5 + " and UserCode like '%" + Strings.PadLeft(inputString) + "%'"), (object)totalCount);
                this.doh.Reset();
                this.doh.SqlCmd = str8;
                DataTable dataTable2 = this.doh.GetDataTable();
                this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable2) + "}";
                dataTable2.Clear();
                dataTable2.Dispose();
            }
            else
            {
                this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"recordcount\":0,\"table\": []}";
            }
        }
Esempio n. 22
0
 public void GetListJSON2(int _thispage, int _pagesize, string _wherestr1, string orderby, string order, string pid, string uid, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("V_User");
         string sql0       = SqlHelp.GetSql0(pid + " as pid,*", "V_User", order, _pagesize, _thispage, orderby, _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"nav\" :\"" + this.GetUserNav(pid, uid) + "\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Esempio n. 23
0
        private void ajaxGetProListSub()
        {
            string str1 = this.q("stime");
            string str2 = this.q("keys");
            string d1   = this.q("d1");
            string d2   = this.q("d2");
            string str3 = this.q("id");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            string str4 = "IsDel=0";
            string whereStr;

            if (!string.IsNullOrEmpty(str3))
            {
                whereStr = str4 + " and ParentId =" + str3;
            }
            else if (str2.Trim().Length > 0)
            {
                whereStr = str4 + " and UserCode like '%" + Strings.PadLeft(this.AdminId) + "%' and UserName LIKE '%" + str2 + "%'";
            }
            else
            {
                whereStr = str4 + " and ParentId =" + this.AdminId;
            }
            if (!string.IsNullOrEmpty(str1))
            {
                switch (str1)
                {
                case "1":
                    d1 = DateTime.Now.AddDays(0.0).ToString("yyyy-MM-dd") + " 00:00:00";
                    d2 = DateTime.Now.AddDays(0.0).ToString("yyyy-MM-dd") + " 23:59:59";
                    break;

                case "2":
                    d1 = DateTime.Now.AddDays(-1.0).ToString("yyyy-MM-dd") + " 00:00:00";
                    d2 = DateTime.Now.AddDays(-1.0).ToString("yyyy-MM-dd") + " 23:59:59";
                    break;

                case "3":
                    d1 = DateTime.Now.AddDays(-7.0).ToString("yyyy-MM-dd") + " 00:00:00";
                    d2 = DateTime.Now.AddDays(0.0).ToString("yyyy-MM-dd") + " 23:59:59";
                    break;

                case "4":
                    d1 = DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00";
                    d2 = DateTime.Now.AddDays(0.0).ToString("yyyy-MM-dd") + " 23:59:59";
                    break;

                case "5":
                    d1 = DateTime.Now.AddMonths(-3).ToString("yyyy-MM") + "-01 00:00:00";
                    d2 = DateTime.Now.AddDays(0.0).ToString("yyyy-MM-dd") + " 23:59:59";
                    break;

                case "6":
                    d1 = DateTime.Now.ToString("yyyy") + "-01-01 00:00:00";
                    d2 = DateTime.Now.AddDays(0.0).ToString("yyyy-MM-dd") + " 23:59:59";
                    break;
                }
            }
            else
            {
                if (d1.Trim().Length == 0)
                {
                    d1 = this.StartTime;
                }
                if (d2.Trim().Length == 0)
                {
                    d2 = this.EndTime;
                }
                if (Convert.ToDateTime(d1) > Convert.ToDateTime(d2))
                {
                    d1 = d2;
                }
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_User");
            string sql0       = SqlHelp.GetSql0("[Id]", "N_User a", "Id", num2, num1, "asc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable1 = this.doh.GetDataTable();
            string    str5       = "";

            for (int index = 0; index < dataTable1.Rows.Count; ++index)
            {
                str5 = str5 + "," + dataTable1.Rows[index]["Id"].ToString();
            }
            DataTable dt = this.GetUserMoneyStatSub(d1, d2, this.AdminId);

            if (str5.Length > 1)
            {
                string userId = str5.Substring(1, str5.Length - 1);
                dt = num1 != 1 ? this.GetUserMoneyStatSub(d1, d2, userId) : this.GetUserMoneyStatSub(d1, d2, this.AdminId + "," + userId);
            }
            this.doh.Reset();
            this.doh.SqlCmd = "select Id from N_User with(nolock) where " + whereStr;
            DataTable dataTable2 = this.doh.GetDataTable();
            string    str6       = "";

            for (int index = 0; index < dataTable2.Rows.Count; ++index)
            {
                str6 = str6 + "," + dataTable2.Rows[index]["Id"].ToString();
            }
            DataTable userMoneyStatSub = this.GetUserMoneyStatSub(d1, d2, this.AdminId);

            if (str6.Length > 1)
            {
                string str7 = str6.Substring(1, str6.Length - 1);
                userMoneyStatSub = this.GetUserMoneyStatSub(d1, d2, this.AdminId + "," + str7);
            }
            this._response = "{\"result\" :\"1\",\"returnval\" :\"加载完成\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON123(userMoneyStatSub, dt, 0, "recordcount", "table", true) + "}";
            dataTable1.Clear();
            dataTable1.Dispose();
        }
Esempio n. 24
0
        private void ajaxGetList()
        {
            string str  = this.q("type");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            string whereStr = "";

            if (!string.IsNullOrEmpty(str) && str != "0")
            {
                whereStr = whereStr + " CheckType=" + str;
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("Sys_LoginCheck");
            string sql0       = SqlHelp.GetSql0("*", "Sys_LoginCheck", "id", num2, num1, "asc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 25
0
 public void GetIphoneListJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("Flex_UserGetCash");
         string sql0       = SqlHelp.GetSql0("row_number() over (order by Id desc) as rowid,0.0000 as sxf,*", "Flex_UserGetCash", "Id", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Esempio n. 26
0
        private void ajaxGetActiveRecord()
        {
            string text     = base.q("d1");
            string text2    = base.q("d2");
            string text3    = base.q("type");
            string text4    = base.q("u");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);

            if (text.Trim().Length == 0)
            {
                text = this.StartTime;
            }
            if (text2.Trim().Length == 0)
            {
                text2 = this.EndTime;
            }
            if (Convert.ToDateTime(text) > Convert.ToDateTime(text2))
            {
                text = text2;
            }
            string text5 = "";
            string text6 = "1=1";
            string text7 = base.q("id");

            if (!string.IsNullOrEmpty(text7))
            {
                text6 = text6 + " and ssid ='" + text7 + "'";
            }
            else
            {
                if (!string.IsNullOrEmpty(text4))
                {
                    text6 = text6 + " and dbo.f_GetUserName(UserId) LIKE '%" + text4 + "%'";
                }
                if (!string.IsNullOrEmpty(text3))
                {
                    text6 = text6 + " and ActiveType ='" + text3 + "'";
                }
                if (text.Trim().Length > 0 && text2.Trim().Length > 0)
                {
                    string text8 = text6;
                    text6 = string.Concat(new string[]
                    {
                        text8,
                        " and STime >='",
                        text,
                        "' and STime <'",
                        text2,
                        "'"
                    });
                }
            }
            this.doh.Reset();
            this.doh.ConditionExpress = text6;
            int totalCount = this.doh.Count("Act_ActiveRecord");

            text5  = text5 + " select '全部合计' as UserName,'0' as Id,'-' as SsId,'-' as UserId,'-' as ActiveType,'-' as ActiveName\r\n                        ,0 as Bet,isnull(sum(InMoney),0) as InMoney,getdate() as STime,'-' as CheckIp,'-' as CheckMachine,'0' as FromUserId,'-' as Remark \r\n                        from Act_ActiveRecord where " + text6;
            text5 += " union all ";
            text5 += " select * from ( ";
            text5 += SqlHelp.GetSql0("dbo.f_GetUserName(UserId) as UserName,*", "Act_ActiveRecord", "Id", pageSize, num, "desc", text6);
            text5 += " ) YouleTable order by Id desc ";
            this.doh.Reset();
            this.doh.SqlCmd = text5;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, totalCount, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable),
                "}"
            });
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 27
0
        private void ajaxGetListOfMissing()
        {
            string str1 = this.q("d1");
            string str2 = this.q("d2");
            string str3 = this.q("lid");
            string str4 = this.q("pid");
            string str5 = this.q("sel");
            string str6 = this.q("u");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            if (str1.Trim().Length == 0)
            {
                str1 = this.StartTime;
            }
            if (str2.Trim().Length == 0)
            {
                str2 = this.EndTime;
            }
            if (Convert.ToDateTime(str1) > Convert.ToDateTime(str2))
            {
                str1 = str2;
            }
            string whereStr = "State=0 and " + new UserBetDAL().GetWQWhere();

            if (!string.IsNullOrEmpty(str6))
            {
                whereStr = !str5.Equals("username") ? whereStr + " and ssid like '%" + str6 + "%'" : whereStr + " and dbo.f_GetUserName(UserId) like '%" + str6 + "%'";
            }
            if (!string.IsNullOrEmpty(str3))
            {
                whereStr = whereStr + " and LotteryId =" + str3;
            }
            if (!string.IsNullOrEmpty(str4))
            {
                whereStr = whereStr + " and PlayId ='" + str4 + "'";
            }
            if (str1.Trim().Length > 0 && str2.Trim().Length > 0)
            {
                whereStr = whereStr + " and STime2 >='" + str1 + "' and STime2 <'" + str2 + "'";
            }
            string FldName = this.q("order");

            if (!string.IsNullOrEmpty(FldName))
            {
                if (FldName.Equals("bet"))
                {
                    FldName = "Times*Total";
                }
            }
            else
            {
                FldName = "stime2";
            }
            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("N_UserBet");
            string sql0       = SqlHelp.GetSql0("Id,ssid,UserId,dbo.f_GetUserName(UserId) as UserName,UserMoney,PlayId,dbo.f_GetPlayName(PlayId) as PlayName,PlayCode,LotteryId,dbo.f_GetLotteryName(LotteryId) as LotteryName,IssueNum,SingleMoney,Times,Num,DX,DS,cast(round(Times*Total,4) as numeric(15,4)) as Total,Point,PointMoney,Bonus,WinNum,WinBonus,RealGet,Pos,STime,STime2,IsOpen,State,IsDelay,IsWin,STime9", "N_UserBet", FldName, num2, num1, "desc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 28
0
        public string AutoPageBar(int mode, int stepNum, int totalCount, int PSize, int currentPage)
        {
            string httpN = this.GetUrlPrefix() + "<#page#>";

            return(PageBar.GetPageBar(mode, "html", stepNum, totalCount, PSize, currentPage, httpN));
        }
Esempio n. 29
0
        private void ajaxGetZHInfo()
        {
            string str      = this.q("id");
            int    num1     = this.Int_ThisPage();
            int    num2     = this.Str2Int(this.q("pagesize"), 20);
            string whereStr = "zhid =" + str;

            this.doh.Reset();
            this.doh.ConditionExpress = whereStr;
            int    totalCount = this.doh.Count("V_UserBetZhDetail");
            string sql0       = SqlHelp.GetSql0("*", "V_UserBetZhDetail", "Id", num2, num1, "asc", whereStr);

            this.doh.Reset();
            this.doh.SqlCmd = sql0;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"加载完成\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, totalCount, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
Esempio n. 30
0
        private void ajaxGetActChargeList()
        {
            string text     = base.q("keys");
            string text2    = base.q("bank");
            string text3    = base.q("sel");
            string text4    = base.q("u");
            string text5    = base.q("d1");
            string text6    = base.q("d2");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);
            string text7    = "Id in (SELECT Min(Id) FROM [N_UserCharge] where InMoney>=100 and State=1 ";

            if (text5.Trim().Length == 0)
            {
                text5 = DateTime.Now.AddDays(-1.0).ToString("yyyy-MM-dd");
            }
            if (text6.Trim().Length == 0)
            {
                text6 = this.EndTime;
            }
            if (Convert.ToDateTime(text5) > Convert.ToDateTime(text6))
            {
                text5 = text6;
            }
            if (text5.Trim().Length > 0 && text6.Trim().Length > 0)
            {
                string text8 = text7;
                text7 = string.Concat(new string[]
                {
                    text8,
                    " and STime >='",
                    text5,
                    "' and STime <'",
                    text6,
                    "'"
                });
            }
            if (!string.IsNullOrEmpty(text2))
            {
                text7 = text7 + " and BankId=" + text2;
            }
            if (!string.IsNullOrEmpty(text4))
            {
                if (text3.Equals("username"))
                {
                    text7 = text7 + " and dbo.f_GetUserName(UserId) like '%" + text4 + "%'";
                }
                else
                {
                    text7 = text7 + " and ssid like '%" + text4 + "%'";
                }
            }
            text7 += " group by UserId) and ActState=0  ";
            this.doh.Reset();
            this.doh.ConditionExpress = text7;
            int    totalCount = this.doh.Count("V_ChargeRecord");
            string sql        = SqlHelp.GetSql0("dbo.f_GetUserName(UserId) as UserName,*", "V_ChargeRecord", "Id", pageSize, num, "desc", text7);

            this.doh.Reset();
            this.doh.SqlCmd = sql;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, totalCount, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable),
                "}"
            });
            dataTable.Clear();
            dataTable.Dispose();
        }