Exemplo n.º 1
0
 private void MoneyCount_Tick(object sender, EventArgs e)
 {
     Coins.Text     = "Money = " + Money.ToString("c");
     Stack.Text     = "Money = " + Money1.ToString("c");
     Stash.Text     = "Money = " + Money2.ToString("c");
     MoneyTree.Text = "Money = " + Money3.ToString("c");
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="row">投注信息</param>
        /// <param name="LotteryNumber">期号</param>
        /// <param name="sqlCommand"></param>
        /// <returns></returns>
        public static bool Checking(DataRow row, string LotteryNumber, SqlCommand sqlCommand)
        {
            try
            {
                if (Convert.ToInt32(row["State"]) != 0)
                {
                    return(true);
                }
                int     int32_1    = Convert.ToInt32(row["Id"]);
                string  ssId       = row["SsId"].ToString();
                int     int32_2    = Convert.ToInt32(row["UserId"]);
                int     int32_3    = Convert.ToInt32(row["LotteryId"]);
                int     int32_4    = Convert.ToInt32(row["PlayId"]);
                int     int32_5    = Convert.ToInt32(row["Num"]);
                string  str1       = row["IssueNum"].ToString();
                string  betDetail2 = BetDetailDAL.GetBetDetail2(Convert.ToDateTime(row["STime2"]).ToString("yyyyMMdd"), int32_2.ToString(), int32_1.ToString());
                Decimal num1       = Convert.ToDecimal(row["Total"]);
                Decimal num2       = Convert.ToDecimal(row["point"]);
                Decimal num3       = Convert.ToDecimal(row["PointMoney"]);
                Decimal num4       = Convert.ToDecimal(row["Bonus"]);
                Decimal num5       = Convert.ToDecimal(row["Times"]);
                Decimal num6       = Convert.ToDecimal(row["SingleMoney"]);
                string  Pos        = row["Pos"].ToString();
                string  sType      = row["PlayCode"].ToString();
                Convert.ToInt32(row["IsCheat"]);
                Convert.ToInt32(row["IsDelay"]);
                int      int32_6   = Convert.ToInt32(row["ZhId"]);
                string   STime2    = row["STime"].ToString();
                string[] strArray1 = LotteryNumber.Split(',');

                if (sType.Equals("P_5QJ3"))
                {
                    string[] strArray2 = betDetail2.Split(',');
                    if (strArray2[0].IndexOf(CheckOperation.ReplaceStr(strArray1[0])) == -1 || strArray2[1].IndexOf(CheckOperation.ReplaceStr(strArray1[1])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_5QJ3'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_5QJ3", "P_5QJ3_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_5QJ3", "P_5QJ3_1");
                    }
                }

                if (sType.Equals("P_4QJ3"))
                {
                    if (betDetail2.Split(',')[0].IndexOf(CheckOperation.ReplaceStr(strArray1[1])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_4QJ3'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_4QJ3", "P_4QJ3_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_4QJ3", "P_4QJ3_1");
                    }
                }

                if (sType.Equals("P_3QJ2_L"))
                {
                    if (betDetail2.Split(',')[0].IndexOf(CheckOperation.ReplaceStr(strArray1[0])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_3QJ2_L'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_3QJ2_L", "P_3QJ2_L_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_3QJ2_L", "P_3QJ2_L_1");
                    }
                }

                if (sType.Equals("P_3QJ2_R"))
                {
                    if (betDetail2.Split(',')[0].IndexOf(CheckOperation.ReplaceStr(strArray1[2])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_3QJ2_R'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_3QJ2_R", "P_3QJ2_R_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_3QJ2_R", "P_3QJ2_R_1");
                    }
                }

                if (sType.Equals("P_5QW3"))
                {
                    string[] strArray2 = betDetail2.Split(',');
                    if (strArray2[0].IndexOf(CheckOperation.ReplaceDX(strArray1[0])) == -1 || strArray2[1].IndexOf(CheckOperation.ReplaceDX(strArray1[1])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_5QW3'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_5QW3", "P_5QW3_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_5QW3", "P_5QW3_1");
                    }
                }

                if (sType.Equals("P_4QW3"))
                {
                    if (betDetail2.Split(',')[0].IndexOf(CheckOperation.ReplaceDX(strArray1[1])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_4QW3'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_4QW3", "P_4QW3_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_4QW3", "P_4QW3_1");
                    }
                }

                if (sType.Equals("P_3QW2_L"))
                {
                    if (betDetail2.Split(',')[0].IndexOf(CheckOperation.ReplaceDX(strArray1[0])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_3QW2_L'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_3QW2_L", "P_3QW2_L_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_3QW2_L", "P_3QW2_L_1");
                    }
                }

                if (sType.Equals("P_3QW2_R"))
                {
                    if (betDetail2.Split(',')[0].IndexOf(CheckOperation.ReplaceDX(strArray1[2])) == -1)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = "select MinBonus2+20*PosBonus2*(0.1*(SELECT top 1 [Point] FROM [N_User] where Id=" + (object)int32_2 + ")-" + (object)num2 + ") from Sys_PlaySmallType where title2='P_3QW2_R'";
                        num4  = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                        sType = sType.Replace("P_3QW2_R", "P_3QW2_R_2");
                    }
                    else
                    {
                        sType = sType.Replace("P_3QW2_R", "P_3QW2_R_1");
                    }
                }

                if (sType.Equals("P_3ZBD_L"))
                {
                    if (strArray1[0] == strArray1[1] || strArray1[1] == strArray1[2] || strArray1[0] == strArray1[2])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[0] != strArray1[1] && strArray1[1] != strArray1[2] && strArray1[0] != strArray1[2])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("P_3ZBD_C"))
                {
                    if (strArray1[1] == strArray1[2] || strArray1[2] == strArray1[3] || strArray1[1] == strArray1[3])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[1] != strArray1[2] && strArray1[2] != strArray1[3] && strArray1[1] != strArray1[3])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("P_3ZBD_R"))
                {
                    if (strArray1[2] == strArray1[3] || strArray1[3] == strArray1[4] || strArray1[2] == strArray1[4])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[2] != strArray1[3] && strArray1[3] != strArray1[4] && strArray1[2] != strArray1[4])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_WQB"))
                {
                    if (strArray1[0] == strArray1[1] || strArray1[1] == strArray1[2] || strArray1[0] == strArray1[2])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[0] != strArray1[1] && strArray1[1] != strArray1[2] && strArray1[0] != strArray1[2])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_WQS"))
                {
                    if (strArray1[0] == strArray1[1] || strArray1[1] == strArray1[3] || strArray1[0] == strArray1[3])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[0] != strArray1[1] && strArray1[1] != strArray1[3] && strArray1[0] != strArray1[3])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_WQG"))
                {
                    if (strArray1[0] == strArray1[1] || strArray1[1] == strArray1[4] || strArray1[0] == strArray1[4])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[0] != strArray1[1] && strArray1[1] != strArray1[4] && strArray1[0] != strArray1[4])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_WBS"))
                {
                    if (strArray1[0] == strArray1[2] || strArray1[2] == strArray1[3] || strArray1[0] == strArray1[3])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[0] != strArray1[2] && strArray1[2] != strArray1[3] && strArray1[0] != strArray1[3])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_WBG"))
                {
                    if (strArray1[0] == strArray1[2] || strArray1[2] == strArray1[4] || strArray1[0] == strArray1[4])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[0] != strArray1[2] && strArray1[2] != strArray1[4] && strArray1[0] != strArray1[4])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_WSG"))
                {
                    if (strArray1[0] == strArray1[3] || strArray1[3] == strArray1[4] || strArray1[0] == strArray1[4])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[0] != strArray1[3] && strArray1[3] != strArray1[4] && strArray1[0] != strArray1[4])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_QBS"))
                {
                    if (strArray1[1] == strArray1[2] || strArray1[2] == strArray1[3] || strArray1[1] == strArray1[3])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[1] != strArray1[2] && strArray1[2] != strArray1[3] && strArray1[1] != strArray1[3])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_QBG"))
                {
                    if (strArray1[1] == strArray1[2] || strArray1[2] == strArray1[4] || strArray1[1] == strArray1[4])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[1] != strArray1[2] && strArray1[2] != strArray1[4] && strArray1[1] != strArray1[4])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_QSG"))
                {
                    if (strArray1[1] == strArray1[3] || strArray1[3] == strArray1[4] || strArray1[1] == strArray1[4])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[1] != strArray1[3] && strArray1[3] != strArray1[4] && strArray1[1] != strArray1[4])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("R_3ZBD_BSG"))
                {
                    if (strArray1[2] == strArray1[3] || strArray1[3] == strArray1[4] || strArray1[2] == strArray1[4])
                    {
                        sType = sType.Replace("3ZBD", "3ZBDZ3");
                    }
                    if (strArray1[2] != strArray1[3] && strArray1[3] != strArray1[4] && strArray1[2] != strArray1[4])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3ZBD", "3ZBDZ6");
                    }
                }

                if (sType.Equals("P_3ZHE_L") && strArray1[0] != strArray1[1] && (strArray1[0] != strArray1[2] && strArray1[1] != strArray1[2]))
                {
                    num4 /= new Decimal(2);
                }

                if (sType.Equals("P_3ZHE_C") && strArray1[1] != strArray1[2] && (strArray1[2] != strArray1[3] && strArray1[1] != strArray1[3]))
                {
                    num4 /= new Decimal(2);
                }

                if (sType.Equals("P_3ZHE_R") && strArray1[0] != strArray1[1] && (strArray1[1] != strArray1[2] && strArray1[0] != strArray1[2]))
                {
                    num4 /= new Decimal(2);
                }

                if (sType.Equals("P_3HX_L"))
                {
                    if (strArray1[0] == strArray1[1] || strArray1[1] == strArray1[2] || strArray1[0] == strArray1[2])
                    {
                        sType = sType.Replace("3HX", "3Z3_2");
                    }
                    if (strArray1[0] != strArray1[1] && strArray1[0] != strArray1[2] && strArray1[1] != strArray1[2])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3HX", "3Z6_2");
                    }
                }

                if (sType.Equals("P_3HX_C"))
                {
                    if (strArray1[1] == strArray1[2] || strArray1[2] == strArray1[3] || strArray1[1] == strArray1[3])
                    {
                        sType = sType.Replace("3HX", "3Z3_2");
                    }
                    if (strArray1[1] != strArray1[2] && strArray1[2] != strArray1[3] && strArray1[1] != strArray1[3])
                    {
                        num4 /= new Decimal(2);
                        sType = sType.Replace("3HX", "3Z6_2");
                    }
                }

                if (sType.Equals("P_3HX_R"))
                {
                    if (strArray1.Length == 3)
                    {
                        if (strArray1[0] == strArray1[1] || strArray1[1] == strArray1[2] || strArray1[0] == strArray1[2])
                        {
                            sType = sType.Replace("3HX", "3Z3_2");
                        }
                        if (strArray1[0] != strArray1[1] && strArray1[1] != strArray1[2] && strArray1[0] != strArray1[2])
                        {
                            num4 /= new Decimal(2);
                            sType = sType.Replace("3HX", "3Z6_2");
                        }
                    }
                    else
                    {
                        if (strArray1[2] == strArray1[3] || strArray1[3] == strArray1[4] || strArray1[2] == strArray1[4])
                        {
                            sType = sType.Replace("3HX", "3Z3_2");
                        }
                        if (strArray1[2] != strArray1[3] && strArray1[3] != strArray1[4] && strArray1[2] != strArray1[4])
                        {
                            num4 /= new Decimal(2);
                            sType = sType.Replace("3HX", "3Z6_2");
                        }
                    }
                }

                if (sType.Contains("R_3HX"))
                {
                    if (strArray1.Length == 3)
                    {
                        if (strArray1[0] == strArray1[1] || strArray1[1] == strArray1[2] || strArray1[0] == strArray1[2])
                        {
                            sType = sType.Replace("3HX", "3Z3_2");
                        }
                        if (strArray1[0] != strArray1[1] && strArray1[1] != strArray1[2] && strArray1[0] != strArray1[2])
                        {
                            num4 /= new Decimal(2);
                            sType = sType.Replace("3HX", "3Z6_2");
                        }
                    }
                    else
                    {
                        if (sType.Equals("R_3HX_WQB") && strArray1[0] != strArray1[1] && (strArray1[1] != strArray1[2] && strArray1[0] != strArray1[2]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_WQS") && strArray1[0] != strArray1[1] && (strArray1[1] != strArray1[3] && strArray1[0] != strArray1[3]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_WQG") && strArray1[0] != strArray1[1] && (strArray1[1] != strArray1[4] && strArray1[0] != strArray1[4]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_WBS") && strArray1[0] != strArray1[2] && (strArray1[2] != strArray1[3] && strArray1[0] != strArray1[3]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_WBG") && strArray1[0] != strArray1[2] && (strArray1[2] != strArray1[4] && strArray1[0] != strArray1[4]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_WSG") && strArray1[0] != strArray1[3] && (strArray1[3] != strArray1[4] && strArray1[0] != strArray1[4]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_QBS") && strArray1[1] != strArray1[2] && (strArray1[2] != strArray1[3] && strArray1[1] != strArray1[3]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_QBG") && strArray1[1] != strArray1[2] && (strArray1[2] != strArray1[4] && strArray1[1] != strArray1[4]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_QSG") && strArray1[1] != strArray1[3] && (strArray1[3] != strArray1[4] && strArray1[1] != strArray1[4]))
                        {
                            num4 /= new Decimal(2);
                        }
                        if (sType.Equals("R_3HX_BSG") && strArray1[2] != strArray1[3] && (strArray1[3] != strArray1[4] && strArray1[2] != strArray1[4]))
                        {
                            num4 /= new Decimal(2);
                        }
                    }
                }

                if (sType.Contains("R_3ZHE"))
                {
                    if (sType.Equals("R_3ZHE_WQB") && strArray1[0] != strArray1[1] && (strArray1[1] != strArray1[2] && strArray1[0] != strArray1[2]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_WQS") && strArray1[0] != strArray1[1] && (strArray1[1] != strArray1[3] && strArray1[0] != strArray1[3]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_WQG") && strArray1[0] != strArray1[1] && (strArray1[1] != strArray1[4] && strArray1[0] != strArray1[4]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_WBS") && strArray1[0] != strArray1[2] && (strArray1[2] != strArray1[3] && strArray1[0] != strArray1[3]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_WBG") && strArray1[0] != strArray1[2] && (strArray1[2] != strArray1[4] && strArray1[0] != strArray1[4]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_WSG") && strArray1[0] != strArray1[3] && (strArray1[3] != strArray1[4] && strArray1[0] != strArray1[4]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_QBS") && strArray1[1] != strArray1[2] && (strArray1[2] != strArray1[3] && strArray1[1] != strArray1[3]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_QBG") && strArray1[1] != strArray1[2] && (strArray1[2] != strArray1[4] && strArray1[1] != strArray1[4]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_QSG") && strArray1[1] != strArray1[3] && (strArray1[3] != strArray1[4] && strArray1[1] != strArray1[4]))
                    {
                        num4 /= new Decimal(2);
                    }
                    if (sType.Equals("R_3ZHE_BSG") && strArray1[2] != strArray1[3] && (strArray1[3] != strArray1[4] && strArray1[2] != strArray1[4]))
                    {
                        num4 /= new Decimal(2);
                    }
                }

                int num7 = 0;
                int num8 = 0;

                if (sType.Equals("P_LHH_WQ"))
                {
                    num7 = Convert.ToInt32(strArray1[0]);
                    num8 = Convert.ToInt32(strArray1[1]);
                }

                if (sType.Equals("P_LHH_WB"))
                {
                    num7 = Convert.ToInt32(strArray1[0]);
                    num8 = Convert.ToInt32(strArray1[2]);
                }

                if (sType.Equals("P_LHH_WS"))
                {
                    num7 = Convert.ToInt32(strArray1[0]);
                    num8 = Convert.ToInt32(strArray1[3]);
                }

                if (sType.Equals("P_LHH_WG"))
                {
                    num7 = Convert.ToInt32(strArray1[0]);
                    num8 = Convert.ToInt32(strArray1[4]);
                }

                if (sType.Equals("P_LHH_QB"))
                {
                    num7 = Convert.ToInt32(strArray1[1]);
                    num8 = Convert.ToInt32(strArray1[2]);
                }

                if (sType.Equals("P_LHH_QS"))
                {
                    num7 = Convert.ToInt32(strArray1[1]);
                    num8 = Convert.ToInt32(strArray1[3]);
                }

                if (sType.Equals("P_LHH_QG"))
                {
                    num7 = Convert.ToInt32(strArray1[1]);
                    num8 = Convert.ToInt32(strArray1[4]);
                }

                if (sType.Equals("P_LHH_BS"))
                {
                    num7 = Convert.ToInt32(strArray1[2]);
                    num8 = Convert.ToInt32(strArray1[3]);
                }

                if (sType.Equals("P_LHH_BG"))
                {
                    num7 = Convert.ToInt32(strArray1[2]);
                    num8 = Convert.ToInt32(strArray1[4]);
                }

                if (sType.Equals("P_LHH_SG"))
                {
                    num7 = Convert.ToInt32(strArray1[3]);
                    num8 = Convert.ToInt32(strArray1[4]);
                }

                if (num7 != num8)
                {
                    num4 = Convert.ToDecimal(num4 / Convert.ToDecimal(4.5));
                }

                int num9 = CheckPlay.Check(LotteryNumber, betDetail2, Pos, sType);

                Decimal Money1 = num3 * num5;
                int     num10;
                Decimal Money2;
                if (num9 > 0)
                {
                    num10  = 3;
                    Money2 = num4 * num5 * (Decimal)num9 * num6 / new Decimal(2);
                    Decimal num11 = new Decimal(200000);
                    if (Money2 > num11)
                    {
                        Money2 = num11;
                    }
                    sqlCommand.CommandType = CommandType.Text;
                    sqlCommand.CommandText = "select top 1 MinNum from Sys_PlaySmallType where Id=" + (object)int32_4;
                    Decimal num12 = Convert.ToDecimal(sqlCommand.ExecuteScalar().ToString());
                    if (num12 == new Decimal(0))
                    {
                        if (Money2 > num1 * num5 * new Decimal(100))
                        {
                            Decimal num13 = new Decimal(18000);
                            if (Money2 > num13)
                            {
                                Money2 = num13;
                            }
                        }
                    }
                    else if ((Decimal)int32_5 < num12)
                    {
                        Decimal num13 = new Decimal(18000);
                        if (Money2 > num13)
                        {
                            Money2 = num13;
                        }
                    }
                }
                else
                {
                    num10  = 2;
                    Money2 = new Decimal(0);
                }
                Decimal num14 = Money2 + Money1 - num1 * num5;
                sqlCommand.CommandType = CommandType.Text;
                sqlCommand.CommandText = "update N_UserBet set State=" + num10.ToString() + ",WinNum=" + num9.ToString() + ",WinBonus=" + Money2.ToString() + ",RealGet=" + num14.ToString() + " where Id=" + int32_1.ToString();
                sqlCommand.ExecuteNonQuery();
                if (Money2 > new Decimal(0))
                {
                    new UserTotalTran().MoneyOpers(ssId, int32_2.ToString(), Money2, int32_3, int32_4, int32_1, 5, 99, "", "", "奖金派发", STime2);
                }
                if (Money1 > new Decimal(0))
                {
                    new UserTotalTran().MoneyOpers(ssId, int32_2.ToString(), Money1, int32_3, int32_4, int32_1, 4, 99, "", "", "返点派发", STime2);
                }
                if (int32_6 != 0)
                {
                    string str2 = string.Format(" where LotteryId={0} and state=0 and zhid={1} and IssueNum>'{2}'", (object)int32_3, (object)int32_6, (object)str1);
                    sqlCommand.CommandType = CommandType.Text;
                    sqlCommand.CommandText = "select count(Id) from N_UserBet" + str2;
                    if (Convert.ToInt32(sqlCommand.ExecuteScalar()) > 0 && num9 > 0)
                    {
                        sqlCommand.CommandType = CommandType.Text;
                        sqlCommand.CommandText = string.Format("select count(Id) from N_UserZhBet with(nolock) where isstop=1 and Id={0}", (object)int32_6);
                        if (Convert.ToInt32(sqlCommand.ExecuteScalar()) > 0)
                        {
                            sqlCommand.CommandType = CommandType.Text;
                            sqlCommand.CommandText = "select isnull(sum(Total*Times),0) from N_UserBet " + str2;
                            Decimal Money3 = Convert.ToDecimal(string.Concat(sqlCommand.ExecuteScalar()));
                            sqlCommand.CommandType = CommandType.Text;
                            sqlCommand.CommandText = "update N_UserBet set State=1 " + str2;
                            sqlCommand.ExecuteNonQuery();
                            new UserTotalTran().MoneyOpers(ssId, int32_2.ToString(), Money3, int32_3, int32_4, int32_1, 6, 99, "", "", "终止追号", STime2);
                        }
                    }
                }
                return(true);
            }
            catch (Exception ex)
            {
                new LogExceptionDAL().Save("程序异常", "派奖过程中出现异常:" + ex.Message);
                return(false);
            }
        }