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); }
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); }
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))); }
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))); } }
/// <summary> /// 获取所有服务器 /// 编写时间: 2010-10-10 14:00 /// 创建者:Mickey /// </summary> /// <returns></returns> public System.Data.Common.DbDataReader GetServerAll() { return(MySqlHelper.ExecuteReader(SQL_SELECTALL, null)); }
public string getDataAll222() { return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(SQL_SELECTALL22))); }
public string getDataAll_2() { string strs = "select id,type,BigPric,samlPric,title,conent from yafa.pro_game where type = 1"; return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(strs))); }
public string getDataAll(int IDex, int IDexC) { return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(SQL_SELECTALL + " limit " + IDex + "," + IDexC))); }
/// <summary> /// 查询方法 /// 编写时间:2010-9-30 12:30:00 /// 创建者:Mickey /// </summary> /// <returns></returns> public MySqlDataReader GetConfigAll() { return(MySqlHelper.ExecuteReader(SQL_SELECTALL, null)); }
public System.Data.Common.DbDataReader GetGrade(string lan) { string SQL_SELECTLEVEL = "select distinct LevelName" + lan + " as b from yafa.grade "; return(MySqlHelper.ExecuteReader(SQL_SELECTLEVEL, null)); }
/// <summary> /// 返回所有数据(MySqlDataReader) /// By xzz /// time:2010-8-31 22:40 /// </summary> /// <returns></returns> public MySqlDataReader GetManagers() { return(MySqlHelper.ExecuteReader(SQL_MANAGERROLE, null)); }
public string GetRate(string type, string time1, string time2, string language, string user) { string mysql = ""; string types = ""; string ifo = ""; if (language == "cn") { mysql = "name_cn as name"; types = "name_cn"; } if (language == "tw") { mysql = "name_tw as name"; types = "name_tw"; } if (language == "en") { mysql = "name_en as name"; types = "name_en"; } if (language == "th") { mysql = "name_th as name"; types = "name_th"; } if (language == "vn") { mysql = "name_vn as name"; types = "name_vn"; } if (type != "") { ifo = " where " + types + "='" + type + "'"; } if (time1 != "") { ifo = " where date(lasttime)= '" + time1 + "'"; } if (time2 != "") { ifo = " where date(lasttime)= '" + time2 + "'"; } if (time1 != "" && time2 != "") { ifo = "where date(lasttime)>= '" + time1 + "' and date(lasttime)<='" + time2 + "'"; } if (user != "") { ifo = " where operator='" + user + "'"; } if (type != "" && time1 != "" && time2 == "") { ifo = " where " + types + "='" + type + "' and date(lasttime)= '" + time1 + "'"; } if (type != "" && time1 == "" && time2 != "") { ifo = " where " + types + "='" + type + "' and date(lasttime)<= '" + time2 + "'"; } if (type != "" && time1 != "" && time2 != "") { ifo = " where " + types + "='" + type + "' and date(lasttime)>= '" + time1 + "' and date(lasttime)<= '" + time2 + "'"; } if (type != "" && user != "") { ifo = " where " + types + "='" + type + "' and operator='" + user + "'"; } if (user != "" && time1 != "" && time2 == "") { ifo = "where date(lasttime)= '" + time1 + "' and operator='" + user + "'"; } if (user != "" && time1 == "" && time2 != "") { ifo = "where date(lasttime)<= '" + time2 + "' and operator='" + user + "'"; } if (type != "" && time1 != "" && time2 == "" && user != "") { ifo = " where " + types + "='" + type + "' and date(lasttime)= '" + time1 + "' and operator='" + user + "'"; } if (type != "" && time1 == "" && time2 != "" && user != "") { ifo = " where " + types + "='" + type + "' and date(lasttime)<= '" + time2 + "' and operator='" + user + "'"; } if (type != "" && time1 != "" && time2 != "" && user != "") { ifo = " where " + types + "='" + type + "' and date(lasttime)>= '" + time1 + "' and date(lasttime)<='" + time2 + "' and operator='" + user + "'"; } string str = "select id," + mysql + ",rate,date(lasttime),lasttime,operator,ip from yafa.ratehistory " + ifo + " order by " + types + " ,lasttime desc"; return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str))); }
public System.Data.Common.DbDataReader GetGradeId(string name, string lan) { string SQL_SELECTLEVELID = "select ID from yafa.grade where LevelName" + lan + "='" + name + "'"; return(MySqlHelper.ExecuteReader(SQL_SELECTLEVELID, null)); }
public System.Data.Common.DbDataReader GetGradeName(int id, string lan) { string SQL_SELECTLEVELNAME = "select distinct LevelName" + lan + " as b from yafa.grade where ID='" + id + "'"; return(MySqlHelper.ExecuteReader(SQL_SELECTLEVELNAME, null)); }
public List <Orderdetaillive> GetOrderAllByWhere(string whereSql) { List <Orderdetaillive> order = new List <Orderdetaillive>(); if (whereSql == "") { return(order); } string str = "select * from orderdetaillive where " + whereSql; MySqlDataReader reder = MySqlHelper.ExecuteReader(str); while (reder.Read()) { Orderdetaillive or = new Orderdetaillive(); or.ID = Convert.ToInt32(reder.GetString("ID")); or.Agent = Convert.ToString(reder.GetString("Agent")); or.AgentCommission = Convert.ToDecimal(reder.GetString("AgentCommission")); or.AgentPercent = Convert.ToDecimal(reder.GetString("AgentPercent")); or.Amount = Convert.ToDecimal(reder.GetString("Amount")); or.Awaycn = Convert.ToString(reder.GetString("Awaycn")); or.Awayen = Convert.ToString(reder.GetString("Awayen")); or.Awayth = Convert.ToString(reder.GetString("Awayth")); or.Awaytw = Convert.ToString(reder.GetString("Awaytw")); or.Awayvn = Convert.ToString(reder.GetString("Awayvn")); or.BeginTime = Convert.ToDateTime(reder.GetString("BeginTime")); or.BetItem = Convert.ToString(reder.GetString("BetItem")); or.BetType = Convert.ToString(reder.GetString("BetType")); or.Coefficient = Convert.ToDecimal(reder.GetString("Coefficient")); or.CompanyCommission = Convert.ToDecimal(reder.GetString("CompanyCommission")); or.CompanyPercent = Convert.ToDecimal(reder.GetString("CompanyPercent")); or.Currency = Convert.ToString(reder.GetString("Currency")); or.Gameid = Convert.ToInt32(reder.GetString("gameid")); or.Handicap = Convert.ToString(reder.GetString("Handicap")); or.Homecn = Convert.ToString(reder.GetString("Homecn")); or.Homeen = Convert.ToString(reder.GetString("Homeen")); or.Hometh = Convert.ToString(reder.GetString("Hometh")); or.Hometw = Convert.ToString(reder.GetString("Hometw")); or.Homevn = Convert.ToString(reder.GetString("Homevn")); or.IP = Convert.ToString(reder.GetString("IP")); or.IsHalf = Convert.ToString(reder.GetString("IsHalf")); or.Leaguecn = Convert.ToString(reder.GetString("leaguecn")); or.Leagueen = Convert.ToString(reder.GetString("leagueen")); or.Leagueth = Convert.ToString(reder.GetString("leagueth")); or.Leaguetw = Convert.ToString(reder.GetString("leaguetw")); or.Leaguevn = Convert.ToString(reder.GetString("leaguevn")); or.Odds = Convert.ToDecimal(reder.GetString("Odds")); or.OddsType = Convert.ToString(reder.GetString("OddsType")); or.OrderID = Convert.ToString(reder.GetString("OrderID")); or.Partner = Convert.ToString(reder.GetString("Partner")); or.PartnerCommission = Convert.ToDecimal(reder.GetString("PartnerCommission")); or.PartnerPercent = Convert.ToDecimal(reder.GetString("PartnerPercent")); or.Proportion = Convert.ToDecimal(reder.GetString("Proportion")); or.Reason = Convert.ToString(reder.GetString("Reason")); or.Score = Convert.ToString(reder.GetString("Score")); or.Status = Convert.ToString(reder.GetString("Status")); or.SubCompany = Convert.ToString(reder.GetString("SubCompany")); or.SubCompanyCommission = Convert.ToDecimal(reder.GetString("SubCompanyCommission")); or.SubCompanyPercent = Convert.ToDecimal(reder.GetString("SubCompanyPercent")); or.Time = Convert.ToDateTime(reder.GetString("time")); or.UserLevel = Convert.ToString(reder.GetString("UserLevel")); or.UserName = Convert.ToString(reder.GetString("UserName")); or.ValidAmount = Convert.ToDecimal(reder.GetString("ValidAmount")); or.WebSiteiID = Convert.ToInt32(reder.GetString("WebSiteiID")); or.ZAgent = Convert.ToString(reder.GetString("ZAgent")); or.ZAgentCommission = Convert.ToDecimal(reder.GetString("ZAgentCommission")); or.ZAgentPercent = Convert.ToDecimal(reder.GetString("ZAgentPercent")); or.Betflag = Convert.ToString(reder.GetString("betflag")); or.MemberPercent = Convert.ToDecimal(reder.GetString("MemberPercent")); or.MemberCommission = Convert.ToDecimal(reder.GetString("MemberCommission")); order.Add(or); } return(order); }
public static string GetRegIP(string regIP) { string sql = "select username,regip,RegistrationTime from user where regip='" + regIP + "' group by username order by id desc"; return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(sql))); }
/// <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); }
public string getJson(string lan) { string str = "select ID as a,LevelName" + lan + " as b,LevelRemark as c from yafa.grade "; return(ObjectToJson.ReaderToJson(MySqlHelper.ExecuteReader(str))); }