예제 #1
0
        public static string GenerateDetailedMatchInfo(MatchNew new1, MatchBetNew new3, MatchBetNew new2, EnumCollection.eBetTarget target1, string text1, string text2)
        {
            string str4 = "";
            string str3 = "";
            double num = 0.0;
            switch (target1)
            {
                case EnumCollection.eBetTarget.FT_Home:
                    str3 = new1.get_FTHDP();
                    str4 = new1.get_FT_AwayOddsString();
                    num = new1.get_FTHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.FT_Away:
                    str3 = new1.get_FTHDP();
                    str4 = new1.get_FT_HomeOddsString();
                    num = new1.get_FTHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.FT_Over:
                    str3 = new1.get_FTOU();
                    str4 = new1.get_FT_UnderOddsString();
                    num = new1.get_FTOU_Commission();
                    break;

                case EnumCollection.eBetTarget.FT_Under:
                    str3 = new1.get_FTOU();
                    str4 = new1.get_FT_OverOddsString();
                    num = new1.get_FTOU_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Home:
                    str3 = new1.get_HalfHDP();
                    str4 = new1.get_Half_AwayOddsString();
                    num = new1.get_HalfHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Away:
                    str3 = new1.get_HalfHDP();
                    str4 = new1.get_Half_HomeOddsString();
                    num = new1.get_HalfHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Over:
                    str3 = new1.get_HalfOU();
                    str4 = new1.get_Half_UnderOddsString();
                    num = new1.get_HalfOU_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Under:
                    str3 = new1.get_HalfOU();
                    str4 = new1.get_Half_OverOddsString();
                    num = new1.get_HalfOU_Commission();
                    num = new1.get_HalfOU_Commission();
                    break;
            }
            return ("\r\n============================================================\r\n" + text1 + "\r\n============================================================\r\nLeague: " + new2.get_League() + "\r\nHome: " + new3.get_HomeName() + "\r\nAway: " + new3.get_AwayName() + "\r\nBet: " + new3.get_SelectedMatch() + "\r\nHDP: " + new3.get_HDP() + "\r\nOdd: " + new3.get_OddsString() + "\r\nNew HDP: " + new2.get_HDP() + "\r\nNew Odd: " + new2.get_OddsString() + "\r\n" + text2 + " HDP: " + str3 + "\r\n" + text2 + " Opponent Odd: " + str4 + "\r\n" + text2 + " Commission: " + num.ToString() + "\r\nAmount: " + new2.get_BetAmount() + "\r\n============================================================");
        }
예제 #2
0
 public static string GenerateDetailedMatchInfo(MatchBetNew new2, MatchBetNew new1, string text1, string text2)
 {
     return ("\r\n============================================================\r\n" + text1 + "\r\n============================================================\r\nLeague: " + new1.get_League() + "\r\nHome: " + new2.get_HomeName() + "\r\nAway: " + new2.get_AwayName() + "\r\nBet: " + new2.get_SelectedMatch() + "\r\n" + text2 + " HDP: " + new2.get_HDP() + "\r\n" + text2 + " Odd: " + new2.get_OddsString() + "\r\nNew HDP: " + new1.get_HDP() + "\r\nNew Odd: " + new1.get_OddsString() + "\r\nAmount: " + new1.get_BetAmount() + "\r\n============================================================");
 }
예제 #3
0
        /// <summary>
        /// 保存Player下注信息
        /// </summary>
        /// <param name="matchBetNew">新的下注</param>
        /// <returns>保存是否成功</returns>
        public static bool SavePlayerBetInfo(PlayerBet playerBet, MatchBetNew matchBetNew)
        {
            bool isSuccess = false;
            try
            {
                playerBet.Ghost = GetGhostByGhostName(matchBetNew.get_MemberName(), matchBetNew.get_Company());
                playerBet.Player = GetPlayerByPlayerName(playerBet.Player.LoginName);
                playerBet.MatchId = matchBetNew.getMatchID();
                playerBet.LeagueName = matchBetNew.get_League();
                playerBet.SelectedMatch = matchBetNew.get_SelectedMatch();
                playerBet.MatchType = matchBetNew.get_MatchType();
                playerBet.HomeName = matchBetNew.get_HomeName();
                playerBet.AwayName = matchBetNew.get_AwayName();
                playerBet.MatchDate = matchBetNew.get_MatchDate();
                playerBet.betTime = matchBetNew.get_BetDate();
                playerBet.BetCoverage = System.Convert.ToString(matchBetNew.get_BetCoverage());
                playerBet.BetType = System.Convert.ToString(matchBetNew.get_BetType());
                playerBet.Status = System.Convert.ToString(matchBetNew.get_RunningStatus()) + "<br/>" + matchBetNew.get_IPAddress();
                playerBet.SportType = System.Convert.ToString(matchBetNew.get_SportType());
                if (string.IsNullOrEmpty(matchBetNew.HDPValue))
                {
                    matchBetNew.HDPValue = "0.0";
                }
                playerBet.HDP = Double.Parse(matchBetNew.HDPValue);
                playerBet.Odds = matchBetNew.get_Odds();
                playerBet.OddsType = System.Convert.ToString(matchBetNew.get_OddsType());
                playerBet.Amount = int.Parse(matchBetNew.get_BetAmount());
                playerBet.WinValue = 0;
                playerBet.IsOutstanding = true;

                // 创建下注数据访问对象
                BetService ghostBetService = new BetService();
                isSuccess = ghostBetService.AddPlayerBetInfo(playerBet);
            }
            catch (Exception e)
            {

                throw;
            }

            return isSuccess;
        }
예제 #4
0
 public static string GenerateDetailedMatchInfo(MatchBetNew new1, string text1)
 {
     return ("\r\n============================================================\r\n" + text1 + "\r\n============================================================\r\nCompany: " + new1.get_Company() + "\r\nRef ID: " + new1.get_ID() + "\r\nMember: " + new1.get_MemberName() + "\r\nBetType: " + new1.get_BetType().ToString() + "\r\nGameType: " + new1.get_GameType().ToString() + "\r\nMatchTime: " + new1.get_MatchDate() + "\r\nScore: " + new1.get_HomeScore().ToString() + "-" + Conversions.ToString(new1.get_AwayScore()) + "\r\nLeague: " + new1.get_League() + "\r\nHome: " + new1.get_HomeName() + "\r\nAway: " + new1.get_AwayName() + "\r\nBet: " + new1.get_SelectedMatch() + "\r\nHDP: " + new1.get_HDP() + "\r\nOdds: " + Conversions.ToString(new1.get_Odds()) + "\r\nAmount: " + new1.get_BetAmount() + "\r\n============================================================");
 }
예제 #5
0
        /// <summary>
        /// 保存Ghost下注信息
        /// </summary>
        /// <param name="matchBetNew">新的下注</param>
        /// <returns>保存是否成功</returns>
        public static bool SaveGhostBetInfo(MatchBetNew matchBetNew)
        {
            bool isSuccess = false;
            try
            {
                // 创建gosht下注对象
                GhostBet ghostBet = new GhostBet();
                Ghost ghost = GetGhostByGhostName(matchBetNew.get_MemberName(), matchBetNew.get_Company());
                ghostBet.Ghost = ghost;
                ghostBet.MatchId = matchBetNew.getMatchID();
                ghostBet.LeagueName = matchBetNew.get_League();
                ghostBet.SelectedMatch = matchBetNew.get_SelectedMatch();
                ghostBet.MatchType = matchBetNew.get_MatchType();
                ghostBet.HomeName = matchBetNew.get_HomeName();
                ghostBet.AwayName = matchBetNew.get_AwayName();
                ghostBet.betTime = matchBetNew.get_BetDate();
                ghostBet.BetCoverage = System.Convert.ToString(matchBetNew.get_BetCoverage());
                ghostBet.BetType = System.Convert.ToString(matchBetNew.get_BetType());
                ghostBet.Status = System.Convert.ToString(matchBetNew.get_RunningStatus()) + "<br/>" + matchBetNew.get_IPAddress();
                ghostBet.SportType = System.Convert.ToString(matchBetNew.get_SportType());
                if (string.IsNullOrEmpty(matchBetNew.HDPValue))
                {
                    matchBetNew.HDPValue = "0.0";
                }
                ghostBet.HDP = float.Parse(matchBetNew.HDPValue);
                ghostBet.Odds = (float)matchBetNew.get_Odds();
                ghostBet.Amount = int.Parse(matchBetNew.get_BetAmount());
                ghostBet.WinValue = 0;
                ghostBet.IsOutstanding = true;

                // 创建下注数据访问对象
                BetService ghostBetService = new BetService();
                isSuccess = ghostBetService.AddGhostBetInfo(ghostBet);
            }
            catch (Exception e)
            {

            }

            return isSuccess;
        }