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 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 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 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"); } }
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>"); }