protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!model.get_u_type().Trim().Equals("zj")) { base.Response.Redirect("../MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); } base.Permission_Aspx_ZJ(model, "po_3_1"); if (base.IsChildSync()) { base.Response.Redirect("../MessagePage.aspx?code=u100080&url=&issuccess=1&isback=0"); } string s = LSRequest.qq("pid"); string str3 = "/LotteryPeriod/AwardPeriod.aspx?lid=100"; cz_phase_six phaseModel = CallBLL.cz_phase_six_bll.GetPhaseModel(int.Parse(s)); if (!phaseModel.get_is_closed().Equals(1)) { base.Response.Redirect(string.Format("../MessagePage.aspx?code=u100070&url={0}&issuccess=1&isback=1", base.Server.UrlDecode(str3))); } if (!phaseModel.get_is_payment().Equals(1)) { base.Response.Redirect(string.Format("../MessagePage.aspx?code=u100070&url={0}&issuccess=1&isback=1", base.Server.UrlDecode(str3))); } if (CallBLL.cz_phase_six_bll.OpenData(s)) { string str4 = null; if (model.get_users_child_session() != null) { str4 = model.get_users_child_session().get_u_name(); } string str5 = ""; string str6 = ""; cz_lotteryopen_log _log = new cz_lotteryopen_log(); _log.set_phase_id(phaseModel.get_p_id()); _log.set_phase(phaseModel.get_phase()); _log.set_u_name(model.get_u_name()); _log.set_children_name(str4); _log.set_action("開放數據"); _log.set_old_val(str5); _log.set_new_val(str6); _log.set_ip(LSRequest.GetIP()); _log.set_add_time(DateTime.Now); _log.set_note(string.Format("【本期編號:{0}】開放數據", _log.get_phase())); _log.set_type_id(0); _log.set_lottery_id(100); CallBLL.cz_lotteryopen_log_bll.Insert(_log); base.Response.Write(base.ShowDialogBox("開放數據成功!", string.Format("LotteryPeriod/AwardPeriod.aspx?lid={0}", 100), 0)); } else { base.Response.Redirect(string.Format("../MessagePage.aspx?code=u100070&url={0}&issuccess=1&isback=1", base.Server.UrlDecode(str3))); } }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!this.userModel.get_u_type().Trim().Equals("zj")) { base.Response.Redirect("/MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); } base.Permission_Aspx_ZJ(this.userModel, "po_3_1"); if (base.IsChildSync()) { base.Response.Redirect("/MessagePage.aspx?code=u100080&url=&issuccess=1&isback=0"); } this.IsNoOpenLottery(); this.GetSystemSet(); if (LSRequest.qq("hdnSubmit").Equals("add")) { string message = ""; if (!this.ValidParam(ref message)) { base.Response.Write(base.ShowDialogBox(message, "", 400)); base.Response.End(); } else { this.txtPhase = LSRequest.qq("txtPhase"); this.txtOpenDate = LSRequest.qq("txtOpenDate"); this.txtEndDate = LSRequest.qq("txtEndDate"); this.txtTMEndDate = LSRequest.qq("txtTMEndDate"); this.txtOpenTime = LSRequest.qq("txtOpenTime"); this.txtEndTime = LSRequest.qq("txtEndTime"); this.txtTMEndTime = LSRequest.qq("txtTMEndTime"); if (CallBLL.cz_phase_six_bll.GetModelByPhase(this.txtPhase) != null) { base.Response.Write(base.ShowDialogBox("已存在該期期號!", "", 2)); base.Response.End(); } cz_phase_six phaseModel = new cz_phase_six(); phaseModel.set_phase(this.txtPhase); phaseModel.set_add_date(new DateTime?(DateTime.Now)); phaseModel.set_open_date(new DateTime?(Convert.ToDateTime(this.txtOpenDate + " " + this.txtOpenTime))); phaseModel.set_stop_date(new DateTime?(Convert.ToDateTime(this.txtEndDate + " " + this.txtEndTime))); phaseModel.set_sn_stop_date(new DateTime?(Convert.ToDateTime(this.txtTMEndDate + " " + this.txtTMEndTime))); phaseModel.set_is_closed(0); phaseModel.set_is_drawlottery(1); phaseModel.set_is_opendata(0); phaseModel.set_query_date(new DateTime?(Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")))); this.AddPhase(phaseModel); } } }
protected void Page_Load(object sender, EventArgs e) { IDictionary <string, object> dictionary = new Dictionary <string, object>(); cz_phase_six currentPhaseClose = CallBLL.cz_phase_six_bll.GetCurrentPhaseClose(); if (currentPhaseClose != null) { string str = (currentPhaseClose != null) ? currentPhaseClose.get_phase() : ""; string str2 = (currentPhaseClose != null) ? string.Format("{0},{1},{2},{3},{4},{5},{6}", new object[] { currentPhaseClose.get_n1(), currentPhaseClose.get_n2(), currentPhaseClose.get_n3(), currentPhaseClose.get_n4(), currentPhaseClose.get_n5(), currentPhaseClose.get_n6(), currentPhaseClose.get_sn() }) : ""; dictionary.Add("draw_phase", str); dictionary.Add("draw_result", str2.Split(new char[] { ',' }).ToArray <string>()); } dictionary.Add("type", "get_drawinfo"); dictionary.Add("status", "1"); string strResult = JsonHandle.ObjectToJson(dictionary); base.OutJson(strResult); }
protected bool isOpenLottery(cz_phase_six openPhase) { DateTime now = DateTime.Now; string str = "n"; DateTime time2 = Convert.ToDateTime(openPhase.get_stop_date()); DateTime time3 = Convert.ToDateTime(openPhase.get_sn_stop_date()); if (time2 >= now) { str = "y"; } if (time3 >= now) { str = "y"; } if (openPhase.get_is_closed().ToString().Equals("1") || str.Equals("n")) { return(false); } return(true); }
protected void IsOpenSix() { cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase(); DateTime now = DateTime.Now; string str = "n"; DateTime time2 = Convert.ToDateTime(currentPhase.get_stop_date()); DateTime time3 = Convert.ToDateTime(currentPhase.get_sn_stop_date()); if (time2 >= now) { str = "y"; } if (time3 >= now) { str = "y"; } if (currentPhase.get_is_closed().ToString().Equals("1") || str.Equals("n")) { base.Response.Redirect(string.Format("ClosedLottery.aspx?lottery_type=100&player_type=tmA", new object[0]), true); base.Response.End(); } }
private void IsNoOpenLottery() { string str = base.Server.UrlEncode(string.Format("/LotteryPeriod/AwardPeriod.aspx?lid={0}", 100)); if (CallBLL.cz_bet_six_bll.GetIspayment() > 0) { base.Response.Redirect(string.Format("/MessagePage.aspx?code=u100050&url={0}&issuccess=1&isback=1", str)); base.Response.End(); } cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase(); if (currentPhase != null) { int num2 = Convert.ToInt32(currentPhase.get_is_drawlottery()); int num3 = Convert.ToInt32(currentPhase.get_is_opendata()); if ((num2 == 1) || (num3 == 0)) { base.Response.Redirect(string.Format("/MessagePage.aspx?code=u100050&url={0}&issuccess=1&isback=1", str)); base.Response.End(); } int num4 = int.Parse(currentPhase.get_phase()) + 1; if ((num4 > 9) && (num4 < 100)) { this.txtPhase = "0"; } if (num4 < 10) { this.txtPhase = "00"; } this.txtPhase = this.txtPhase + num4.ToString(); } else { this.txtPhase = "001"; } this.txtOpenDate = DateTime.Now.ToString("yyyy-MM-dd"); this.txtEndDate = DateTime.Now.ToString("yyyy-MM-dd"); this.txtTMEndDate = DateTime.Now.ToString("yyyy-MM-dd"); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Session["user_type"].ToString().Equals("zj")) { base.Response.Redirect("../MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); base.Response.End(); } this.lotteryID = LSRequest.qq("lid"); this.lotteryDT = base.GetLotteryList(); if (string.IsNullOrEmpty(this.lotteryID)) { this.lotteryID = this.lotteryDT.Rows[0]["id"].ToString(); } int num = 100; if (this.lotteryID.Equals(num.ToString())) { cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase(); this.tm_end = Convert.ToDateTime(currentPhase.get_sn_stop_date().ToString()); this.btn_C.Text = string.Format("[21:30-{0:t}", this.tm_end) + "]的備份"; } this.InitData(); }
public string GetBetGroupStringPaymentTrue(string phase_id, string play_id, string odds_id, string play_name, string bet_group, string bet_wt, string odds, string amount, double rate, double drawback, string hyAmount) { cz_phase_six phaseModel = CallBLL.cz_phase_six_bll.GetPhaseModel(int.Parse(phase_id)); string str = phaseModel.get_n1(); string str2 = phaseModel.get_n2(); string str3 = phaseModel.get_n3(); string str4 = phaseModel.get_n4(); string str5 = phaseModel.get_n5(); string str6 = phaseModel.get_n6(); string str7 = phaseModel.get_sn(); string text1 = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6; string zqh = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6 + "," + str7; string str9 = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6; string str10 = ""; string str11 = ""; string[] strArray = zqh.Split(new char[] { ',' }); string str12 = ""; foreach (string str13 in strArray) { str12 = base.GetZodiacNum(str13.Trim()).Trim(); str11 = str11 + str12 + ","; str12 = base.GetZodiacName(str13.Trim()).Trim(); str10 = str10 + str12 + ","; } string str14 = ""; string[] strArray2 = zqh.Split(new char[] { ',' }); int num = 0; string str15 = ""; foreach (string str16 in strArray2) { num = int.Parse(str16) % 10; if (num == 0) { str15 = "10"; } else { str15 = "0" + num.ToString(); } str14 = str14 + str15 + ","; } string str17 = ""; string[] strArray3 = bet_group.Split(new char[] { '~' }); string[] strArray4 = bet_wt.Split(new char[] { '~' }); string[] strArray5 = odds.Split(new char[] { ',' }); string str18 = play_name; string str19 = ""; switch (play_id) { case "91017": case "91061": str19 = "中三"; this.isDoubleOdds = true; break; case "91019": case "91063": str19 = "中二"; this.isDoubleOdds = true; break; case "91031": case "91032": case "91033": case "91058": str19 = "連" + base.get_YearLian(); this.isDoubleOdds = false; break; case "91034": case "91035": case "91036": case "91059": str19 = "連0"; this.isDoubleOdds = false; break; } this.isDoubleOdds = false; double num2 = 0.0; double num3 = 0.0; amount = (double.Parse(amount) * rate).ToString(); for (int i = 0; i < strArray3.Length; i++) { string xzh = strArray3[i]; string str21 = strArray4[i]; string s = "0"; if ((play_id.Equals("91031") || play_id.Equals("91032")) || (play_id.Equals("91033") || play_id.Equals("91058"))) { string str23 = ""; string str24 = ""; int num5 = 1; if (string.IsNullOrEmpty(str21)) { str23 = strArray5[0]; str24 = strArray5[1]; num5 = 1; } else if (str21.Split(new char[] { '|' })[0].Equals(base.get_YearLianID())) { str23 = strArray5[0]; str24 = strArray5[1]; num5 = 2; } else { str23 = str21.Split(new char[] { '|' })[1]; str24 = strArray5[1]; num5 = 1; } s = this.count_sxl(xzh, str11, double.Parse(amount), odds, str21).ToString(); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; str17 = str17 + "<tr class='tdbg' onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } else { str17 = str17 + "<tr onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } string str25 = FunctionSix.GetSXLWT(odds_id, odds, str21, base.get_YearLianID()); string str26 = (num5.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str18) : str18; string str27 = (num5.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str21 = string.Format("<span class='blue'>{0}</span>@<b class='red'>{1}</b><br /><span class='blue'>{2}</span>@<b class='red'>{3}</b>", new object[] { str26, str23, str27, str24 }); string str28 = string.Format("{0:F1}", double.Parse(amount)); string str29 = string.Format("{0:F1}", double.Parse(s)); string str30 = ""; if (double.Parse(s) > 0.0) { str30 = " class='winner'"; } str17 = str17 + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3} </td><td align='right'>{4} </td><td align='right' " + str30 + ">{5} </td>", new object[] { i + 1, ((double.Parse(s) > 0.0) ? ("<span style='font-weight:bold'>" + FunctionSix.GetSXLNameBySXid(this.px(xzh)) + "</span>") : FunctionSix.GetSXLNameBySXid(this.px(xzh))) + str25, str21, string.Format("{0:F1}", double.Parse(hyAmount)), str28, str29 }); } else if ((play_id.Equals("91034") || play_id.Equals("91035")) || (play_id.Equals("91036") || play_id.Equals("91059"))) { string str31 = ""; string str32 = ""; int num6 = 1; if (string.IsNullOrEmpty(str21)) { str31 = strArray5[0]; str32 = strArray5[1]; num6 = 1; } else if (str21.Split(new char[] { '|' })[0].Equals("10")) { str31 = strArray5[0]; str32 = strArray5[1]; num6 = 2; } else { str31 = str21.Split(new char[] { '|' })[1]; str32 = strArray5[1]; num6 = 1; } s = this.count_wsl(xzh, str14, double.Parse(amount), odds, str21).ToString(); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; str17 = str17 + "<tr class='tdbg' onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } else { str17 = str17 + "<tr onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } string str33 = string.Format("{0:F1}", double.Parse(amount)); string str34 = string.Format("{0:F1}", double.Parse(s)); string str35 = (num6.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str18) : str18; string str36 = (num6.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; string str37 = FunctionSix.GetWSLWT(odds_id, odds, str21); str21 = string.Format("<span class='blue'>{0}</span>@<b class='red'>{1}</b><br /><span class='blue'>{2}</span>@<b class='red'>{3}</b>", new object[] { str35, str31, str36, str32 }); string str38 = ""; if (double.Parse(s) > 0.0) { str38 = " class='winner'"; } str17 = str17 + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3} </td><td align='right'>{4} </td><td align='right' " + str38 + ">{5} </td>", new object[] { i + 1, ((double.Parse(s) > 0.0) ? ("<span style='font-weight:bold'>" + FunctionSix.GetWSLNameBySXid(this.px(xzh)) + "</span>") : FunctionSix.GetWSLNameBySXid(this.px(xzh))) + str37, str21, string.Format("{0:F1}", double.Parse(hyAmount)), str33, str34 }); } else { int plIndex = 1; string str39 = FunctionSix.GetLMWT(odds_id, odds, str21); if (string.IsNullOrEmpty(str21)) { str21 = odds; } else { str21 = str21.Split(new char[] { '|' })[1]; } switch (play_id) { case "91016": case "91060": s = this.count_sqz(xzh, str9, double.Parse(amount), odds, str21).ToString(); break; case "91017": case "91061": s = this.count_sqr(xzh, str9, double.Parse(amount), odds, str21, ref plIndex).ToString(); break; case "91018": case "91062": s = this.count_rqz(xzh, str9, double.Parse(amount), odds, str21).ToString(); break; case "91019": case "91063": s = this.count_rzt(xzh, str9, str7, double.Parse(amount), odds, str21, ref plIndex).ToString(); break; case "91020": case "91064": s = this.count_tc(xzh, str9, str7, double.Parse(amount), odds, str21).ToString(); break; case "91040": case "91065": s = this.count_szy(xzh, zqh, double.Parse(amount), odds, str21).ToString(); break; case "91037": case "91047": case "91048": case "91049": case "91050": case "91051": s = this.count_wbz(xzh, zqh, double.Parse(amount), odds, str21).ToString(); break; } string str40 = string.Format("{0:F1}", double.Parse(amount)); string str41 = string.Format("{0:F1}", double.Parse(s)); string str42 = ""; "92638,92639,92640,92641,92642,92643".IndexOf(odds_id); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; str17 = str17 + "<tr class='tdbg' onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } else { str17 = str17 + "<tr onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } if (strArray5.Length > 1) { string str43 = (plIndex.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str18) : str18; string str44 = (plIndex.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str21 = string.Format(str42 + "<span class='blue'>{0}</span>@<b class='red'>{1}</b><br /><span class='blue'>{2}</span>@<b class='red'>{3}</b>", new object[] { str43, str21.Split(new char[] { ',' })[0], str44, str21.Split(new char[] { ',' })[1] }); } else { str21 = string.Format(str42 + "<span class='blue'>{0}</span>@<b class='red'>{1}</b>", str18, str21.Split(new char[] { ',' })[0]); } string str45 = ""; if (double.Parse(s) > 0.0) { str45 = " class='winner'"; } str17 = str17 + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3} </td><td align='right'>{4} </td><td align='right' " + str45 + ">{5} </td>", new object[] { i + 1, ((double.Parse(s) > 0.0) ? ("<span style='font-weight:bold'>" + this.px(xzh).Replace(',', '、') + "</span>") : this.px(xzh).Replace(',', '、')) + str39, str21, string.Format("{0:F1}", double.Parse(hyAmount)), str40, str41 }); } str17 = str17 + "</tr>"; } str17 = str17 + "<tr style='font-weight:bold'>"; num2 = (num2 - (double.Parse(amount) * strArray3.Length)) + (double.Parse(amount) * num3); double.Parse(amount); double num1 = drawback / 100.0; return(str17 + string.Format("<th>{0}</th><th>{1}</th><th>{2}</th><th align='right'>{3} </th><th align='right'>{4} </th><th align='right'>{5} </th>", new object[] { "合計:", "共 " + strArray3.Length + " 組", "", string.Format("{0:F1}", double.Parse(hyAmount) * strArray3.Length), string.Format("{0:F1}", double.Parse(amount) * strArray3.Length), string.Format("{0:F1}", num2) }) + "</tr>"); }
protected void IsOpenLottery() { string str = LSRequest.qq("player_type"); string str2 = ""; int? nullable = null; DataTable currentPhase = null; if ((this.Context.Request.Path.ToLower().IndexOf("cqsc_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_cqsc_bll.IsPhaseClose(); nullable = 1; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("kl10_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_kl10_bll.IsPhaseClose(); nullable = 0; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("pk10_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_pk10_bll.IsPhaseClose(); nullable = 2; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("xync_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_xync_bll.IsPhaseClose(); nullable = 3; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("jsk3.aspx") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_jsk3_bll.IsPhaseClose(); nullable = 4; str2 = ""; } if ((this.Context.Request.Path.ToLower().IndexOf("kl8_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_kl8_bll.IsPhaseClose(); nullable = 5; str2 = "zh"; } if ((this.Context.Request.Path.ToLower().IndexOf("k8sc_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_k8sc_bll.IsPhaseClose(); nullable = 6; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("pcdd_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_pcdd_bll.IsPhaseClose(); nullable = 7; str2 = "lmp"; } if ((this.Context.Request.Path.ToLower().IndexOf("six_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase("1"); nullable = 100; str2 = "tm"; } if ((this.Context.Request.Path.ToLower().IndexOf("xyft5_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_xyft5_bll.IsPhaseClose(); nullable = 9; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("pkbjl_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_pkbjl_bll.IsPhaseClose(); nullable = 8; str2 = "p1"; } if ((this.Context.Request.Path.ToLower().IndexOf("jscar_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_jscar_bll.IsPhaseClose(); nullable = 10; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("speed5_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_speed5_bll.IsPhaseClose(); nullable = 11; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("jscqsc_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_jscqsc_bll.IsPhaseClose(); nullable = 13; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("jspk10_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_jspk10_bll.IsPhaseClose(); nullable = 12; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("jssfc_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_jssfc_bll.IsPhaseClose(); nullable = 14; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("jsft2_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_jsft2_bll.IsPhaseClose(); nullable = 15; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("car168_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_car168_bll.IsPhaseClose(); nullable = 0x10; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("ssc168_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_ssc168_bll.IsPhaseClose(); nullable = 0x11; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("vrcar_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_vrcar_bll.IsPhaseClose(); nullable = 0x12; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("vrssc_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_vrssc_bll.IsPhaseClose(); nullable = 0x13; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("xyftoa_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_xyftoa_bll.IsPhaseClose(); nullable = 20; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("xyftsg_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_xyftsg_bll.IsPhaseClose(); nullable = 0x15; str2 = "lm"; } if ((this.Context.Request.Path.ToLower().IndexOf("happycar_") > -1) && (this.Context.Request.Path.ToLower().IndexOf(".aspx") > -1)) { currentPhase = CallBLL.cz_phase_happycar_bll.IsPhaseClose(); nullable = 0x16; str2 = "lm"; } if (!string.IsNullOrEmpty(str)) { str2 = str; } if (nullable.HasValue) { DataTable lotteryList = base.GetLotteryList(); if (!nullable.Equals(100)) { if (currentPhase.Rows[0]["isopen"].ToString().Equals("0")) { base.Response.Redirect(string.Format("/m/ClosedLottery.aspx?lottery_type={0}&player_type={1}", nullable, str2), true); base.Response.End(); } } else { cz_phase_six _six = CallBLL.cz_phase_six_bll.GetCurrentPhase(); DateTime now = DateTime.Now; string str3 = "n"; DateTime time2 = Convert.ToDateTime(_six.get_stop_date()); DateTime time3 = Convert.ToDateTime(_six.get_sn_stop_date()); if (time2 >= now) { str3 = "y"; } if (time3 >= now) { str3 = "y"; } if (_six.get_is_closed().ToString().Equals("1") || str3.Equals("n")) { base.Response.Redirect(string.Format("/m/ClosedLottery.aspx?lottery_type={0}&player_type={1}", nullable, str2), true); base.Response.End(); } } } }
protected void Page_Load(object sender, EventArgs e) { string str = HttpContext.Current.Session["user_name"].ToString(); DataTable lotteryList = base.GetLotteryList(); if (!string.IsNullOrEmpty(LSRequest.qq("lid"))) { this.v_lid = LSRequest.qq("lid"); DataTable currentPhase = null; switch (Convert.ToInt32(this.v_lid)) { case 0: currentPhase = CallBLL.cz_phase_kl10_bll.IsPhaseClose(); break; case 1: currentPhase = CallBLL.cz_phase_cqsc_bll.IsPhaseClose(); break; case 2: currentPhase = CallBLL.cz_phase_pk10_bll.IsPhaseClose(); break; case 3: currentPhase = CallBLL.cz_phase_xync_bll.IsPhaseClose(); break; case 4: currentPhase = CallBLL.cz_phase_jsk3_bll.IsPhaseClose(); break; case 5: currentPhase = CallBLL.cz_phase_kl8_bll.IsPhaseClose(); break; case 6: currentPhase = CallBLL.cz_phase_k8sc_bll.IsPhaseClose(); break; case 7: currentPhase = CallBLL.cz_phase_pcdd_bll.IsPhaseClose(); break; case 8: currentPhase = CallBLL.cz_phase_pkbjl_bll.IsPhaseClose(); break; case 9: currentPhase = CallBLL.cz_phase_xyft5_bll.IsPhaseClose(); break; case 10: currentPhase = CallBLL.cz_phase_jscar_bll.IsPhaseClose(); break; case 11: currentPhase = CallBLL.cz_phase_speed5_bll.IsPhaseClose(); break; case 12: currentPhase = CallBLL.cz_phase_jspk10_bll.IsPhaseClose(); break; case 13: currentPhase = CallBLL.cz_phase_jscqsc_bll.IsPhaseClose(); break; case 14: currentPhase = CallBLL.cz_phase_jssfc_bll.IsPhaseClose(); break; case 15: currentPhase = CallBLL.cz_phase_jsft2_bll.IsPhaseClose(); break; case 0x10: currentPhase = CallBLL.cz_phase_car168_bll.IsPhaseClose(); break; case 0x11: currentPhase = CallBLL.cz_phase_ssc168_bll.IsPhaseClose(); break; case 0x12: currentPhase = CallBLL.cz_phase_vrcar_bll.IsPhaseClose(); break; case 0x13: currentPhase = CallBLL.cz_phase_vrssc_bll.IsPhaseClose(); break; case 20: currentPhase = CallBLL.cz_phase_xyftoa_bll.IsPhaseClose(); break; case 0x15: currentPhase = CallBLL.cz_phase_xyftsg_bll.IsPhaseClose(); break; case 0x16: currentPhase = CallBLL.cz_phase_happycar_bll.IsPhaseClose(); break; case 100: currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase("1"); break; } DataRow[] rowArray = lotteryList.Select(string.Format("id={0}", Convert.ToInt32(this.v_lid))); int num2 = 100; if (this.v_lid.Equals(num2.ToString())) { cz_phase_six _six = CallBLL.cz_phase_six_bll.GetCurrentPhase(); this.v_url = string.Format("/{0}/index.aspx?lid={1}", "L_SIX", 100); this.v_phase = _six.get_phase(); } else if (currentPhase.Rows[0]["isopen"].ToString().Equals("0")) { DateTime now = DateTime.Now; DateTime time2 = DateTime.Now; string introduced12 = now.ToString("yyyy-MM-dd"); if (introduced12 == now.AddHours(7.0).ToString("yyyy-MM-dd")) { time2 = Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " " + rowArray[0]["begintime"].ToString()); } else { time2 = Convert.ToDateTime(now.AddDays(1.0).ToString("yyyy-MM-dd") + " " + rowArray[0]["begintime"].ToString()); } this.v_currentTime = now.ToString("yyyy-MM-dd HH:mm:ss"); this.v_beginTime = time2.ToString("yyyy-MM-dd HH:mm:ss"); string str2 = ""; switch (Convert.ToInt32(this.v_lid)) { case 0: case 2: case 3: case 8: case 9: case 10: case 12: case 14: case 15: case 0x10: case 0x12: case 20: case 0x15: case 0x16: if (string.IsNullOrEmpty(str2)) { str2 = string.Format("/{0}/index.aspx?lid={1}", rowArray[0]["dir_name"].ToString(), rowArray[0]["id"].ToString()); } break; case 1: case 4: case 6: case 7: case 11: case 13: case 0x11: case 0x13: str2 = string.Format("/{0}/index.aspx?lid={1}", rowArray[0]["dir_name"].ToString(), rowArray[0]["id"].ToString()); break; case 5: str2 = string.Format("/{0}/index.aspx?lid={1}", rowArray[0]["dir_name"].ToString(), rowArray[0]["id"].ToString()); break; } this.v_url = str2; } } }
protected void Page_Load(object sender, EventArgs e) { base.Response.Expires = 0; base.IsUserLoginByMobile(); this.caizhong = base.qq("caizhong"); this.game_type = base.qq("game_type"); this.wanfa = base.qq("wanfa"); this.jiangqi = base.qq("jiangqi"); this.txtMomey = base.qq("txtMomey"); this.data_str = base.qq("data"); this.wt_value = base.qq("uPI_WT"); this.lmtype = base.qq("lmtype"); string str = base.qq("ids"); this.group_odds = base.qq("group_odds"); this.numbers = base.qq("numbers"); this.str_numbers = this.numbers; this.str_numbers.Replace(',', '、'); this.lx_numbers = base.qq("zodiac"); this.lx_numbers.Replace(',', '、'); string str2 = base.qq("plx"); if (((((this.caizhong == "") || (this.wanfa == "")) || ((this.jiangqi == "") || (this.data_str == ""))) || (this.txtMomey == "")) || (this.game_type == "")) { this.EndTipInfo("参数错误!"); } this.r_url = "SIX_" + this.game_type + ".aspx?lottery_type=" + this.caizhong + "&player_type=" + this.wanfa; Dictionary <string, object> source = new Dictionary <string, object>(); string[] strArray = null; string str3 = ""; if (this.lmtype != "0") { strArray = this.data_str.Split(new char[] { '|' }); this.s_count = strArray.Length; this.s_momey = int.Parse(this.txtMomey) * strArray.Length; foreach (string str4 in strArray) { string[] strArray2 = str4.Split(new char[] { ',' })[0].Split(new char[] { '_' }); str3 = str3 + strArray2[3].ToString().Trim() + ","; } str3 = str3.Substring(0, str3.Length - 1); } else { string[] strArray3; string[] strArray4; DataTable wTs; int num3; int num4; DataRow[] rowArray; double num5; double num6; strArray = this.data_str.Split(new char[] { '|' }); this.s_count = 1; foreach (string str4 in strArray) { string str5 = str4.Split(new char[] { ',' })[0]; string key = str5.Substring(str5.IndexOf("jeu_p_")); string str7 = str4.Split(new char[] { ',' })[1]; source.Add(key, str7); } int num = source.Count <KeyValuePair <string, object> >(); int num2 = 0; string str8 = str.Split(new char[] { '_' })[1]; str3 = str8; if (((str8.Equals("92285") || str8.Equals("92286")) || str8.Equals("92638")) || str8.Equals("92639")) { num2 = ((num * (num - 1)) * (num - 2)) / 6; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = null; if (str8.Equals("92285")) { wTs = CallBLL.cz_wt_3qz_six_bll.GetWTs(); } else if (str8.Equals("92286")) { wTs = CallBLL.cz_wt_3z2_six_bll.GetWTs(); } else if (str8.Equals("92638")) { wTs = CallBLL.cz_wt_3qz_b_six_bll.GetWTs(); } else if (str8.Equals("92639")) { wTs = CallBLL.cz_wt_3z2_b_six_bll.GetWTs(); } if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if ((((str8.Equals("92287") || str8.Equals("92288")) || (str8.Equals("92289") || str8.Equals("92640"))) || str8.Equals("92641")) || str8.Equals("92642")) { num2 = (num * (num - 1)) / 2; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = null; if (str8.Equals("92287")) { wTs = CallBLL.cz_wt_2qz_six_bll.GetWTs(); } else if (str8.Equals("92288")) { wTs = CallBLL.cz_wt_2zt_six_bll.GetWTs(); } else if (str8.Equals("92289")) { wTs = CallBLL.cz_wt_tc_six_bll.GetWTs(); } else if (str8.Equals("92640")) { wTs = CallBLL.cz_wt_2qz_b_six_bll.GetWTs(); } else if (str8.Equals("92641")) { wTs = CallBLL.cz_wt_2zt_b_six_bll.GetWTs(); } else if (str8.Equals("92642")) { wTs = CallBLL.cz_wt_tc_b_six_bll.GetWTs(); } if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92575") || str8.Equals("92643")) { num2 = (((num * (num - 1)) * (num - 2)) * (num - 3)) / 0x18; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = null; if (str8.Equals("92575")) { wTs = CallBLL.cz_wt_4z1_six_bll.GetWTs(); } else if (str8.Equals("92643")) { wTs = CallBLL.cz_wt_4z1_b_six_bll.GetWTs(); } if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92572")) { num2 = ((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) / 120; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = CallBLL.cz_wt_5bz_six_bll.GetWTs(); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92588")) { num2 = (((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) / 720; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = CallBLL.cz_wt_6bz_six_bll.GetWTs(); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92589")) { num2 = ((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) / 0x13b0; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = CallBLL.cz_wt_7bz_six_bll.GetWTs(); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92590")) { num2 = (((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) * (num - 7)) / 0x9d80; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = CallBLL.cz_wt_8bz_six_bll.GetWTs(); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92591")) { num2 = ((((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) * (num - 7)) * (num - 8)) / 0x58980; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = CallBLL.cz_wt_9bz_six_bll.GetWTs(); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92592")) { num2 = (((((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) * (num - 7)) * (num - 8)) * (num - 9)) / 0x375f00; strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = CallBLL.cz_wt_10bz_six_bll.GetWTs(); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT.Add(str9, num5); } num3++; } } } else if (str8.Equals("92566") || str8.Equals("92569")) { num2 = (num * (num - 1)) / 2; if (str8.Equals("92569")) { this.str_numbers.Replace("、", "尾、"); } } else if (str8.Equals("92567") || str8.Equals("92570")) { num2 = ((num * (num - 1)) * (num - 2)) / 6; if (str8.Equals("92570")) { this.str_numbers.Replace("、", "尾、"); } } else if (str8.Equals("92568") || str8.Equals("92571")) { num2 = (((num * (num - 1)) * (num - 2)) * (num - 3)) / 0x18; if (str8.Equals("92571")) { this.str_numbers.Replace("、", "尾、"); } } else if (str8.Equals("92636") || str8.Equals("92637")) { num2 = ((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) / 120; if (str8.Equals("92637")) { this.str_numbers.Replace("、", "尾、"); } } else if (str8.Equals("92565")) { num2 = 1; } this.g_cnt = num2; this.s_momey = this.g_cnt * int.Parse(this.txtMomey); if (((str8.Equals("92566") || str8.Equals("92567")) || str8.Equals("92568")) || str8.Equals("92636")) { strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); string[] strArray5 = base.qq("zodiac").Split(new char[] { ',' }); wTs = null; wTs = CallBLL.cz_wt_sxlwsl_six_bll.GetWTs(str8); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT_SX.Add(strArray5[num3], num5); } num3++; } } } else if (((str8.Equals("92569") || str8.Equals("92570")) || str8.Equals("92571")) || str8.Equals("92637")) { strArray3 = this.numbers.Split(new char[] { ',' }); strArray4 = str2.Split(new char[] { ',' }); wTs = null; wTs = CallBLL.cz_wt_sxlwsl_six_bll.GetWTs(str8); if ((wTs != null) && (wTs.Rows.Count > 0)) { num3 = 0; foreach (string str9 in strArray3) { num4 = int.Parse(str9); rowArray = wTs.Select(string.Format(" number = {0} ", num4)); if ((rowArray != null) && (rowArray.Count <DataRow>() > 0)) { num5 = double.Parse(rowArray[0]["wt_value"].ToString()); num6 = double.Parse(strArray4[num3]); this.dictWT_WS.Add(str9, num5); } num3++; } } } } string str10 = ""; string str11 = ""; cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase(); if (currentPhase != null) { if (currentPhase.get_is_closed() == 1) { this.EndTipInfo("停止下注"); return; } str10 = currentPhase.get_phase().ToString(); this.jiangqi_str = str10; str11 = currentPhase.get_p_id().ToString(); } else { this.EndTipInfo("停止下注"); return; } DataTable playIDByOddsIds = CallBLL.cz_odds_six_bll.GetPlayIDByOddsIds(str3); DateTime now = DateTime.Now; DateTime time2 = Convert.ToDateTime(currentPhase.get_stop_date()); DateTime time3 = Convert.ToDateTime(currentPhase.get_sn_stop_date()); if (((((playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91001") || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91002")) || ((playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91004") || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91005"))) || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91007")) || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91038")) { if (time3 < now) { this.EndTipInfo("停止下注"); return; } } else if (time2 < now) { this.EndTipInfo("停止下注"); return; } DataSet playOddsByID = CallBLL.cz_odds_six_bll.GetPlayOddsByID(str3); this.plDT = playOddsByID.Tables[0]; if (this.plDT.Rows.Count == 0) { this.EndTipInfo("賠率ID設置错误!"); } else { string[] strArray6 = str3.Split(new char[] { ',' }); for (int i = 0; i < strArray6.Length; i++) { bool flag = false; for (int j = 0; j < this.plDT.Rows.Count; j++) { if (strArray6[i].Equals(this.plDT.Rows[j]["odds_id"].ToString())) { flag = true; break; } } if (!flag) { this.EndTipInfo("赔率ID错误!"); return; } } this.uModel = base.GetUserModelInfo; string str12 = this.Session["user_name"].ToString(); this.pk_kind = this.uModel.get_six_kind(); } }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!model.get_u_type().Trim().Equals("zj")) { base.Response.Redirect("../MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); } base.Permission_Aspx_ZJ(model, "po_3_1"); if (base.IsChildSync()) { base.Response.Redirect("../MessagePage.aspx?code=u100080&url=&issuccess=1&isback=0"); } if (base.En_Balance_Lock(false).Equals("300")) { base.Response.Redirect("/MessagePage.aspx?code=u100082&url=&issuccess=1&isback=0&isopen=0"); base.Response.End(); } DataTable maxPhase = CallBLL.cz_phase_six_bll.GetMaxPhase(); if (maxPhase == null) { base.Response.Write(base.ShowDialogBox("獎期錯誤!", "", 400)); base.Response.End(); } this.lid = LSRequest.qq("lid"); this.pid = LSRequest.qq("pid"); this.again = maxPhase.Rows[0]["is_opendata"].ToString(); if (LSRequest.qq("hdnadd").Equals("add")) { this.pid = LSRequest.qq("hdnpid"); this.lid = LSRequest.qq("hdnlid"); string message = ""; if (!this.ValidParam(ref message)) { base.Response.Write(base.ShowDialogBox(message, "", 400)); base.Response.End(); } else { if (maxPhase.Rows[0]["p_id"].ToString() != this.pid) { base.Response.Write(base.ShowDialogBox("獎期錯誤!", "", 400)); base.Response.End(); } cz_phase_six _six = new cz_phase_six(); _six.set_p_id(Convert.ToInt32(this.pid)); _six.set_n1((this.CoverString(LSRequest.qq("zm1")).Equals("00") || this.CoverString(LSRequest.qq("zm1")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm1"))); _six.set_n2((this.CoverString(LSRequest.qq("zm2")).Equals("00") || this.CoverString(LSRequest.qq("zm2")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm2"))); _six.set_n3((this.CoverString(LSRequest.qq("zm3")).Equals("00") || this.CoverString(LSRequest.qq("zm3")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm3"))); _six.set_n4((this.CoverString(LSRequest.qq("zm4")).Equals("00") || this.CoverString(LSRequest.qq("zm4")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm4"))); _six.set_n5((this.CoverString(LSRequest.qq("zm5")).Equals("00") || this.CoverString(LSRequest.qq("zm5")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm5"))); _six.set_n6((this.CoverString(LSRequest.qq("zm6")).Equals("00") || this.CoverString(LSRequest.qq("zm6")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm6"))); _six.set_sn((this.CoverString(LSRequest.qq("tm")).Equals("00") || this.CoverString(LSRequest.qq("tm")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("tm"))); if (!string.IsNullOrEmpty(_six.get_sn())) { _six.set_zodiac_sn(this.GetZodiacNameString(_six.get_sn())); } if (!string.IsNullOrEmpty(_six.get_n1())) { _six.set_zodiac_n1(this.GetZodiacNameString(_six.get_n1())); } if (!string.IsNullOrEmpty(_six.get_n2())) { _six.set_zodiac_n2(this.GetZodiacNameString(_six.get_n2())); } if (!string.IsNullOrEmpty(_six.get_n3())) { _six.set_zodiac_n3(this.GetZodiacNameString(_six.get_n3())); } if (!string.IsNullOrEmpty(_six.get_n4())) { _six.set_zodiac_n4(this.GetZodiacNameString(_six.get_n4())); } if (!string.IsNullOrEmpty(_six.get_n5())) { _six.set_zodiac_n5(this.GetZodiacNameString(_six.get_n5())); } if (!string.IsNullOrEmpty(_six.get_n6())) { _six.set_zodiac_n6(this.GetZodiacNameString(_six.get_n6())); } if (!CallBLL.cz_phase_six_bll.UpdatePhaseCode(_six)) { base.Response.Write(base.ShowDialogBox("更新開獎碼時錯誤", "", 400)); base.Response.End(); } else { string str5 = null; if (model.get_users_child_session() != null) { str5 = model.get_users_child_session().get_u_name(); } string str6 = string.Concat(new object[] { maxPhase.Rows[0]["n1"], " , ", maxPhase.Rows[0]["n2"], " , ", maxPhase.Rows[0]["n3"], " , ", maxPhase.Rows[0]["n4"], " , ", maxPhase.Rows[0]["n5"], " , ", maxPhase.Rows[0]["n6"], " + ", maxPhase.Rows[0]["sn"] }); string str7 = _six.get_n1() + " , " + _six.get_n2() + " , " + _six.get_n3() + " , " + _six.get_n4() + " , " + _six.get_n5() + " , " + _six.get_n6() + " + " + _six.get_sn(); cz_lotteryopen_log _log = new cz_lotteryopen_log(); _log.set_phase_id(int.Parse(this.pid)); _log.set_phase(maxPhase.Rows[0]["phase"].ToString()); _log.set_u_name(str); _log.set_children_name(str5); _log.set_action("送出號碼"); _log.set_old_val(str6); _log.set_new_val(str7); _log.set_ip(LSRequest.GetIP()); _log.set_add_time(DateTime.Now); if (maxPhase.Rows[0]["is_opendata"].ToString().Equals("1")) { _log.set_note(string.Format("【本期編號:{0}】重新開獎", _log.get_phase())); } else { _log.set_note(string.Format("【本期編號:{0}】開獎", _log.get_phase())); } _log.set_type_id(0); _log.set_lottery_id(100); CallBLL.cz_lotteryopen_log_bll.Insert(_log); base.Response.Write(string.Format("<script>location.href='Lottery_Open.aspx?pid={0}&lid={1}';</script>", this.pid, this.lid)); base.Response.End(); } } } this.phaseModel = CallBLL.cz_phase_six_bll.GetPhaseModel(Convert.ToInt32(this.pid)); if (this.phaseModel == null) { base.Response.Redirect("../MessagePage.aspx?code=u100008&url=&issuccess=1&isback=0"); } }
protected void zdbak_Click(HttpContext context) { string str4; cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase(); if (currentPhase == null) { context.Response.Write(base.ShowDialogBox("獎期無數據!", string.Format("/BillBackupManage/BillBackup.aspx?lid={0}", 100), 0)); context.Response.End(); return; } DateTime time = Convert.ToDateTime(currentPhase.get_sn_stop_date()); string str = ""; if (context.Request["t"] != null) { str = context.Request["t"].ToString().Trim(); } string str2 = ""; string str3 = ""; string str19 = str; if (str19 != null) { if (!(str19 == "a")) { if (str19 == "b") { DateTime time3 = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd") + " 21:30:00"); if (DateTime.Now < time3) { context.Response.Write(base.ShowDialogBox("當前不能操作21:30注單備份!", string.Format("/BillBackupManage/BillBackup.aspx?lid={0}", 100), 0)); context.Response.End(); return; } str2 = "betdata_" + DateTime.Now.Date.ToString("yyyy-MM-dd") + "_" + DateTime.Now.ToLongTimeString().Replace(":", "-") + "_2120and2030.aspx"; str3 = "select bet_id, u_name, order_num, checkcode, phase, odds_id, category, play_name, bet_val, odds, amount, kind from cz_bet_six with(NOLOCK) where bet_time >='" + DateTime.Now.Date.ToString("yyyy-MM-dd") + " 21:20:00' and bet_time <'" + DateTime.Now.Date.ToString("yyyy-MM-dd") + " 21:30:00'"; goto Label_048A; } if (str19 == "c") { DateTime time4 = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd") + " " + string.Format("{0:t}", time)); if (DateTime.Now < Convert.ToDateTime(time4)) { context.Response.Write(base.ShowDialogBox("當前不能操作" + string.Format("{0:t}", time) + "注單備份!", string.Format("/BillBackupManage/BillBackup.aspx?lid={0}", 100), 0)); context.Response.End(); return; } str2 = "betdata_" + DateTime.Now.Date.ToString("yyyy-MM-dd") + "_" + DateTime.Now.ToLongTimeString().Replace(":", "-") + "_after2130.aspx"; str3 = "select bet_id, u_name, order_num, checkcode, phase, odds_id, category, play_name, bet_val, odds, amount, kind from cz_bet_six with(NOLOCK) where bet_time>='" + DateTime.Now.Date.ToString("yyyy-MM-dd") + " 21:30:00'"; goto Label_048A; } } else { DateTime time2 = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd") + " 21:20:00"); if (DateTime.Now < time2) { context.Response.Write(base.ShowDialogBox("當前不能操作21:20注單備份!", string.Format("/BillBackupManage/BillBackup.aspx?lid={0}", 100), 0)); context.Response.End(); return; } str2 = "betdata_" + DateTime.Now.Date.ToString("yyyy-MM-dd") + "_" + DateTime.Now.ToLongTimeString().Replace(":", "-") + "_before2120.aspx"; str3 = "select bet_id, u_name, order_num, checkcode, phase, odds_id, category, play_name, bet_val, odds, amount, kind from cz_bet_six with(NOLOCK) where bet_time<'" + DateTime.Now.Date.ToString("yyyy-MM-dd") + " 21:20:00'"; goto Label_048A; } } context.Response.Write(base.ShowDialogBox("请重新登陆!", "/Default.aspx", 0)); context.Response.End(); Label_048A: str4 = DateTime.Now.ToString("yyyy-MM-dd"); DataRow[] rowArray = base.GetLotteryList().Select(string.Format(" id={0} ", 100)); string path = HttpContext.Current.Server.MapPath(string.Format("/BillBackupFolder/{0}/{1}/", rowArray[0]["dir_name"].ToString().Trim(), str4)); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } File.Copy(base.Server.MapPath("/BillBackupFolder/DBTemplate.mdb"), path + str2, true); ArrayList sQLStringList = new ArrayList(); string str6 = null; DataTable table2 = DbHelperSQL.Query(str3, null).Tables[0]; foreach (DataRow row in table2.Rows) { string str7 = ""; string str8 = ""; string str9 = ""; string str10 = ""; string str11 = ""; string str12 = ""; string str13 = ""; string str14 = ""; string str15 = ""; string str16 = ""; string str17 = ""; string str18 = ""; str7 = row["bet_id"].ToString().Trim(); str8 = row["u_name"].ToString().Trim(); str9 = row["order_num"].ToString().Trim(); str10 = row["checkcode"].ToString().Trim(); str11 = row["phase"].ToString().Trim(); str12 = row["odds_id"].ToString().Trim(); str13 = row["category"].ToString().Trim(); str14 = row["play_name"].ToString().Trim(); str15 = row["bet_val"].ToString().Trim(); str16 = row["odds"].ToString().Trim(); str17 = row["amount"].ToString().Trim(); str18 = row["kind"].ToString().Trim(); str6 = "insert into betdata(bet_id, u_name, order_num, checkcode, phase, odds_id, category, play_name, bet_val, odds, amount, kind) "; string str20 = str6; sQLStringList.Add((str20 + " values('" + str7 + "','" + str8 + "','" + str9 + "','" + str10 + "','" + str11 + "','" + str12 + "','" + str13 + "','" + str14 + "','" + str15 + "','" + str16 + "','" + str17 + "','" + str18 + "')").ToString()); } this.ExecuteSqlTran(sQLStringList, path + str2, context); }
protected void out_six_odds_info() { string str = LSRequest.qq("playid"); string str2 = LSRequest.qq("playpage"); if (string.IsNullOrEmpty(str)) { base.Response.End(); } else { string str3 = this.Session["user_name"].ToString(); cz_userinfo_session getUserModelInfo = base.GetUserModelInfo; string str4 = getUserModelInfo.get_su_type().ToString(); string str5 = getUserModelInfo.get_u_name().ToString(); string str6 = getUserModelInfo.get_six_kind().Trim(); ReturnResult result = new ReturnResult(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("type", "get_oddsinfo"); dictionary.Add("playpage", str2); DataTable table = CallBLL.cz_users_bll.GetCredit(str5, str4).Tables[0]; string str7 = table.Rows[0]["six_credit"].ToString(); string str8 = table.Rows[0]["six_iscash"]; decimal num = Convert.ToDecimal(str7); string str9 = "0"; if (str8.Equals("1")) { str9 = "1"; } decimal num2 = Convert.ToDecimal(table.Rows[0]["six_usable_credit"].ToString()); dictionary.Add("iscash", str9); dictionary.Add("credit", num.ToString("F1")); dictionary.Add("usable_credit", num2.ToString("F1")); cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase(); if (!this.isOpenLottery(currentPhase)) { dictionary.Add("status", "3"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { DateTime now = DateTime.Now; string str11 = "n"; string str12 = "0"; string str13 = ""; string str14 = currentPhase.get_open_date().ToString(); string str15 = ""; DateTime time2 = Convert.ToDateTime(currentPhase.get_stop_date()); DateTime time3 = Convert.ToDateTime(currentPhase.get_sn_stop_date()); TimeSpan span = Utils.DateDiff(time2, now); TimeSpan span2 = Utils.DateDiff(time3, now); string str16 = string.Concat(new object[] { (span.Days * 0x18) + span.Hours, ":", span.Minutes, ":", span.Seconds }); string str17 = string.Concat(new object[] { (span2.Days * 0x18) + span2.Hours, ":", span2.Minutes, ":", span2.Seconds }); if (time2 < now) { str15 = str16; } else { str11 = "y"; str12 = "1"; str15 = str16; } if (time3 < now) { str13 = str17; } else { str11 = "y"; str12 = "1"; str13 = str17; } if ((currentPhase != null) && currentPhase.get_is_closed().Equals(0)) { int num3; if (time2 < now) { num3 = CallBLL.cz_odds_six_bll.UpdateIsOpen(1, "91001,91002,91003,91004,91005,91007,91038"); } if (time3 < now) { num3 = CallBLL.cz_odds_six_bll.UpdateIsOpen(0, ""); } } string str18 = (currentPhase != null) ? currentPhase.get_phase() : ""; string str19 = (currentPhase != null) ? currentPhase.get_p_id().ToString() : ""; dictionary.Add("openning", str11); dictionary.Add("isopen", str12); int index = str14.IndexOf(' '); dictionary.Add("drawopen_time", str14.Substring(index)); string str20 = ""; string[] strArray = str13.Split(new char[] { ':' }); str20 = (Convert.ToInt32(strArray[0]) < 10) ? ("0" + strArray[0]) : strArray[0]; str20 = (str20 + ":" + ((Convert.ToInt32(strArray[1]) < 10) ? ("0" + strArray[1]) : strArray[1])) + ":" + ((Convert.ToInt32(strArray[2]) < 10) ? ("0" + strArray[2]) : strArray[2]); dictionary.Add("stop_time", str20); dictionary.Add("nn", str18); dictionary.Add("p_id", str19); dictionary.Add("profit", ""); DataSet play = CallBLL.cz_play_six_bll.GetPlay(str, str4); if (play == null) { base.Response.End(); } else { DataTable table2 = play.Tables["odds"]; if (table2 == null) { base.Response.End(); } else { DataSet cache; DataTable table3 = null; DataTable table4 = null; DataTable table5 = null; DataTable table6 = null; DataTable table7 = null; DataTable table8 = null; DataTable wT = null; DataTable table10 = null; DataTable table11 = null; DataTable table12 = null; DataTable table13 = null; DataTable table14 = null; DataTable table15 = null; DataTable table16 = null; DataTable table17 = null; DataTable table18 = null; DataTable table19 = null; DataTable table20 = null; DataTable table21 = null; DataTable table22 = null; string str37 = str2; if (str37 != null) { if (!(str37 == "six_lm")) { if (str37 == "six_lm_b") { wT = CallBLL.cz_wt_3qz_b_six_bll.GetWT(); table10 = CallBLL.cz_wt_3z2_b_six_bll.GetWT(); table11 = CallBLL.cz_wt_2qz_b_six_bll.GetWT(); table12 = CallBLL.cz_wt_2zt_b_six_bll.GetWT(); table13 = CallBLL.cz_wt_tc_b_six_bll.GetWT(); table14 = CallBLL.cz_wt_4z1_b_six_bll.GetWT(); } else if (str37 == "six_bz") { table15 = CallBLL.cz_wt_5bz_six_bll.GetWT(); table16 = CallBLL.cz_wt_6bz_six_bll.GetWT(); table17 = CallBLL.cz_wt_7bz_six_bll.GetWT(); table18 = CallBLL.cz_wt_8bz_six_bll.GetWT(); table19 = CallBLL.cz_wt_9bz_six_bll.GetWT(); table20 = CallBLL.cz_wt_10bz_six_bll.GetWT(); } else if (str37 == "six_lx") { table21 = CallBLL.cz_wt_sxlwsl_six_bll.GetWT(); table22 = CallBLL.cz_wt_6xyz_six_bll.GetWT(); } else if (str37 == "six_ws") { table21 = CallBLL.cz_wt_sxlwsl_six_bll.GetWT(); } } else { table3 = CallBLL.cz_wt_3qz_six_bll.GetWT(); table4 = CallBLL.cz_wt_3z2_six_bll.GetWT(); table5 = CallBLL.cz_wt_2qz_six_bll.GetWT(); table6 = CallBLL.cz_wt_2zt_six_bll.GetWT(); table7 = CallBLL.cz_wt_tc_six_bll.GetWT(); table8 = CallBLL.cz_wt_4z1_six_bll.GetWT(); } } DataTable drawbackByPlayIds = null; if (FileCacheHelper.get_GetSixPutMoneyCache() == "1") { foreach (string str21 in str.Split(new char[] { ',' })) { DataTable table24; if (CacheHelper.GetCache("six_drawback_FileCacheKey" + str21 + this.Session["user_name"].ToString()) != null) { cache = CacheHelper.GetCache("six_drawback_FileCacheKey" + str21 + this.Session["user_name"].ToString()) as DataSet; if (drawbackByPlayIds == null) { drawbackByPlayIds = cache.Tables[0]; } else { table24 = drawbackByPlayIds.Clone(); table24 = cache.Tables[0]; if (table24 != null) { drawbackByPlayIds.Merge(table24); } } } else if (drawbackByPlayIds == null) { drawbackByPlayIds = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str21, getUserModelInfo.get_u_name()); } else { table24 = drawbackByPlayIds.Clone(); table24 = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str21, getUserModelInfo.get_u_name()); if (table24 != null) { drawbackByPlayIds.Merge(table24); } } } } else if (CacheHelper.GetCache("six_drawback_FileCacheKey" + this.Session["user_name"].ToString()) != null) { cache = CacheHelper.GetCache("six_drawback_FileCacheKey" + this.Session["user_name"].ToString()) as DataSet; drawbackByPlayIds = cache.Tables[0]; } else { drawbackByPlayIds = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str, getUserModelInfo.get_u_name()); } Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); foreach (DataRow row in table2.Rows) { string key = ""; string pl = ""; string s = ""; string str25 = ""; string str26 = ""; string str27 = ""; string str28 = ""; List <double> source = new List <double>(); Dictionary <string, object> dictionary3 = new Dictionary <string, object>(); key = row["play_id"].ToString() + "_" + row["odds_id"].ToString(); string str29 = row["current_odds"].ToString(); string str30 = row[str6 + "_diff"].ToString().Trim(); if (!row["is_open"].ToString().Equals("0")) { try { string[] strArray3 = row["current_odds"].ToString().Split(new char[] { ',' }); string[] strArray4 = row[str6 + "_diff"].ToString().Trim().Split(new char[] { ',' }); base.GetOdds_SIX(row["odds_id"].ToString(), row["current_odds"].ToString(), row[str6 + "_diff"].ToString(), ref pl); } catch (Exception exception) { string message = exception.Message; } } else if (row["current_odds"].ToString().Split(new char[] { ',' }).Length > 1) { pl = "-,-"; } else { pl = "-"; } DataRow[] rowArray = drawbackByPlayIds.Select(string.Format(" play_id={0} and u_name='{1}' ", row["play_id"].ToString(), getUserModelInfo.get_u_name())); string str32 = rowArray[0]["single_phase_amount"].ToString(); string str33 = rowArray[0]["single_max_amount"].ToString(); string str34 = rowArray[0]["single_min_amount"].ToString(); s = row["allow_min_amount"].ToString(); str25 = row["allow_max_amount"].ToString(); str26 = row["max_appoint"].ToString(); str27 = row["total_amount"].ToString(); str28 = row["allow_max_put_amount"].ToString(); if (Convert.ToDecimal(str25) > Convert.ToDecimal(str28)) { str25 = row["allow_max_put_amount"].ToString(); } if (Convert.ToDecimal(str25) > Convert.ToDecimal(str27)) { str25 = row["total_amount"].ToString(); } if (double.Parse(s) < double.Parse(str34)) { s = str34; } if (double.Parse(str25) > double.Parse(str33)) { str25 = str33; } if ((str2.Equals("six_lm") || str2.Equals("six_lm_b")) || str2.Equals("six_bz")) { switch (row["play_id"].ToString()) { case "91016": foreach (DataRow row2 in table3.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91017": foreach (DataRow row2 in table4.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91018": foreach (DataRow row2 in table5.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91019": foreach (DataRow row2 in table6.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91020": foreach (DataRow row2 in table7.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91040": foreach (DataRow row2 in table8.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91060": foreach (DataRow row2 in wT.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91061": foreach (DataRow row2 in table10.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91062": foreach (DataRow row2 in table11.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91063": foreach (DataRow row2 in table12.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91064": foreach (DataRow row2 in table13.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91065": foreach (DataRow row2 in table14.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91037": foreach (DataRow row2 in table15.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91047": foreach (DataRow row2 in table16.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91048": foreach (DataRow row2 in table17.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91049": foreach (DataRow row2 in table18.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91050": foreach (DataRow row2 in table19.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91051": foreach (DataRow row2 in table20.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; } } if (str2.Equals("six_lx")) { string str36 = row["odds_id"].ToString(); if (str36.Equals("92565")) { foreach (DataRow row2 in table22.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } } else { DataRow[] rowArray2 = table21.Select(string.Format(" odds_id={0} ", Convert.ToInt32(str36))); foreach (DataRow row2 in rowArray2) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } } } dictionary3.Add("pl", pl); dictionary3.Add("plx", new List <double>(source)); dictionary3.Add("min_amount", s); dictionary3.Add("max_amount", str25); dictionary3.Add("top_amount", str26); dictionary3.Add("dq_max_amount", str27); dictionary3.Add("dh_max_amount", str28); dictionary2.Add(key, new Dictionary <string, object>(dictionary3)); } dictionary.Add("status", "1"); dictionary.Add("play_odds", dictionary2); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } } } } }
private void AddPhase(cz_phase_six phaseModel) { DataSet playByOddsSet = CallBLL.cz_play_six_bll.GetPlayByOddsSet("91025,91026,91027,91028,91029"); if (((playByOddsSet != null) && (playByOddsSet.Tables.Count > 0)) && (playByOddsSet.Tables[0].Rows.Count > 0)) { DataTable table = playByOddsSet.Tables[0]; foreach (DataRow row in table.Rows) { int num; cz_play_six _six = new cz_play_six(); string str = row["play_id"].ToString(); string str2 = row["default_odds"].ToString(); string str3 = row["max_odds"].ToString(); string str4 = row["min_odds"].ToString(); row["a_diff"].ToString(); string str5 = row["b_diff"].ToString(); string str6 = row["c_diff"].ToString(); _six.set_play_id(Convert.ToInt32(str)); _six.set_default_odds(str2); _six.set_max_odds(str3); _six.set_min_odds(str4); _six.set_b_diff(str5); _six.set_c_diff(str6); if (CallBLL.cz_bet_six_bll.GetIspayment() > 0) { num = 1; } else { num = 0; } try { if (_six.get_play_id().Equals(0x16385)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SB(_six, num.ToString()); } else if (_six.get_play_id().Equals(0x16382)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_ZT(_six, "91010,91025,91026,91027,91028,91029", num.ToString()); } else if (_six.get_play_id().Equals(0x1637e)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_TMSX(_six, base.get_YearLian(), num.ToString()); } else if (_six.get_play_id().Equals(0x1637f)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_TMSB(_six, num.ToString()); } else if (_six.get_play_id().Equals(0x1638d)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "sx", base.get_YearLian(), num.ToString()); } else if (_six.get_play_id().Equals(0x1638e)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "ws", "0", num.ToString()); } else if (_six.get_play_id().Equals(0x163ae)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "sx", base.get_YearLian(), num.ToString()); } else if (_six.get_play_id().Equals(0x163af)) { CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "ws", "0", num.ToString()); } else if (_six.get_play_id().Equals(0x16380)) { string[] strArray = _six.get_default_odds().Split(new char[] { '|' }); string[] strArray2 = _six.get_max_odds().Split(new char[] { '|' }); string[] strArray3 = _six.get_min_odds().Split(new char[] { '|' }); string[] strArray4 = _six.get_b_diff().Split(new char[] { '|' }); string[] strArray5 = _six.get_c_diff().Split(new char[] { '|' }); cz_odds_six _six2 = new cz_odds_six(); _six2.set_play_id(new int?(_six.get_play_id())); _six2.set_play_name("半波【單雙】"); _six2.set_put_amount("紅波單"); _six2.set_current_odds(strArray[0]); _six2.set_max_odds(strArray2[0]); _six2.set_min_odds(strArray3[0]); _six2.set_b_diff(strArray4[0]); _six2.set_c_diff(strArray5[0]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six2, num.ToString()); cz_odds_six _six3 = new cz_odds_six(); _six3.set_play_id(new int?(_six.get_play_id())); _six3.set_play_name("半波【單雙】"); _six3.set_put_amount("紅波雙"); _six3.set_current_odds(strArray[1]); _six3.set_max_odds(strArray2[1]); _six3.set_min_odds(strArray3[1]); _six3.set_b_diff(strArray4[1]); _six3.set_c_diff(strArray5[1]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six3, num.ToString()); cz_odds_six _six4 = new cz_odds_six(); _six4.set_play_id(new int?(_six.get_play_id())); _six4.set_play_name("半波【單雙】"); _six4.set_put_amount("藍波單"); _six4.set_current_odds(strArray[2]); _six4.set_max_odds(strArray2[2]); _six4.set_min_odds(strArray3[2]); _six4.set_b_diff(strArray4[2]); _six4.set_c_diff(strArray5[2]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six4, num.ToString()); cz_odds_six _six5 = new cz_odds_six(); _six5.set_play_id(new int?(_six.get_play_id())); _six5.set_play_name("半波【單雙】"); _six5.set_put_amount("藍波雙"); _six5.set_current_odds(strArray[3]); _six5.set_max_odds(strArray2[3]); _six5.set_min_odds(strArray3[3]); _six5.set_b_diff(strArray4[3]); _six5.set_c_diff(strArray5[3]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six5, num.ToString()); cz_odds_six _six6 = new cz_odds_six(); _six6.set_play_id(new int?(_six.get_play_id())); _six6.set_play_name("半波【單雙】"); _six6.set_put_amount("綠波單"); _six6.set_current_odds(strArray[4]); _six6.set_max_odds(strArray2[4]); _six6.set_min_odds(strArray3[4]); _six6.set_b_diff(strArray4[4]); _six6.set_c_diff(strArray5[4]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six6, num.ToString()); cz_odds_six _six7 = new cz_odds_six(); _six7.set_play_id(new int?(_six.get_play_id())); _six7.set_play_name("半波【單雙】"); _six7.set_put_amount("綠波雙"); _six7.set_current_odds(strArray[5]); _six7.set_max_odds(strArray2[5]); _six7.set_min_odds(strArray3[5]); _six7.set_b_diff(strArray4[5]); _six7.set_c_diff(strArray5[5]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six7, num.ToString()); } else if (_six.get_play_id().Equals(0x163b1)) { string[] strArray6 = _six.get_default_odds().Split(new char[] { '|' }); string[] strArray7 = _six.get_max_odds().Split(new char[] { '|' }); string[] strArray8 = _six.get_min_odds().Split(new char[] { '|' }); string[] strArray9 = _six.get_b_diff().Split(new char[] { '|' }); string[] strArray10 = _six.get_c_diff().Split(new char[] { '|' }); cz_odds_six _six8 = new cz_odds_six(); _six8.set_play_id(new int?(_six.get_play_id())); _six8.set_play_name("半波【大小】"); _six8.set_put_amount("紅波大"); _six8.set_current_odds(strArray6[0]); _six8.set_max_odds(strArray7[0]); _six8.set_min_odds(strArray8[0]); _six8.set_b_diff(strArray9[0]); _six8.set_c_diff(strArray10[0]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six8, num.ToString()); cz_odds_six _six9 = new cz_odds_six(); _six9.set_play_id(new int?(_six.get_play_id())); _six9.set_play_name("半波【大小】"); _six9.set_put_amount("紅波小"); _six9.set_current_odds(strArray6[1]); _six9.set_max_odds(strArray7[1]); _six9.set_min_odds(strArray8[1]); _six9.set_b_diff(strArray9[1]); _six9.set_c_diff(strArray10[1]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six9, num.ToString()); cz_odds_six _six10 = new cz_odds_six(); _six10.set_play_id(new int?(_six.get_play_id())); _six10.set_play_name("半波【大小】"); _six10.set_put_amount("藍波大"); _six10.set_current_odds(strArray6[2]); _six10.set_max_odds(strArray7[2]); _six10.set_min_odds(strArray8[2]); _six10.set_b_diff(strArray9[2]); _six10.set_c_diff(strArray10[2]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six10, num.ToString()); cz_odds_six _six11 = new cz_odds_six(); _six11.set_play_id(new int?(_six.get_play_id())); _six11.set_play_name("半波【大小】"); _six11.set_put_amount("藍波小"); _six11.set_current_odds(strArray6[3]); _six11.set_max_odds(strArray7[3]); _six11.set_min_odds(strArray8[3]); _six11.set_b_diff(strArray9[3]); _six11.set_c_diff(strArray10[3]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six11, num.ToString()); cz_odds_six _six12 = new cz_odds_six(); _six12.set_play_id(new int?(_six.get_play_id())); _six12.set_play_name("半波【大小】"); _six12.set_put_amount("綠波大"); _six12.set_current_odds(strArray6[4]); _six12.set_max_odds(strArray7[4]); _six12.set_min_odds(strArray8[4]); _six12.set_b_diff(strArray9[4]); _six12.set_c_diff(strArray10[4]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six12, num.ToString()); cz_odds_six _six13 = new cz_odds_six(); _six13.set_play_id(new int?(_six.get_play_id())); _six13.set_play_name("半波【大小】"); _six13.set_put_amount("綠波小"); _six13.set_current_odds(strArray6[5]); _six13.set_max_odds(strArray7[5]); _six13.set_min_odds(strArray8[5]); _six13.set_b_diff(strArray9[5]); _six13.set_c_diff(strArray10[5]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six13, num.ToString()); } else if (_six.get_play_id().Equals(0x163ac)) { string[] strArray11 = _six.get_default_odds().Split(new char[] { '|' }); string[] strArray12 = _six.get_max_odds().Split(new char[] { '|' }); string[] strArray13 = _six.get_min_odds().Split(new char[] { '|' }); string[] strArray14 = _six.get_b_diff().Split(new char[] { '|' }); string[] strArray15 = _six.get_c_diff().Split(new char[] { '|' }); cz_odds_six _six14 = new cz_odds_six(); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單0、雙7"); _six14.set_current_odds(strArray11[0]); _six14.set_max_odds(strArray12[0]); _six14.set_min_odds(strArray13[0]); _six14.set_b_diff(strArray14[0]); _six14.set_c_diff(strArray15[0]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單1、雙6"); _six14.set_current_odds(strArray11[1]); _six14.set_max_odds(strArray12[1]); _six14.set_min_odds(strArray13[1]); _six14.set_b_diff(strArray14[1]); _six14.set_c_diff(strArray15[1]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單2、雙5"); _six14.set_current_odds(strArray11[2]); _six14.set_max_odds(strArray12[2]); _six14.set_min_odds(strArray13[2]); _six14.set_b_diff(strArray14[2]); _six14.set_c_diff(strArray15[2]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單3、雙4"); _six14.set_current_odds(strArray11[3]); _six14.set_max_odds(strArray12[3]); _six14.set_min_odds(strArray13[3]); _six14.set_b_diff(strArray14[3]); _six14.set_c_diff(strArray15[3]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單4、雙3"); _six14.set_current_odds(strArray11[4]); _six14.set_max_odds(strArray12[4]); _six14.set_min_odds(strArray13[4]); _six14.set_b_diff(strArray14[4]); _six14.set_c_diff(strArray15[4]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單5、雙2"); _six14.set_current_odds(strArray11[5]); _six14.set_max_odds(strArray12[5]); _six14.set_min_odds(strArray13[5]); _six14.set_b_diff(strArray14[5]); _six14.set_c_diff(strArray15[5]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單6、雙1"); _six14.set_current_odds(strArray11[6]); _six14.set_max_odds(strArray12[6]); _six14.set_min_odds(strArray13[6]); _six14.set_b_diff(strArray14[6]); _six14.set_c_diff(strArray15[6]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); _six14.set_play_id(new int?(_six.get_play_id())); _six14.set_play_name("七碼單雙"); _six14.set_put_amount("單7、雙0"); _six14.set_current_odds(strArray11[7]); _six14.set_max_odds(strArray12[7]); _six14.set_min_odds(strArray13[7]); _six14.set_b_diff(strArray14[7]); _six14.set_c_diff(strArray15[7]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString()); } else if (_six.get_play_id().Equals(0x163b0)) { string[] strArray16 = _six.get_default_odds().Split(new char[] { '|' }); string[] strArray17 = _six.get_max_odds().Split(new char[] { '|' }); string[] strArray18 = _six.get_min_odds().Split(new char[] { '|' }); string[] strArray19 = _six.get_b_diff().Split(new char[] { '|' }); string[] strArray20 = _six.get_c_diff().Split(new char[] { '|' }); cz_odds_six _six15 = new cz_odds_six(); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大0、小7"); _six15.set_current_odds(strArray16[0]); _six15.set_max_odds(strArray17[0]); _six15.set_min_odds(strArray18[0]); _six15.set_b_diff(strArray19[0]); _six15.set_c_diff(strArray20[0]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大1、小6"); _six15.set_current_odds(strArray16[1]); _six15.set_max_odds(strArray17[1]); _six15.set_min_odds(strArray18[1]); _six15.set_b_diff(strArray19[1]); _six15.set_c_diff(strArray20[1]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大2、小5"); _six15.set_current_odds(strArray16[2]); _six15.set_max_odds(strArray17[2]); _six15.set_min_odds(strArray18[2]); _six15.set_b_diff(strArray19[2]); _six15.set_c_diff(strArray20[2]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大3、小4"); _six15.set_current_odds(strArray16[3]); _six15.set_max_odds(strArray17[3]); _six15.set_min_odds(strArray18[3]); _six15.set_b_diff(strArray19[3]); _six15.set_c_diff(strArray20[3]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大4、小3"); _six15.set_current_odds(strArray16[4]); _six15.set_max_odds(strArray17[4]); _six15.set_min_odds(strArray18[4]); _six15.set_b_diff(strArray19[4]); _six15.set_c_diff(strArray20[4]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大5、小2"); _six15.set_current_odds(strArray16[5]); _six15.set_max_odds(strArray17[5]); _six15.set_min_odds(strArray18[5]); _six15.set_b_diff(strArray19[5]); _six15.set_c_diff(strArray20[5]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大6、小1"); _six15.set_current_odds(strArray16[6]); _six15.set_max_odds(strArray17[6]); _six15.set_min_odds(strArray18[6]); _six15.set_b_diff(strArray19[6]); _six15.set_c_diff(strArray20[6]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); _six15.set_play_id(new int?(_six.get_play_id())); _six15.set_play_name("七碼大小"); _six15.set_put_amount("大7、小0"); _six15.set_current_odds(strArray16[7]); _six15.set_max_odds(strArray17[7]); _six15.set_min_odds(strArray18[7]); _six15.set_b_diff(strArray19[7]); _six15.set_c_diff(strArray20[7]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString()); } else if (_six.get_play_id().Equals(0x163ad)) { string[] strArray21 = _six.get_default_odds().Split(new char[] { '|' }); string[] strArray22 = _six.get_max_odds().Split(new char[] { '|' }); string[] strArray23 = _six.get_min_odds().Split(new char[] { '|' }); string[] strArray24 = _six.get_b_diff().Split(new char[] { '|' }); string[] strArray25 = _six.get_c_diff().Split(new char[] { '|' }); cz_odds_six _six16 = new cz_odds_six(); _six16.set_play_id(new int?(_six.get_play_id())); _six16.set_play_name("五行"); _six16.set_put_amount("金"); _six16.set_current_odds(strArray21[0]); _six16.set_max_odds(strArray22[0]); _six16.set_min_odds(strArray23[0]); _six16.set_b_diff(strArray24[0]); _six16.set_c_diff(strArray25[0]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString()); _six16.set_play_id(new int?(_six.get_play_id())); _six16.set_play_name("五行"); _six16.set_put_amount("木"); _six16.set_current_odds(strArray21[1]); _six16.set_max_odds(strArray22[1]); _six16.set_min_odds(strArray23[1]); _six16.set_b_diff(strArray24[1]); _six16.set_c_diff(strArray25[1]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString()); _six16.set_play_id(new int?(_six.get_play_id())); _six16.set_play_name("五行"); _six16.set_put_amount("水"); _six16.set_current_odds(strArray21[2]); _six16.set_max_odds(strArray22[2]); _six16.set_min_odds(strArray23[2]); _six16.set_b_diff(strArray24[2]); _six16.set_c_diff(strArray25[2]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString()); _six16.set_play_id(new int?(_six.get_play_id())); _six16.set_play_name("五行"); _six16.set_put_amount("火"); _six16.set_current_odds(strArray21[3]); _six16.set_max_odds(strArray22[3]); _six16.set_min_odds(strArray23[3]); _six16.set_b_diff(strArray24[3]); _six16.set_c_diff(strArray25[3]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString()); _six16.set_play_id(new int?(_six.get_play_id())); _six16.set_play_name("五行"); _six16.set_put_amount("土"); _six16.set_current_odds(strArray21[4]); _six16.set_max_odds(strArray22[4]); _six16.set_min_odds(strArray23[4]); _six16.set_b_diff(strArray24[4]); _six16.set_c_diff(strArray25[4]); CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString()); } else { CallBLL.cz_odds_six_bll.SetOddsByOddsSet(_six, num.ToString()); } } catch (Exception) { base.Response.Write(base.ShowDialogBox("添加獎期錯誤!", "", 2)); base.Response.End(); } } if (CallBLL.cz_phase_six_bll.AddPhase(phaseModel) > 0) { cz_lotteryopen_log _log = new cz_lotteryopen_log(); string str7 = null; if (this.userModel.get_users_child_session() != null) { str7 = this.userModel.get_users_child_session().get_u_name(); } string str8 = ""; string str9 = ((("本期編號: " + phaseModel.get_phase()) + "<br />開獎時間: " + Convert.ToDateTime(phaseModel.get_open_date()).ToString("yyyy-MM-dd HH:mm:ss")) + "<br />截止投注時間: " + Convert.ToDateTime(phaseModel.get_stop_date()).ToString("yyyy-MM-dd HH:mm:ss")) + "<br />特碼投注截止: " + Convert.ToDateTime(phaseModel.get_sn_stop_date()).ToString("yyyy-MM-dd HH:mm:ss"); _log.set_phase_id(CallBLL.cz_phase_six_bll.GetModelByPhase(phaseModel.get_phase()).get_p_id()); _log.set_phase(phaseModel.get_phase()); _log.set_u_name(this.userModel.get_u_name()); _log.set_children_name(str7); _log.set_action("新增獎期"); _log.set_old_val(str8); _log.set_new_val(str9); _log.set_ip(LSRequest.GetIP()); _log.set_add_time(DateTime.Now); _log.set_note(string.Format("【本期編號:{0}】新增獎期", _log.get_phase())); _log.set_type_id(0); _log.set_lottery_id(100); CallBLL.cz_lotteryopen_log_bll.Insert(_log); CallBLL.cz_lm_number_amount_six_bll.ClearNumberAmount(); if (CallBLL.cz_system_set_six_bll.GetSystemSet(100).get_single_number_isdown().Equals(1)) { CallBLL.cz_lm_number_amount_six_bll.SetWtValueAmount(); } string url = "/LotteryPeriod/AwardPeriod.aspx?lid=" + 100; FileCacheHelper.UpdateAudoJPFile(); base.Response.Write(base.ShowDialogBox("添加獎期成功!", url, 0)); base.Response.End(); } else { base.Response.Write(base.ShowDialogBox("添加獎期錯誤!", "", 400)); base.Response.End(); } } }
public string GetBetGroupStringPaymentTrue(string phase_id, string play_id, string odds_id, string play_name, string bet_group, string bet_wt, string odds, string amount, double drawback) { int length; cz_phase_six phaseModel = CallBLL.cz_phase_six_bll.GetPhaseModel(int.Parse(phase_id)); string str = phaseModel.get_n1(); string str2 = phaseModel.get_n2(); string str3 = phaseModel.get_n3(); string str4 = phaseModel.get_n4(); string str5 = phaseModel.get_n5(); string str6 = phaseModel.get_n6(); string str7 = phaseModel.get_sn(); string str8 = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6; string zqh = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6 + "," + str7; string str10 = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6; string str11 = ""; string str12 = ""; string[] strArray = zqh.Split(new char[] { ',' }); string str13 = ""; foreach (string str14 in strArray) { str13 = base.GetZodiacNum(str14.Trim()).Trim(); str12 = str12 + str13 + ","; str13 = base.GetZodiacName(str14.Trim()).Trim(); str11 = str11 + str13 + ","; } string str15 = ""; string[] strArray2 = zqh.Split(new char[] { ',' }); int num = 0; string str16 = ""; foreach (string str17 in strArray2) { num = int.Parse(str17) % 10; if (num == 0) { str16 = "10"; } else { str16 = "0" + num.ToString(); } str15 = str15 + str16 + ","; } string str18 = ""; string[] strArray3 = bet_group.Split(new char[] { '~' }); string[] strArray4 = bet_wt.Split(new char[] { '~' }); string[] strArray5 = odds.Split(new char[] { ',' }); string str19 = play_name; string str20 = ""; switch (play_id) { case "91017": case "91061": str20 = "中三"; break; case "91019": case "91063": str20 = "中二"; break; case "91031": case "91032": case "91033": case "91058": str20 = "連" + base.get_YearLian(); break; case "91034": case "91035": case "91036": case "91059": str20 = "連0"; break; } double num2 = 0.0; double num3 = 0.0; for (int i = 0; i < strArray3.Length; i++) { string str25; string str26; int num5; string str27; string str28; string str29; string str30; string str31; string xzh = strArray3[i]; string str22 = strArray4[i]; string s = "0"; string str24 = "0"; if (((play_id.Equals("91031") || play_id.Equals("91032")) || play_id.Equals("91033")) || play_id.Equals("91058")) { str25 = ""; str26 = ""; num5 = 1; if (string.IsNullOrEmpty(str22)) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 1; } else if (str22.Split(new char[] { '|' })[0].Equals(base.get_YearLianID())) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 2; } else { str25 = str22.Split(new char[] { '|' })[1]; str26 = strArray5[1]; num5 = 1; } s = base.count_sxl(xzh, str12, double.Parse(amount), odds, str22).ToString(); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; } str27 = FunctionSix.GetSXLWT(odds_id, odds, str22, base.get_YearLianID()); str28 = (num5.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str29 = (num5.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str20) : str20; str22 = string.Format("<span class='lan'>{0}</span>@<b class='hong'>{1}</b><br /><span class='lan'>{2}</span>@<b class='hong'>{3}</b>", new object[] { str28, str25, str29, str26 }); str30 = string.Format("{0:F1}", double.Parse(amount)); str31 = string.Format("{0:F1}", double.Parse(s)); length = i + 1; str18 = str18 + this.GetGroupHtmlTrue(length.ToString(), FunctionSix.GetSXLNameBySXid(this.px(xzh)) + str27, str22, str30, str31, null); } else if (((play_id.Equals("91034") || play_id.Equals("91035")) || play_id.Equals("91036")) || play_id.Equals("91059")) { str25 = ""; str26 = ""; num5 = 1; if (string.IsNullOrEmpty(str22)) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 1; } else if (str22.Split(new char[] { '|' })[0].Equals("10")) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 2; } else { str25 = str22.Split(new char[] { '|' })[1]; str26 = strArray5[1]; num5 = 1; } s = base.count_wsl(xzh, str15, double.Parse(amount), odds, str22).ToString(); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; } str30 = string.Format("{0:F1}", double.Parse(amount)); str31 = string.Format("{0:F1}", double.Parse(s)); str28 = (num5.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str29 = (num5.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str20) : str20; str27 = FunctionSix.GetWSLWT(odds_id, odds, str22); str22 = string.Format("<span class='lan'>{0}</span>@<b class='hong'>{1}</b><br /><span class='lan'>{2}</span>@<b class='hong'>{3}</b>", new object[] { str28, str25, str29, str26 }); length = i + 1; str18 = str18 + this.GetGroupHtmlTrue(length.ToString(), FunctionSix.GetWSLNameBySXid(this.px(xzh)) + str27, str22, str30, str31, null); } else { num5 = 1; str27 = FunctionSix.GetLMWT(odds_id, odds, str22); if (string.IsNullOrEmpty(str22)) { str22 = odds; } else { str22 = str22.Split(new char[] { '|' })[1]; } switch (play_id) { case "91016": case "91060": s = base.count_sqz(xzh, str10, double.Parse(amount), odds, str22).ToString(); break; case "91017": case "91061": s = base.count_sqr(xzh, str10, double.Parse(amount), odds, str22, ref num5).ToString(); break; case "91018": case "91062": s = base.count_rqz(xzh, str10, double.Parse(amount), odds, str22).ToString(); break; case "91019": case "91063": s = base.count_rzt(xzh, str10, str7, double.Parse(amount), odds, str22, ref num5).ToString(); break; case "91020": case "91064": s = base.count_tc(xzh, str10, str7, double.Parse(amount), odds, str22).ToString(); break; case "91040": case "91065": s = base.count_szy(xzh, zqh, double.Parse(amount), odds, str22).ToString(); break; case "91037": case "91047": case "91048": case "91049": case "91050": case "91051": s = base.count_wbz(xzh, zqh, double.Parse(amount), odds, str22).ToString(); break; } str30 = string.Format("{0:F1}", double.Parse(amount)); str31 = string.Format("{0:F1}", double.Parse(s)); string str32 = ""; if ("92638,92639,92640,92641,92642,92643".IndexOf(odds_id) > -1) { } if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; } if (strArray5.Length > 1) { str28 = (num5.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str29 = (num5.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str20) : str20; str22 = string.Format(str32 + "<span class='lan'>{0}</span>@<b class='hong'>{1}</b><br /><span class='lan'>{2}</span>@<b class='hong'>{3}</b>", new object[] { str28, str22.Split(new char[] { ',' })[0], str29, str22.Split(new char[] { ',' })[1] }); } else { str22 = string.Format(str32 + "<span class='lan'>{0}</span>@<b class='hong'>{1}</b>", str19, str22.Split(new char[] { ',' })[0]); } string str33 = null; if (strArray5.Length > 1) { str33 = string.Format("{0:F1}", double.Parse(str24)); num2 += double.Parse(str24); } length = i + 1; str18 = str18 + this.GetGroupHtmlTrue(length.ToString(), this.px(xzh).Replace(',', '、') + str27, str22, str30, str31, str33); } str18 = str18 + "</tr>"; } num2 = (num2 - (double.Parse(amount) * strArray3.Length)) + (double.Parse(amount) * num3); length = strArray3.Length; return(str18 + this.GetGroupHtmlTotalTrue(length.ToString(), string.Format("{0:F1}", double.Parse(amount) * strArray3.Length), string.Format("{0:F1}", num2), null)); }
public string GetBetGroupStringPaymentTrue(string phase_id, string play_id, string odds_id, string play_name, string bet_group, string bet_wt, string odds, string amount, double drawback) { cz_phase_six phaseModel = CallBLL.cz_phase_six_bll.GetPhaseModel(int.Parse(phase_id)); string str = phaseModel.get_n1(); string str2 = phaseModel.get_n2(); string str3 = phaseModel.get_n3(); string str4 = phaseModel.get_n4(); string str5 = phaseModel.get_n5(); string str6 = phaseModel.get_n6(); string str7 = phaseModel.get_sn(); string str8 = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6; string zqh = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6 + "," + str7; string str10 = str + "," + str2 + "," + str3 + "," + str4 + "," + str5 + "," + str6; string str11 = ""; string str12 = ""; string[] strArray = zqh.Split(new char[] { ',' }); string str13 = ""; foreach (string str14 in strArray) { str13 = base.GetZodiacNum(str14.Trim()).Trim(); str12 = str12 + str13 + ","; str13 = base.GetZodiacName(str14.Trim()).Trim(); str11 = str11 + str13 + ","; } string str15 = ""; string[] strArray2 = zqh.Split(new char[] { ',' }); int num = 0; string str16 = ""; foreach (string str17 in strArray2) { num = int.Parse(str17) % 10; if (num == 0) { str16 = "10"; } else { str16 = "0" + num.ToString(); } str15 = str15 + str16 + ","; } string str18 = ""; string[] strArray3 = bet_group.Split(new char[] { '~' }); string[] strArray4 = bet_wt.Split(new char[] { '~' }); string[] strArray5 = odds.Split(new char[] { ',' }); string str19 = play_name; string str20 = ""; switch (play_id) { case "91017": str20 = "中三"; this.isDoubleOdds = true; break; case "91019": str20 = "中二"; this.isDoubleOdds = true; break; case "91031": case "91032": case "91033": case "91058": str20 = "連" + base.get_YearLian(); this.isDoubleOdds = false; break; case "91034": case "91035": case "91036": case "91059": str20 = "連0"; this.isDoubleOdds = false; break; } this.isDoubleOdds = false; double num2 = 0.0; double num3 = 0.0; for (int i = 0; i < strArray3.Length; i++) { string str25; string str26; int num5; string str27; string str28; string str29; string str30; string str31; string xzh = strArray3[i]; string str22 = strArray4[i]; string s = "0"; if (((play_id.Equals("91031") || play_id.Equals("91032")) || play_id.Equals("91033")) || play_id.Equals("91058")) { str25 = ""; str26 = ""; num5 = 1; if (string.IsNullOrEmpty(str22)) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 1; } else if (str22.Split(new char[] { '|' })[0].Equals(base.get_YearLianID())) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 2; } else { str25 = str22.Split(new char[] { '|' })[1]; str26 = strArray5[1]; num5 = 1; } s = base.count_sxl(xzh, str12, double.Parse(amount), odds, str22).ToString(); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; str18 = str18 + "<tr class='tdbg' onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } else { str18 = str18 + "<tr onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } str27 = FunctionSix.GetSXLWT(odds_id, odds, str22, base.get_YearLianID()); str28 = (num5.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str29 = (num5.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str20) : str20; str22 = string.Format("<span class='blue'>{0}</span>@<b class='orange'>{1}</b><br /><span class='blue'>{2}</span>@<b class='orange'>{3}</b>", new object[] { str28, str25, str29, str26 }); str30 = string.Format("{0:F1}", double.Parse(amount)); str31 = string.Format("{0:F1}", double.Parse(s)); str18 = str18 + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3}</td><td align='right'>{4}</td>", new object[] { i + 1, ((double.Parse(s) > 0.0) ? ("<span style='font-weight:bold'>" + FunctionSix.GetSXLNameBySXid(this.px(xzh)) + "</span>") : FunctionSix.GetSXLNameBySXid(this.px(xzh))) + str27, str22, str30, str31 }); } else if (((play_id.Equals("91034") || play_id.Equals("91035")) || play_id.Equals("91036")) || play_id.Equals("91059")) { str25 = ""; str26 = ""; num5 = 1; if (string.IsNullOrEmpty(str22)) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 1; } else if (str22.Split(new char[] { '|' })[0].Equals("10")) { str25 = strArray5[0]; str26 = strArray5[1]; num5 = 2; } else { str25 = str22.Split(new char[] { '|' })[1]; str26 = strArray5[1]; num5 = 1; } s = base.count_wsl(xzh, str15, double.Parse(amount), odds, str22).ToString(); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; str18 = str18 + "<tr class='tdbg' onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } else { str18 = str18 + "<tr onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } str30 = string.Format("{0:F1}", double.Parse(amount)); str31 = string.Format("{0:F1}", double.Parse(s)); str28 = (num5.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str29 = (num5.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str20) : str20; str27 = FunctionSix.GetWSLWT(odds_id, odds, str22); str22 = string.Format("<span class='blue'>{0}</span>@<b class='orange'>{1}</b><br /><span class='blue'>{2}</span>@<b class='orange'>{3}</b>", new object[] { str28, str25, str29, str26 }); str18 = str18 + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3}</td><td align='right'>{4}</td>", new object[] { i + 1, ((double.Parse(s) > 0.0) ? ("<span style='font-weight:bold'>" + FunctionSix.GetWSLNameBySXid(this.px(xzh)) + "</span>") : FunctionSix.GetWSLNameBySXid(this.px(xzh))) + str27, str22, str30, str31 }); } else { num5 = 1; str27 = FunctionSix.GetLMWT(odds_id, odds, str22); if (string.IsNullOrEmpty(str22)) { str22 = odds; } else { str22 = str22.Split(new char[] { '|' })[1]; } switch (play_id) { case "91016": s = base.count_sqz(xzh, str10, double.Parse(amount), odds, str22).ToString(); break; case "91017": s = base.count_sqr(xzh, str10, double.Parse(amount), odds, str22, ref num5).ToString(); break; case "91018": s = base.count_rqz(xzh, str10, double.Parse(amount), odds, str22).ToString(); break; case "91019": s = base.count_rzt(xzh, str10, str7, double.Parse(amount), odds, str22, ref num5).ToString(); break; case "91020": s = base.count_tc(xzh, str10, str7, double.Parse(amount), odds, str22).ToString(); break; case "91040": s = base.count_szy(xzh, zqh, double.Parse(amount), odds, str22).ToString(); break; case "91037": case "91047": case "91048": case "91049": case "91050": case "91051": s = base.count_wbz(xzh, zqh, double.Parse(amount), odds, str22).ToString(); break; } str30 = string.Format("{0:F1}", double.Parse(amount)); str31 = string.Format("{0:F1}", double.Parse(s)); if (double.Parse(s) > 0.0) { num2 += double.Parse(s); num3++; str18 = str18 + "<tr class='tdbg' onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } else { str18 = str18 + "<tr onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">"; } if (strArray5.Length > 1) { str28 = (num5.Equals(1) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str19) : str19; str29 = (num5.Equals(2) && (double.Parse(s) > 0.0)) ? ("<span>▶ </span>" + str20) : str20; str22 = string.Format("<span class='blue'>{0}</span>@<b class='orange'>{1}</b><br /><span class='blue'>{2}</span>@<b class='orange'>{3}</b>", new object[] { str28, str22.Split(new char[] { ',' })[0], str29, str22.Split(new char[] { ',' })[1] }); } else { str22 = string.Format("<span class='blue'>{0}</span>@<b class='orange'>{1}</b>", str19, str22.Split(new char[] { ',' })[0]); } str18 = str18 + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3}</td><td align='right'>{4}</td>", new object[] { i + 1, ((double.Parse(s) > 0.0) ? ("<span style='font-weight:bold'>" + this.px(xzh).Replace(',', '、') + "</span>") : this.px(xzh).Replace(',', '、')) + str27, str22, str30, str31 }); } str18 = str18 + "</tr>"; } str18 = str18 + "<tr style='font-weight:bold'>"; num2 = (num2 - (double.Parse(amount) * strArray3.Length)) + (double.Parse(amount) * num3); return(str18 + string.Format("<th>{0}</th><th>{1}</th><th>{2}</th><th align='right'>{3} </th><th align='right'>{4} </th>", new object[] { "合計:", "共 " + strArray3.Length + " 組", "", string.Format("{0:F1}", double.Parse(amount) * strArray3.Length), string.Format("{0:F1}", num2) }) + "</tr>"); }