///<summary> ///获得所有数据,返回DataTable ///生成时间:2011-1-21 20:22:47 ///</summary> public DataTable GetMutilDTOrderdetaillive() { return(MySqlHelper.ExecuteDataTable(SQL_SELECTALL, null)); }
/// <summary> /// 获取所有服务器 /// 编写时间: 2010-10-10 14:00 /// 创建者:Mickey /// </summary> /// <returns></returns> public System.Data.Common.DbDataReader GetServerAll() { return(MySqlHelper.ExecuteReader(SQL_SELECTALL, null)); }
///<summary> ///获得所有数据,返回DataTable ///生成时间:2010-11-2 10:27:01 ///</summary> public DataTable GetMutilDTRotedshdp1() { return MySqlHelper.ExecuteDataTable(SQL_SELECTALL, null); }
///<summary> ///获得所有数据,返回DataTable ///生成时间:2011-1-23 1:00:24 ///</summary> public DataTable GetMutilDTCasinologinservers() { return(MySqlHelper.ExecuteDataTable(SQL_SELECTALL, null)); }
public bool CeliName(string Name) { string SQL_SELECTNAEM = "select ServerName from servers.server where ServerName='" + Name + "'"; return(MySqlHelper.ExecuteDataTable(SQL_SELECTNAEM, null).Rows.Count > 0); }
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> ///获得所有数据,返回DataTable ///生成时间:2010-8-28 22:55:41 ///</summary> public DataTable GetMutilDTBetgames() { return(MySqlHelper.ExecuteDataTable(SQL_SELECTALL, null)); }
///<summary> ///获得所有数据,返回DataTable ///生成时间:2011-4-14 21:35:13 ///</summary> public DataTable GetMutilDTRefusedList() { return(MySqlHelper.ExecuteDataTable(SQL_SELECTALL, null)); }
///<summary> ///获得所有数据,返回DataTable ///生成时间:2011-1-9 20:45:38 ///</summary> public DataTable GetMutilDTUpdatematches() { return(MySqlHelper.ExecuteDataTable(SQL_SELECTALL, 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))); }
///<summary> ///获得所有数据,返回DataTable ///生成时间:2010-11-1 11:56:51 ///</summary> public DataTable GetMutilDTRatehistory() { return(MySqlHelper.ExecuteDataTable(SQL_SELECTALL, null)); }
private DataTable GetDataBySql(string sql, params MySqlParameter[] param) { return(MySqlHelper.ExecuteDataTable(sql, param)); }
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); }
/// <summary> /// /// </summary> /// <param name="backBiaoNum"></param> /// <param name="payno"></param> /// <returns></returns> public refundInfo getRefundInfo(string backBiaoNum, string payno) { try { //在这个地方处理退款 string selectNo = string.Format("SELECT borrowBiaoNum,choose.orderno,result.price from userchoosegame choose INNER JOIN pay_result result on result.order_no=choose.orderno where choose.orderno='{0}' GROUP BY choose.orderno", payno); makeLog("getRefundInfo:" + selectNo); DataTable dt = MySqlHelper.GetDataTable(CommandType.Text, selectNo); string orderno = ""; string totalPrice = ""; int borrowNum = 0; if (dt != null && dt.Rows.Count > 0) { orderno = dt.Rows[0]["orderno"].ToString(); totalPrice = dt.Rows[0]["price"].ToString(); if (dt.Rows[0]["borrowBiaoNum"] != DBNull.Value) { borrowNum = Convert.ToInt32(dt.Rows[0]["borrowBiaoNum"]); } } if (borrowNum == 0) { borrowNum = Convert.ToInt32(backBiaoNum); } if (borrowNum == 0) { borrowNum = 1; backBiaoNum = "1"; } //计算退款的金额 DataTable dtMoney = getDeposit(); int sinlgeBiaoMoney = Convert.ToInt32(dtMoney.Rows[0]["biaoMoney"]); //int money = sinlgeBiaoMoney * (borrowNum - Convert.ToInt32(backBiaoNum)); //押金按比例退 //if (money > sinlgeBiaoMoney * borrowNum) //{ // money = sinlgeBiaoMoney * borrowNum; //} int money = sinlgeBiaoMoney * (Convert.ToInt32(backBiaoNum)); //押金按比例退 if (money > sinlgeBiaoMoney * borrowNum) { money = sinlgeBiaoMoney * borrowNum; } money = (money > 0) ? money : 0; //money = deposit * Convert.ToInt32(backBiaoNum) / borrowNum; makeLog("订单号:" + orderno + "总额:" + totalPrice + "还了:" + backBiaoNum + "借了:" + borrowNum + "退还金额:" + money); if (!string.IsNullOrEmpty(orderno)) { refundInfo info = new refundInfo(); info.orderno = orderno; info.totalPrice = totalPrice; info.refundPrice = money.ToString(); return(info); } else { return(null); } } catch (Exception ex) { makeLog("getRefundInfo()异常:" + ex.ToString()); return(null); } }
///<summary> ///修改方法,返回Boolean类型,为true表示操作成功,否则操作失败 ///生成时间:2011-1-21 20:22:47 ///</summary> public Boolean UpdateOrderdetaillive(Orderdetaillive orderdetaillive) { MySqlParameter[] param = new MySqlParameter[] { new MySqlParameter("?UserName", orderdetaillive.UserName), new MySqlParameter("?OrderID", orderdetaillive.OrderID), new MySqlParameter("?time", orderdetaillive.Time), new MySqlParameter("?leaguecn", orderdetaillive.Leaguecn), new MySqlParameter("?leaguetw", orderdetaillive.Leaguetw), new MySqlParameter("?leagueen", orderdetaillive.Leagueen), new MySqlParameter("?leagueth", orderdetaillive.Leagueth), new MySqlParameter("?leaguevn", orderdetaillive.Leaguevn), new MySqlParameter("?Homecn", orderdetaillive.Homecn), new MySqlParameter("?Hometw", orderdetaillive.Hometw), new MySqlParameter("?Homeen", orderdetaillive.Homeen), new MySqlParameter("?Hometh", orderdetaillive.Hometh), new MySqlParameter("?Homevn", orderdetaillive.Homevn), new MySqlParameter("?Awaycn", orderdetaillive.Awaycn), new MySqlParameter("?Awaytw", orderdetaillive.Awaytw), new MySqlParameter("?Awayen", orderdetaillive.Awayen), new MySqlParameter("?Awayth", orderdetaillive.Awayth), new MySqlParameter("?Awayvn", orderdetaillive.Awayvn), new MySqlParameter("?BeginTime", orderdetaillive.BeginTime), new MySqlParameter("?BetType", orderdetaillive.BetType), new MySqlParameter("?IsHalf", orderdetaillive.IsHalf), new MySqlParameter("?BetItem", orderdetaillive.BetItem), new MySqlParameter("?Score", orderdetaillive.Score), new MySqlParameter("?Handicap", orderdetaillive.Handicap), new MySqlParameter("?Odds", orderdetaillive.Odds), new MySqlParameter("?OddsType", orderdetaillive.OddsType), new MySqlParameter("?Amount", orderdetaillive.Amount), new MySqlParameter("?ValidAmount", orderdetaillive.ValidAmount), new MySqlParameter("?Status", orderdetaillive.Status), new MySqlParameter("?Agent", orderdetaillive.Agent), new MySqlParameter("?AgentPercent", orderdetaillive.AgentPercent), new MySqlParameter("?AgentCommission", orderdetaillive.AgentCommission), new MySqlParameter("?ZAgentPercent", orderdetaillive.ZAgentPercent), new MySqlParameter("?ZAgent", orderdetaillive.ZAgent), new MySqlParameter("?ZAgentCommission", orderdetaillive.ZAgentCommission), new MySqlParameter("?PartnerPercent", orderdetaillive.PartnerPercent), new MySqlParameter("?PartnerCommission", orderdetaillive.PartnerCommission), new MySqlParameter("?Partner", orderdetaillive.Partner), new MySqlParameter("?CompanyPercent", orderdetaillive.CompanyPercent), new MySqlParameter("?CompanyCommission", orderdetaillive.CompanyCommission), new MySqlParameter("?IP", orderdetaillive.IP), new MySqlParameter("?SubCompany", orderdetaillive.SubCompany), new MySqlParameter("?SubCompanyCommission", orderdetaillive.SubCompanyCommission), new MySqlParameter("?SubCompanyPercent", orderdetaillive.SubCompanyPercent), new MySqlParameter("?WebSiteiID", orderdetaillive.WebSiteiID), new MySqlParameter("?UserLevel", orderdetaillive.UserLevel), new MySqlParameter("?Coefficient", orderdetaillive.Coefficient), new MySqlParameter("?Proportion", orderdetaillive.Proportion), new MySqlParameter("?Currency", orderdetaillive.Currency), new MySqlParameter("?Reason", orderdetaillive.Reason), new MySqlParameter("?gameid", orderdetaillive.Gameid), new MySqlParameter("?betflag", orderdetaillive.Betflag), new MySqlParameter("?MemberPercent", orderdetaillive.MemberPercent), new MySqlParameter("?MemberCommission", orderdetaillive.MemberCommission), new MySqlParameter("?ID", orderdetaillive.ID) }; return(MySqlHelper.ExecuteNonQuery(SQL_UPDATE, param) > 0); }
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))); }