private string BuildGameName(ITicket ticket, ITicketHelper ticketHelper)
        {
            string gameName = ticketHelper.GetResourceData("MG_Casino", ticket.TransDesc);
            string markups = string.Format("{0} {1}{2}", OpenGameNameTag, gameName, CloseGameNameTag);

            return markups;
        }
        protected override void BuildChoice(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            base.BuildChoice(ticket, ticketHelper, ticketData);
            var betTypeName = GetBetTypeName(ticket.BetTypeId, ticketHelper);

            var ticketDetails = GetTicketReference(ticket, ticketData);
            var choiceDetails = string.Format("<div id='parlay_{0}' style='display:none;'>", ticket.RefNo);

            if (ticketDetails.Count > 0 && IsNotRunningTicket(ticket))
            {
                int count = 1;
                foreach (var ticketDetail in ticketDetails)
                {
                    var odds = ConvertByBetType.Odds(ticketDetail.Odds, ticket.BetTypeId, ticket.OddsType);
                    var betTeam = string.Format(BetTeamFormat, ticketHelper.GetResourceData(GetResourceId(), ticketDetail.BetTeam), odds);
                    var league = string.Format(LeagueFormat, ticketHelper.GetSportNameById(ticket.SportTypeId), betTypeName, GetBetChoice(ticketDetail.TransDesc));

                    choiceDetails += string.Format("<div class='ticketList'>{0}{1}</div>", betTeam, league);
                    if (count++ < ticketDetails.Count)
                    {
                        choiceDetails += "<div class='line'></div>";
                    }
                }
            }
            else
            {
                choiceDetails += string.Format("<div class='no-details'>{0}</div>", CoreBetList.ThereIsNoTicketDetailAvailable);
            }

            choiceDetails += "</div>";
            Template.League.SetValue(Template.League.ToString() + choiceDetails);
        }
        public override List<IRichTextString> RenderRTF(
            ITicket ticket,
            ITicketHelper ticketHelper,
            List<ITicketData> ticketData,
            bool isShowScoreMap,
            RTFHelper rtfHelper)
        {
            Render(ticket, ticketHelper, ticketData, isShowScoreMap);
            RTFHelper tmpRtfHelper = rtfHelper.Clone();

            var betTypeName = GetBetTypeName(ticket.BetTypeId, ticketHelper);
            tmpRtfHelper.RTFRenderer.AddText(string.Format("{0} {1}", Template.League.sportTypeName, betTypeName));

            var ticketDetails = GetTicketReference(ticket, ticketData);
            foreach (var ticketDetail in ticketDetails)
            {
                var odds = ConvertByBetType.Odds(ticketDetail.Odds, ticket.BetTypeId, ticket.OddsType);
                var betTeam = ticketHelper.GetResourceData(GetResourceId(), ticketDetail.BetTeam);
                var league = string.Format("{0} {1} {2}", ticketHelper.GetSportNameById(ticket.SportTypeId), betTypeName, GetBetChoice(ticketDetail.TransDesc));

                tmpRtfHelper.RTFRenderer.AddText("\n");
                tmpRtfHelper.RTFRenderer.AddText(string.Format("{0} @ {1}", betTeam, odds), rtfHelper.PosFont);
                tmpRtfHelper.RTFRenderer.AddText("\n");
                tmpRtfHelper.RTFRenderer.AddText(league, rtfHelper.NormalFont);
            }

            var choice = tmpRtfHelper.RTFRenderer.Render();
            tmpRtfHelper.RTFRenderer.Clear();
            return new List<IRichTextString>() { choice };
        }
        protected override void BuildLeague(ITicket ticket, ITicketHelper ticketHelper)
        {
            if (Template.League == null || Template.League.LeagueName == null)
            {
                return;
            }

            Template.League.LeagueName.leagueName = ticketHelper.GetResourceData(GameGroupRefId, ticket.TransDesc);

            if (string.IsNullOrEmpty(ticket.BetCheck))
            {
                Template.League.Append(BuildShowRnGBetsDetails(ticket));
            }
        }
        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var betChoice = ticketHelper.GetResourceData(GameTypeRefId, ticket.TransDesc);

            if (!string.IsNullOrEmpty(betChoice))
            {
                betChoice = BetTypeOpenTag + betChoice + BetTypeCloseTag;
            }

            if (!string.IsNullOrEmpty(ticket.BetCheck))
            {
                betChoice += ticket.BetCheck;
            }

            Template.betTeam = betChoice;
        }
        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var bettypeTime = GetBetTypeTime(ticket);

            if (string.IsNullOrWhiteSpace(bettypeTime))
            {
                Template.betTeam = string.Empty;

                return;
            }

            var betTeamName = ticketHelper.GetResourceData(GetResourceId(), GetBetChoice(ticket));
            var bettypeTimes = bettypeTime.Split(',');
            var teamName = ticketHelper.GetTeamNameById(bettypeTimes[0]);

            Template.betTeam = string.Format("{0} {1} {2}%", teamName, betTeamName, bettypeTimes[1]);
        }
        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            if (ticket == null || ticketHelper == null)
            {
                return;
            }

            Template.Handicap = null;
            base.BuildBetTeam(ticket, ticketHelper, ticketData);

            var transDescData = ParseTransDesc(ticket.TransDesc);

            if (transDescData.ContainsKey(BetChoiceKey))
            {
                var betChoice = transDescData[BetChoiceKey];

                Template.betTeam = ticketHelper.GetResourceData(ResourceId, betChoice);
            }
        }
 protected override string GetBetTeamName(ITicketData ticketData, ITicketHelper ticketHelper)
 {
     return ticketHelper.GetResourceData(GetResourceId(), ticketData.BetTeam);
 }
 protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
 {
     Template.betTeam = ticketHelper.GetResourceData(GetResourceId(), GetBetChoice(ticket));
 }
 protected virtual string GetBetChoiceName(ITicketHelper ticketHelper, int betTypeId, Dictionary<string, string> transDecsParsed)
 {
     return ticketHelper.GetResourceData(BetTypeRefIdNames[betTypeId], transDecsParsed[BetChoiceDataName]);
 }
        private string GetRoomAndTable(ITicket ticket, ITicketHelper ticketHelper)
        {
            var transDecsParsed = DeserializeTransDesc(ticket.TransDesc.ToUpper());

            var roomAndName = string.Empty;

            if (transDecsParsed.ContainsKey(RoundName))
            {
                roomAndName += ticketHelper.GetResourceData("AG_Room", transDecsParsed[RoundName]) + " ";
            }

            if (transDecsParsed.ContainsKey(TableCodeName))
            {
                roomAndName += transDecsParsed[TableCodeName];
            }

            return roomAndName;
        }