Example #1
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)
    {
        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));
    }
Example #2
0
    public string GetBetGroupStringPaymentFalse(string play_id, string odds_id, string play_name, string bet_group, string bet_wt, string odds, string amount)
    {
        int    length;
        string str = "";

        string[] strArray  = bet_group.Split(new char[] { '~' });
        string[] strArray2 = bet_wt.Split(new char[] { '~' });
        string[] strArray3 = odds.Split(new char[] { ',' });
        string   str2      = play_name;
        string   str3      = "";

        switch (play_id)
        {
        case "91017":
        case "91061":
            str3 = "中三";
            break;

        case "91019":
        case "91063":
            str3 = "中二";
            break;

        case "91031":
        case "91032":
        case "91033":
        case "91058":
            str3 = "連" + base.get_YearLian();
            break;

        case "91034":
        case "91035":
        case "91036":
        case "91059":
            str3 = "連0";
            break;
        }
        double num  = 0.0;
        double num2 = 0.0;

        for (int i = 0; i < strArray.Length; i++)
        {
            string str8;
            string str9;
            string str10;
            string str11;
            string str12;
            double num5;
            string str4 = strArray[i];
            string str5 = strArray2[i];
            string s    = "0";
            string str7 = "0";
            if (((play_id.Equals("91031") || play_id.Equals("91032")) || play_id.Equals("91033")) || play_id.Equals("91058"))
            {
                str8 = "";
                str9 = "";
                if (string.IsNullOrEmpty(str5))
                {
                    str8 = strArray3[0];
                    str9 = strArray3[1];
                    num5 = double.Parse(str8) * double.Parse(amount);
                    s    = num5.ToString();
                }
                else if (str5.Split(new char[] { '|' })[0].Equals(base.get_YearLianID()))
                {
                    str8 = strArray3[0];
                    str9 = strArray3[1];
                    num5 = double.Parse(str9) * double.Parse(amount);
                    s    = num5.ToString();
                }
                else
                {
                    str8 = str5.Split(new char[] { '|' })[1];
                    str9 = strArray3[1];
                    num5 = double.Parse(str8) * double.Parse(amount);
                    s    = num5.ToString();
                }
                num5   = double.Parse(s) - double.Parse(amount);
                s      = num5.ToString();
                str10  = FunctionSix.GetSXLWT(odds_id, odds, str5, base.get_YearLianID());
                str11  = string.Format("{0:F1}", double.Parse(amount));
                str12  = string.Format("{0:F1}", double.Parse(s));
                num   += double.Parse(str12);
                str5   = 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[] { str2, str8, str3, str9 });
                length = i + 1;
                str    = str + this.GetGroupHtml(length.ToString(), FunctionSix.GetSXLNameBySXid(this.px(str4)) + str10, str5, str11, str12, null);
            }
            else if (((play_id.Equals("91034") || play_id.Equals("91035")) || play_id.Equals("91036")) || play_id.Equals("91059"))
            {
                str8 = "";
                str9 = "";
                if (string.IsNullOrEmpty(str5))
                {
                    str8 = strArray3[0];
                    str9 = strArray3[1];
                    num5 = double.Parse(str8) * double.Parse(amount);
                    s    = num5.ToString();
                }
                else if (str5.Split(new char[] { '|' })[0].Equals("10"))
                {
                    str8 = strArray3[0];
                    str9 = strArray3[1];
                    num5 = double.Parse(str9) * double.Parse(amount);
                    s    = num5.ToString();
                }
                else
                {
                    str8 = str5.Split(new char[] { '|' })[1];
                    str9 = strArray3[1];
                    num5 = double.Parse(str8) * double.Parse(amount);
                    s    = num5.ToString();
                }
                num5   = double.Parse(s) - double.Parse(amount);
                s      = num5.ToString();
                str10  = FunctionSix.GetWSLWT(odds_id, odds, str5);
                str11  = string.Format("{0:F1}", double.Parse(amount));
                str12  = string.Format("{0:F1}", double.Parse(s));
                num   += double.Parse(str12);
                str5   = 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[] { str2, str8, str3, str9 });
                length = i + 1;
                str    = str + this.GetGroupHtml(length.ToString(), FunctionSix.GetWSLNameBySXid(this.px(str4)) + str10, str5, str11, str12, null);
            }
            else
            {
                str10 = FunctionSix.GetLMWT(odds_id, odds, str5);
                string str13 = "";
                if ("92638,92639,92640,92641,92642,92643".IndexOf(odds_id) > -1)
                {
                }
                if (string.IsNullOrEmpty(str5))
                {
                    str5 = odds;
                }
                else
                {
                    str5 = str5.Split(new char[] { '|' })[1];
                }
                num5 = double.Parse(str5.Split(new char[] { ',' })[0]) * double.Parse(amount);
                num5 = double.Parse(num5.ToString()) - double.Parse(amount);
                s    = num5.ToString();
                if (strArray3.Length > 1)
                {
                    num5 = double.Parse(str5.Split(new char[] { ',' })[1]) * double.Parse(amount);
                    str7 = (double.Parse(num5.ToString()) - double.Parse(amount)).ToString();
                    str5 = string.Format(str13 + "<span  class='lan'>{0}</span>@<b class='hong'>{1}</b><br /><span  class='lan'>{2}</span>@<b class='hong'>{3}</b>", new object[] { str2, str5.Split(new char[] { ',' })[0], str3, str5.Split(new char[] { ',' })[1] });
                }
                else
                {
                    str5 = string.Format(str13 + "<span  class='lan'>{0}</span>@<b class='hong'>{1}</b>", str2, str5.Split(new char[] { ',' })[0]);
                }
                str11 = string.Format("{0:F1}", double.Parse(amount));
                str12 = string.Format("{0:F1}", double.Parse(s));
                num  += double.Parse(str12);
                string str14 = null;
                if (strArray3.Length > 1)
                {
                    str14 = string.Format("{0:F1}", double.Parse(str7));
                    num2 += double.Parse(str14);
                }
                length = i + 1;
                str    = str + this.GetGroupHtml(length.ToString(), this.px(str4).Replace(',', '、') + str10, str5, str11, str12, str14);
            }
        }
        string str15 = null;

        if (num2 > 0.0)
        {
            str15 = string.Format("{0:F1}", num2);
        }
        length = strArray.Length;
        return(str + this.GetGroupHtmlTotal(length.ToString(), string.Format("{0:F1}", double.Parse(amount) * strArray.Length), string.Format("{0:F1}", num), str15));
    }
Example #3
0
        public string GetBetGroupStringPaymentFalse(string play_id, string odds_id, string play_name, string bet_group, string bet_wt, string odds, string amount, double rate, string hyAmount)
        {
            string str = "";

            string[] strArray  = bet_group.Split(new char[] { '~' });
            string[] strArray2 = bet_wt.Split(new char[] { '~' });
            string[] strArray3 = odds.Split(new char[] { ',' });
            string   str2      = play_name;
            string   str3      = "";
            double   num       = 0.0;
            double   num2      = 0.0;

            amount = (double.Parse(amount) * rate).ToString();
            switch (play_id)
            {
            case "91017":
            case "91061":
                str3 = "中三";
                this.isDoubleOdds = true;
                break;

            case "91019":
            case "91063":
                str3 = "中二";
                this.isDoubleOdds = true;
                break;

            case "91031":
            case "91032":
            case "91033":
            case "91058":
                str3 = "連" + base.get_YearLian();
                this.isDoubleOdds = false;
                break;

            case "91034":
            case "91035":
            case "91036":
            case "91059":
                str3 = "連0";
                this.isDoubleOdds = false;
                break;
            }
            for (int i = 0; i < strArray.Length; i++)
            {
                str = str + "<tr onMouseOut=\"this.style.backgroundColor=''\" onMouseOver=\"this.style.backgroundColor='#FFFFA2'\">";
                string str4 = strArray[i];
                string str5 = strArray2[i];
                string s    = "0";
                string str7 = "0";
                if ((play_id.Equals("91031") || play_id.Equals("91032")) || (play_id.Equals("91033") || play_id.Equals("91058")))
                {
                    string str8 = "";
                    string str9 = "";
                    if (string.IsNullOrEmpty(str5))
                    {
                        str8 = strArray3[0];
                        str9 = strArray3[1];
                        s    = ((double.Parse(str8) * double.Parse(amount)) - double.Parse(amount)).ToString();
                    }
                    else if (str5.Split(new char[] { '|' })[0].Equals(base.get_YearLianID()))
                    {
                        str8 = strArray3[0];
                        str9 = strArray3[1];
                        s    = ((double.Parse(str9) * double.Parse(amount)) - double.Parse(amount)).ToString();
                    }
                    else
                    {
                        str8 = str5.Split(new char[] { '|' })[1];
                        str9 = strArray3[1];
                        s    = ((double.Parse(str8) * double.Parse(amount)) - double.Parse(amount)).ToString();
                    }
                    num += double.Parse(s);
                    string str10 = FunctionSix.GetSXLWT(odds_id, odds, str5, base.get_YearLianID());
                    str5 = 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[] { str2, str8, str3, str9 });
                    str  = str + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3}&nbsp;</td><td align='right'>{4}&nbsp;</td><td align='right'>{5}&nbsp;</td>", new object[] { i + 1, FunctionSix.GetSXLNameBySXid(this.px(str4)) + str10, str5, string.Format("{0:F1}", double.Parse(hyAmount)), string.Format("{0:F1}", double.Parse(amount)), "-" + string.Format("{0:F1}", double.Parse(s)) });
                }
                else if ((play_id.Equals("91034") || play_id.Equals("91035")) || (play_id.Equals("91036") || play_id.Equals("91059")))
                {
                    string str11 = "";
                    string str12 = "";
                    if (string.IsNullOrEmpty(str5))
                    {
                        str11 = strArray3[0];
                        str12 = strArray3[1];
                        s     = ((double.Parse(str11) * double.Parse(amount)) - double.Parse(amount)).ToString();
                    }
                    else if (str5.Split(new char[] { '|' })[0].Equals("10"))
                    {
                        str11 = strArray3[0];
                        str12 = strArray3[1];
                        s     = ((double.Parse(str12) * double.Parse(amount)) - double.Parse(amount)).ToString();
                    }
                    else
                    {
                        str11 = str5.Split(new char[] { '|' })[1];
                        str12 = strArray3[1];
                        s     = ((double.Parse(str11) * double.Parse(amount)) - double.Parse(amount)).ToString();
                    }
                    string str13 = FunctionSix.GetWSLWT(odds_id, odds, str5);
                    num += double.Parse(s);
                    str5 = 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[] { str2, str11, str3, str12 });
                    str  = str + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3}&nbsp;</td><td align='right'>{4}&nbsp;</td><td align='right'>{5}&nbsp;</td>", new object[] { i + 1, FunctionSix.GetWSLNameBySXid(this.px(str4)) + str13, str5, string.Format("{0:F1}", double.Parse(hyAmount)), string.Format("{0:F1}", double.Parse(amount)), "-" + string.Format("{0:F1}", double.Parse(s)) });
                }
                else
                {
                    string str14 = FunctionSix.GetLMWT(odds_id, odds, str5);
                    string str15 = "";
                    "92638,92639,92640,92641,92642,92643".IndexOf(odds_id);
                    if (string.IsNullOrEmpty(str5))
                    {
                        str5 = odds;
                    }
                    else
                    {
                        str5 = str5.Split(new char[] { '|' })[1];
                    }
                    s    = ((double.Parse(str5.Split(new char[] { ',' })[0]) * double.Parse(amount)) - double.Parse(amount)).ToString();
                    num += double.Parse(s);
                    if (strArray3.Length > 1)
                    {
                        str7  = ((double.Parse(str5.Split(new char[] { ',' })[1]) * double.Parse(amount)) - double.Parse(amount)).ToString();
                        num2 += double.Parse(str7);
                        str5  = string.Format(str15 + "<span  class='blue'>{0}</span>@<b class='red'>{1}</b><br /><span  class='blue'>{2}</span>@<b class='red'>{3}</b>", new object[] { str2, str5.Split(new char[] { ',' })[0], str3, str5.Split(new char[] { ',' })[1] });
                    }
                    else
                    {
                        str5 = string.Format(str15 + "<span  class='blue'>{0}</span>@<b class='red'>{1}</b>", str2, str5.Split(new char[] { ',' })[0]);
                    }
                    str = str + string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td align='right'>{3}&nbsp;</td><td align='right'>{4}&nbsp;</td><td align='right'>{5}&nbsp;</td>", new object[] { i + 1, this.px(str4).Replace(',', '、') + str14, str5, string.Format("{0:F1}", double.Parse(hyAmount)), string.Format("{0:F1}", double.Parse(amount)), "-" + string.Format("{0:F1}", double.Parse(s)) });
                    if (strArray3.Length > 1)
                    {
                        str = str + string.Format("<td align='right'>{0}&nbsp;</td>", "-" + string.Format("{0:F1}", double.Parse(str7)));
                    }
                }
                str = str + "</tr>";
            }
            str = str + "<tr  style='font-weight:bold'>" + string.Format("<th>{0}</th><th>{1}</th><th>{2}</th><th align='right'>{3}&nbsp;</th><th align='right'>{4}&nbsp;</th><th align='right'>{5}&nbsp;</th>", new object[] { "合計", "共 " + strArray.Length + " 組", "", string.Format("{0:F1}", double.Parse(hyAmount) * strArray.Length), string.Format("{0:F1}", double.Parse(amount) * strArray.Length), "-" + string.Format("{0:F1}", num) });
            if (this.isDoubleOdds)
            {
                str = str + string.Format("<th align='right'>{0}&nbsp;</th>", "-" + string.Format("{0:F1}", num2));
            }
            return(str + "</tr>");
        }
Example #4
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 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}&nbsp;</td><td align='right'>{4}&nbsp;</td><td align='right' " + str30 + ">{5}&nbsp;</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}&nbsp;</td><td align='right'>{4}&nbsp;</td><td align='right' " + str38 + ">{5}&nbsp;</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}&nbsp;</td><td align='right'>{4}&nbsp;</td><td align='right' " + str45 + ">{5}&nbsp;</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}&nbsp;</th><th align='right'>{4}&nbsp;</th><th align='right'>{5}&nbsp;</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>");
        }
Example #5
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}&nbsp;</th><th align='right'>{4}&nbsp;</th>", new object[] { "合計:", "共 " + strArray3.Length + " 組", "", string.Format("{0:F1}", double.Parse(amount) * strArray3.Length), string.Format("{0:F1}", num2) }) + "</tr>");
        }