Ejemplo n.º 1
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============================================================");
 }
Ejemplo n.º 2
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;
        }