Exemplo n.º 1
0
        public string GetRateByLan(string language)
        {
            string mysql  = "";
            string sqlStr = "";

            if (language == "zh-cn" || language == "zh-CN")
            {
                mysql = "name_cn";
            }
            if (language == "zh-tw")
            {
                mysql = "name_tw";
            }
            if (language == "en-us")
            {
                mysql = "name_en";
            }
            if (language == "th-th")
            {
                mysql = "name_th";
            }
            if (language == "vi-vn")
            {
                mysql = "name_vn";
            }
            sqlStr = "select id," + mysql + " as name,rate,code from rate order by id";
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sqlStr)));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 根据多语言返回json数据
        /// </summary>
        /// <param name="lan">多语言</param>
        /// <returns></returns>
        public string GetGradeByLan(string lan)
        {
            string subSql = "";
            string sqlStr = "";

            switch (lan)
            {
            case "zh-cn":
                subSql = "LevelNamecn as Lname,";
                break;

            case "zh-tw":
                subSql = "LevelNametw as Lname,";
                break;

            case "en-us":
                subSql = "LevelNameen as Lname,";
                break;

            case "th-th":
                subSql = "LevelNameth as Lname,";
                break;

            case "vi-vn":
                subSql = "LevelNamevn as Lname,";
                break;
            }
            sqlStr = "select ID," + subSql + "LevelRemark from grade order by ID";
            string restr = ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sqlStr));

            return(restr);
        }
        public string getInfo(int i, string t)
        {
            string str = "select id,MinBet,MaxBet,SingleMaxBet from rote" + t + "1x21 where gameid=" + i + " union All select id,MinBet,MaxBet,SingleMaxBet"
                         + " from rote" + t + "1x2hf1 where gameid=" + i;

            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str)));
        }
        public string getdxInfo(int i, string t)
        {
            string str = "select id as d,handicap as e,MinBet as f,MaxBet as g,SingleMaxBet as h,'a' as c from rote" + t + "ou1 where gameid=" + i + " group by d"
                         + " union all select id as d,handicap as e,MinBet as f,MaxBet as g,SingleMaxBet as h,'h' as c from rote" + t + "ouhf1 where gameid=" + i + " group by d";

            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str)));
        }
        public string GetAllTolength(string length, string league, string type, string money, string ballteam, string language, string username, string roid)
        {
            string str = "select * from orderother where 1=1 ";

            //if (username != "" && roid != "")
            //{
            //    str += " and " + roid + "='" + username + "'";
            //}
            if (type != "-1")
            {
                str += " and BetType=" + type;
            }
            if (money != "")
            {
                str += " and Amount>=" + money;
            }
            if (league != "")
            {
                str += " and league" + language + " in(" + league + ")";
            }
            if (ballteam != "")
            {
                str += " and gameid in(" + ballteam + ")";
            }
            str += " order by time desc limit 0," + length;
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str)));
        }
Exemplo n.º 6
0
        public string GetBetlogByWhere(string userid, string casino, string gametype)
        {
            userid   = userid.Replace("'", "");
            casino   = casino.Replace("'", "");
            gametype = gametype.Replace("'", "");

            string sql    = "";
            string subSql = "";

            if (!string.IsNullOrEmpty(userid))
            {
                subSql += " and userid='" + userid + "' ";
            }
            if (!string.IsNullOrEmpty(casino))
            {
                subSql += " and casino='" + casino + "' ";
            }
            if (!string.IsNullOrEmpty(gametype))
            {
                subSql += " and gametype='" + gametype + "' ";
            }
            if (subSql == "")
            {
                return("");
            }
            sql = "select * from betlog where 1=1 " + subSql + " order by id desc";
            string re = ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql));

            if (re == "]")
            {
                re = "";
            }
            return(re);
        }
Exemplo n.º 7
0
        public string GetBankhistorybyWhere(string typ, string bank, string cardno, string time1, string time2)
        {
            string strSql;
            string strwhere = "";

            if (!string.IsNullOrEmpty(typ))
            {
                strwhere += " and Typ='" + typ + "' ";
            }
            if (!string.IsNullOrEmpty(bank))
            {
                strwhere += " and bank like '%" + bank + "%' ";
            }
            if (!string.IsNullOrEmpty(cardno))
            {
                strwhere += " and cardno='" + cardno + "' ";
            }
            if (!string.IsNullOrEmpty(time1) && !string.IsNullOrEmpty(time2))
            {
                strwhere += " and isdate>='" + time1 + "' and isdate<='" + time2 + " 23:59:59'";
            }
            if (strwhere == "")
            {
                return("");
            }
            strSql  = "select ID,isdate,Currency,bank,cardno,Typ,amount,balance,operator,operationtime,ip from yafa.bankhistory ";
            strSql += " where 1=1 " + strwhere;
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(strSql)));
        }
        public string getXX(string t, string b, string l, string lg, string g)
        {
            string str = "select UserName as a,OrderID as o,time as b,league" + lg + " as c,Home" + lg + " as d,Away"
                         + lg + " as e,betflag as f,BetItem as g,Handicap as h,Odds as i,OddsType as j,Amount as k,IP as l from "
                         + b + " where gameid=" + l + " and Status='1' and betflag='" + g + "'" + (t != "" ? " and BetType='" + t + "'" : " ");

            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str)));
        }
        public string GetBankListcBynamecn(string namecn)
        {
            string sql = "select * from banklistc where namecn=?namecn";

            MySqlParameter[] param = new MySqlParameter[] {
                new MySqlParameter("?namecn", namecn)
            };
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql, param)));
        }
        public string GetAllTolength1(string league, string type, string money, string ballteam, string language, string time1, string time2, string account)
        {
            string today = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day;
            string str   = "select * from orderother where 1=1 ";
            bool   flag  = true;

            if (type != "-1")
            {
                str += " and BetType=" + type;
            }
            if (money != "")
            {
                flag = false;
                str += " and Amount>=" + money;
            }
            if (league != "")
            {
                flag = false;
                str += " and league" + language + " like '%" + league + "%'";
            }
            if (ballteam != "")
            {
                flag = false;
                str += " and (Home" + language + " like '%" + ballteam + "%' or Away" + language + " like '%" + ballteam + "%' )";
            }
            if (time1 != "" && time2 != "")
            {
                flag = false;
                str += " and ('" + time1 + "'<=date(time) and date(time)<='" + time2 + "')";
            }
            else
            {
                if (time1 != "")
                {
                    flag = false;
                    str += " and date(time)='" + time1 + "'";
                }
                if (time2 != "")
                {
                    flag = false;
                    str += " and date(time)='" + time2 + "'";
                }
            }
            if (account != "")
            {
                flag = false;
                str += " and UserName like '%" + account + "%'";
            }
            if (flag)
            {
                str += " and  date(time)='" + today + "'";
            }
            str += " order by time desc ";
            string json = ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str));

            return(json == "[]" ? "none" : json);
        }
Exemplo n.º 11
0
        /// <summary>
        /// 根据需要的数据量查询
        /// </summary>
        /// <param name="length">多少条</param>
        /// <returns></returns>
        public string getAllToLength(string length)
        {
            string str = SQL_SELECTALL + " order by time desc limit 0,@length";

            MySqlParameter[] param = new MySqlParameter[] {
                new MySqlParameter("@length", int.Parse(length))
            };
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str, param)));
        }
        public string GetBankListcByCurrency(string currency)
        {
            string sql = "select * from banklistc where currency=?currency";

            MySqlParameter[] param = new MySqlParameter[] {
                new MySqlParameter("?currency", currency)
            };
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql, param)));
        }
Exemplo n.º 13
0
        public string SelectAll()
        {
            string json = string.Empty;

            using (MySqlDataReader reader = MySqlHelper.ExecuteReader(SQL_SELECTALL)) {
                json = ObjectToJson.ReaderToJson(reader);
                reader.Close();
            }
            return(json == "[]" ? "" : json);
        }
Exemplo n.º 14
0
        /// <summary>
        /// 返回外调注单列表,根据网站ID(websiteID)
        /// </summary>
        /// <param name="websiteID">网站ID</param>
        /// <param name="lan">多语言</param>
        /// <returns></returns>
        public string GetOrderByWebsiteID(int websiteID, string agent, string webusername, string stime, string etime, string lan)
        {
            stime = stime.Replace("'", "");
            etime = etime.Replace("'", "");
            string sqlStr = "";
            string subStr = "";
            string site   = "";

            switch (lan)
            {
            case "zh-cn":
                subStr = "leaguecn as league,Awaycn as away,Homecn as home";
                site   = "namecn";
                break;

            case "zh-tw":
                subStr = "leaguetw as league,Awaytw as away,Hometw as home";
                site   = "nametw";
                break;

            case "en-us":
                subStr = "leagueen as league,Awayen as away,Homeen as home";
                site   = "nameen";
                break;

            case "th-th":
                subStr = "leagueth as league,Awayth as away,Hometh as home";
                site   = "nameth";
                break;

            case "vi-vn":
                subStr = "leaguevn as Awayvn,Awaycn as away,Homevn as home";
                site   = "nametv";
                break;

            default:
                subStr = "leaguecn as league,Awaycn as away,Homecn as home";
                site   = "namecn";
                break;
            }
            sqlStr += "select WebUserName,UserName,WebOrderID,OrderID,WebSiteiID,time,Status,Scoreathalf,";
            sqlStr += "(select " + site + " from casino where casino.id=orderotherhistory.WebSiteiID) as WebSiteName,";
            sqlStr += "agent,BetItem,Handicap,BetType,";
            sqlStr += subStr + ",";
            sqlStr += "BeginTime,Odds,OddsType,Amount,ValidAmount,Result,Score,Scorehalf,MoreAmount ";
            sqlStr += " from orderotherhistory where WebSiteiID=?WebSiteiID and agent=?agent and webusername=?webusername and BeginTime>='" + stime + "' and BeginTime<='" + etime + " 23:59:59' order by time desc";
            MySqlParameter[] param = new MySqlParameter[] {
                new MySqlParameter("?WebSiteiID", websiteID),
                new MySqlParameter("?agent", agent),
                new MySqlParameter("?webusername", webusername)
            };
            string val = ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sqlStr, param));

            return(val);
        }
Exemplo n.º 15
0
        public string GetLogbyWhere(string typ, string operators, string operationtimes, string operationtimee, string lan)
        {
            string subSql = "";
            string strSql;
            string strwhere = "";

            lan = lan.ToLower();
            switch (lan)
            {
            case "zh-cn":
                subSql = " Reasoncn as reason,bankcn as bank";
                break;

            case "zh-tw":
                subSql = "Reasontw as reason,banktw as bank";
                break;

            case "en-us":
                subSql = "Reasonen as reason,banken as bank";
                break;

            case "th-th":
                subSql = "Reasonth as reason,bankth as bank";
                break;

            case "vi-vn":
                subSql = "Reasonvn as reason,banken as bank";
                break;

            default:
                subSql = " Reasoncn as reason,bankcn as bank";
                break;
            }
            if (!string.IsNullOrEmpty(typ))
            {
                strwhere += " and Type='" + typ + "' ";
            }
            if (!string.IsNullOrEmpty(operators))
            {
                strwhere += " and operator like '%" + operators + "%' ";
            }
            if (!string.IsNullOrEmpty(operationtimes) && !string.IsNullOrEmpty(operationtimee))
            {
                strwhere += " and operationtime>='" + operationtimes + "' and operationtime<='" + operationtimee + " 23:59:59'";
            }
            if (strwhere == "")
            {
                return("");
            }
            strSql  = "select " + subSql + ",ID,UserName,Names,Type,Amount,SubmitTime,UpdateTime,Status,bankID,bankaccount,bankno,cardno,operator,operationtime,ip,Currency from yafa.BillLog ";
            strSql += " where 1=1 " + strwhere;
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(strSql)));
        }
        public static string GetBanklistc(string type)
        {
            string substr = "";
            string sql    = "";

            type = Util.SecurityHelper.InputValue(type);
            if (!string.IsNullOrEmpty(type))
            {
                substr = " and type='" + type + "' ";
            }
            sql = "select * from banklistc where 1=1 " + substr;
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql)));
        }
Exemplo n.º 17
0
        public string SelectByCurr(string currency)
        {
            string json = string.Empty;

            MySqlParameter[] parm = new MySqlParameter[] {
                new MySqlParameter("?Currency", currency)
            };
            using (MySqlDataReader reader = MySqlHelper.ExecuteReader(SQL_SELECTBYCURR, parm))
            {
                json = ObjectToJson.ReaderToJson(reader);
                reader.Close();
            }
            return(json == "[]" ? "" : json);
        }
Exemplo n.º 18
0
        public string GetAllTolength(string length, string league, string level, string type, string money, string ballteam, string language, string username, string roid)
        {
            bool   pd  = false;
            string str = "select * from v_orderdetail where Status=1";

            if (username != "" && roid != "")
            {
                str += " and " + roid + "='" + username + "'";
            }
            if (level != "0")
            {
                str += " and UserLevel='" + level + "'";
            }
            if (type != "-1")
            {
                str += " and BetType=" + type;
            }
            if (money != "")
            {
                str += " and Amount>=" + money;
            }
            if (league != "")
            {
                pd   = true;
                str += " and (league" + language + " in(" + league + ")";
            }
            if (ballteam != "")
            {
                if (pd)
                {
                    str += " or gameid in(" + ballteam + "))";
                }
                else
                {
                    str += " and (gameid in(" + ballteam + "))";
                }
            }
            else
            {
                if (pd)
                {
                    str += ")";
                }
            }
            str += " order by time desc limit 0," + length;
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str)));
        }
Exemplo n.º 19
0
        public string GetOrderAllByWhere(string isHalf, string webSiteiID, string userName, string orderID, string IP,
                                         string time1, string time2)
        {
            webSiteiID = webSiteiID.Replace("'", "");
            userName   = userName.Replace("'", "");
            orderID    = orderID.Replace("'", "");
            IP         = IP.Replace("'", "");
            time1      = time1.Replace("'", "");
            time2      = time2.Replace("'", "");

            string sql    = "";
            string subSql = " 1=1 ";

            if (!string.IsNullOrEmpty(isHalf))
            {
                subSql += " and isHalf in(" + isHalf + ") ";
            }
            if (!string.IsNullOrEmpty(webSiteiID))
            {
                subSql += " and webSiteiID in(" + webSiteiID + ") ";
            }
            if (!string.IsNullOrEmpty(userName))
            {
                subSql += " and userName='******' ";
            }
            if (!string.IsNullOrEmpty(orderID))
            {
                subSql += " and orderID='" + orderID + "' ";
            }
            if (!string.IsNullOrEmpty(IP))
            {
                subSql += " and IP='" + IP + "' ";
            }
            if (!(string.IsNullOrEmpty(time1) || string.IsNullOrEmpty(time2)))
            {
                subSql += " and `time`>='" + time1 + "' and `time`<='" + time2 + "' ";
            }

            if (subSql == " 1=1 ")
            {
                return("");
            }
            sql = "select * from orderall2 where " + subSql + " order by `time` desc";
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql)));
        }
Exemplo n.º 20
0
        //查询
        public static string GetSestlog(string magnerUser, string time1, string time2)
        {
            string sql    = "select * from serverlog where 1=1 ";
            string subStr = "";

            if (!string.IsNullOrEmpty(magnerUser))
            {
                subStr += " and magnerUser='******' ";
            }
            if (!string.IsNullOrEmpty(time1) && !string.IsNullOrEmpty(time2))
            {
                subStr += " and date(LoginTime)>='" + time1 + "' and date(LoginTime)<='" + time2 + "' ";
            }
            if (subStr == "")
            {
                return("");
            }
            sql += subStr;
            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql)));
        }
Exemplo n.º 21
0
        public string GetTestlogByWhere(string userid)
        {
            userid = userid.Replace("'", "");

            string sql    = "";
            string subSql = "";

            if (!string.IsNullOrEmpty(userid))
            {
                subSql += " and userid='" + userid + "' ";
            }
            if (subSql == "")
            {
                return("");
            }
            sql = "select * from testlog where 1=1 " + subSql + " order by id desc";
            string aa = ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql));

            return(aa == "]" ? "" : aa);
        }
Exemplo n.º 22
0
        public string GetAllToJson4(string language, string time)
        {
            string leauge = "leaguecn";
            string home   = "homecn";
            string away   = "awaycn";

            time = DateTime.Now.Year + "-" + time;
            if (language != null)
            {
                leauge = "league" + language;
                home   = "home" + language;
                away   = "away" + language;
            }
            string str  = "select id as a," + leauge + " as b,time as i,begintime as j," + home + " as c," + away + " as d,resulthomescore as e,resultawayscore as f,halfhomescore as g,halfawayscore as h,resulthomescore2,resultawayscore2,halfhomescore2,halfawayscore2 from yafa.matches where date(begintime)='" + time + "' order by begintime," + leauge;
            string json = string.Empty;

            using (MySqlDataReader reader = MySqlHelper2.ExecuteReader(str))
            {
                json = ObjectToJson.ReaderToJson(reader);
                reader.Close();
            }
            return(json == "]" ? string.Empty : json);
        }
Exemplo n.º 23
0
        public string getDataAll(int IDex, int IDexC, string casino, string time1, string time2, string enable)
        {
            string json = string.Empty;
            string str  = SQL_SELECTALL + " where 1=1";

            if (casino != "0")
            {
                str += " and casino=" + casino.Replace("'", "") + "";
            }
            if (time1 != "" || time2 != "")
            {
                time1 = time1 == "" ? time2 : time1;
                time2 = time2 == "" ? time1 : time2;
                str  += " and date(operationTime)>=date('" + DateTime.Parse(time1) + "')";
                str  += " and date(operationTime)<=date('" + DateTime.Parse(time2) + "')";
            }
            if (enable != "-1")
            {
                str += " and isEnable=" + enable + "";
            }
            json = ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str + " limit " + IDex + "," + IDexC));
            return(json == "[]" ? "" : json);
        }
Exemplo n.º 24
0
        public string GetJsnByWhere(string userName, string sn, string date1, string date2)
        {
            userName = userName.Replace("'", "");
            sn       = sn.Replace("'", "");

            string subSql = "";

            if (!string.IsNullOrEmpty(userName))
            {
                subSql += " and UserName like '%" + userName + "%' ";
            }
            if (!string.IsNullOrEmpty(sn))
            {
                subSql += " and sn='" + sn + "' ";
            }
            if (!string.IsNullOrEmpty(date1) || !string.IsNullOrEmpty(date2))
            {
                if (string.IsNullOrEmpty(date1))
                {
                    date1 = date2;
                }
                if (string.IsNullOrEmpty(date2))
                {
                    date2 = date1;
                }
                subSql += " and date(isdate)>='" + date1 + "' and date(isdate)<='" + date2 + "'";
            }

            if (subSql == "")
            {
                return("");
            }
            string sql = "select * from jsn where 1=1 " + subSql + " order by id desc";

            return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql)));
        }
Exemplo n.º 25
0
        public string SelectByWhere(string name, string casino, string isEnable)
        {
            string json       = string.Empty;
            string SQL_SELECT = "select select ID,Name,AgentName,Password,casino,cookie,Address,Address2,isEnable,isLogin,operator,operationTime,status,ip from agentaccount where 1=1";

            if (name != "")
            {
                SQL_SELECT += " and Name like %'" + name + "'%";
            }
            if (casino != "")
            {
                SQL_SELECT += " and casino='" + casino + "'";
            }
            if (isEnable != "")
            {
                SQL_SELECT += " and isEnable='" + isEnable + "'";
            }
            using (MySqlDataReader reader = MySqlHelper.ExecuteReader(SQL_SELECT))
            {
                json = ObjectToJson.ReaderToJson(reader);
                reader.Close();
            }
            return(json == "[]" ? "" : json);
        }
Exemplo n.º 26
0
 public string getDataAll(int IDex, int IDexC)
 {
     return(ObjectToJson.ReaderToJson(MySqlHelper2.ExecuteReader(SQL_SELECTALL + " limit " + IDex + "," + IDexC)));
 }
 public string getDataAll(int IDex, int IDexC, string casino, string dali, string id, string enable, string webPoss, string Company)
 {
     string where = "where";
     if (casino != "0")
     {
         where += " casino=" + casino;
     }
     if (dali != "")
     {
         if (where == "where")
         {
             where += " agent='" + dali + "'";
         }
         else
         {
             where += " and agent='" + dali + "'";
         }
     }
     if (id != "")
     {
         if (where == "where")
         {
             where += " userid='" + id.Replace("'", "") + "'";
         }
         else
         {
             where += " and userid='" + id.Replace("'", "") + "'";
         }
     }
     if (enable != "-1")
     {
         if (where == "where")
         {
             where += " enable=" + enable;
         }
         else
         {
             where += " and enable=" + enable;
         }
     }
     if (webPoss != "")
     {
         if (where == "where")
         {
             where += " websitepossess=" + webPoss;
         }
         else
         {
             where += " and websitepossess=" + webPoss;
         }
     }
     if (Company != "")
     {
         if (where == "where")
         {
             where += " selfpossess=" + Company;
         }
         else
         {
             where += " and selfpossess=" + Company;
         }
     }
     if (where == "where")
     {
         return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(SQL_SELECTALL + " limit " + IDex + "," + IDexC)));
     }
     else
     {
         return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(SQL_SELECTALL + where + " limit " + IDex + "," + IDexC)));
     }
 }
Exemplo n.º 28
0
        public string getCasinoDataAll()
        {
            var json = ObjectToJson.ReaderToJson(MySqlHelper2.ExecuteReader(SQL_SELECTCASINOALL));

            return(json == "[]" ? "none" : json);
        }
Exemplo n.º 29
0
 public string getDataAll()
 {
     return(ObjectToJson.ReaderToJson(MySqlHelper2.ExecuteReader(SQL_SELECTALL)));
 }
Exemplo n.º 30
0
        /// <summary>
        /// 外调输赢网站列表
        /// </summary>
        /// <param name="lan">多语言</param>
        /// <returns></returns>
        public string GetOrderGroupByWebsiteID(string stime, string etime, string lan, string yy, string websiteid, string agent, string webusername)
        {
            stime = stime.Replace("'", "");
            etime = etime.Replace("'", "");
            yy    = yy.Replace("'", "");
            string sqlStr  = "";
            string subStr  = "";
            string subStr1 = "";

            if (!string.IsNullOrEmpty(websiteid))
            {
                subStr1 += " and WebSiteiID=" + websiteid;
            }
            if (!string.IsNullOrEmpty(agent))
            {
                subStr1 += " and agent='" + agent + "' ";
            }
            if (!string.IsNullOrEmpty(webusername))
            {
                subStr1 += " and WebUserName='******' ";
            }
            switch (lan)
            {
            case "zh-cn":
                subStr = "namecn";
                break;

            case "zh-tw":
                subStr = "nametw";
                break;

            case "en-us":
                subStr = "nameen";
                break;

            case "th-th":
                subStr = "nameth";
                break;

            case "vi-vn":
                subStr = "nametv";
                break;

            default:
                subStr = "namecn";
                break;
            }
            if (yy == "WebSiteiID")
            {
                sqlStr = "select (select " + subStr + " from casino where casino.id=orderotherhistory.WebSiteiID) as WebSiteName,WebSiteiID,agent,";
            }
            else
            {
                sqlStr = "select " + yy + " as WebSiteName,WebSiteiID,agent,";
            }
            sqlStr += "sum(Amount) as Amount,sum(ValidAmount) as ValidAmount,sum(Result) as Result,sum(MoreAmount) as MoreAmount ";
            sqlStr += " from orderotherhistory";
            sqlStr += " where BeginTime>='" + stime + "' and BeginTime<='" + etime + " 23:59:59' " + subStr1;
            sqlStr += " group by " + yy + " order by WebSiteiID,agent,WebUserName";

            string val = ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sqlStr));

            return(val);
        }