コード例 #1
0
        /// <summary>
        /// Renders the specified ticket.
        /// </summary>
        /// <param name="ticket">The ticket.</param>
        /// <param name="ticketHelper">The ticket helper.</param>
        /// <param name="ticketData">The ticket data.</param>
        /// <param name="isShowScoreMap">If set to <c>true</c> [is show score map].</param>
        /// <returns>Choice_Template object.</returns>
        public override Choice_Template Render(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData, bool isShowScoreMap)
        {
            string betTypeName = ticketHelper.GetBetTypeNameById(ticket.BetTypeId);
            string clientMixParlayDetailFunction;
            string[] components;

            if (string.IsNullOrWhiteSpace(ticketHelper.ClientMixParlaySubbetsDetailFunction))
            {
                components = new string[] { "javascript:showMP(&quot;", ticket.TransId.ToString(), "&quot;,&quot;", ticket.RefNo, "&quot;);" };
                clientMixParlayDetailFunction = string.Join(null, components);
            }
            else
            {
                clientMixParlayDetailFunction = ticketHelper.ClientMixParlaySubbetsDetailFunction;
            }

            components = new string[]
                            {
                                "<a id=\"hidden0\" href=\"",
                                clientMixParlayDetailFunction,
                                "\">",
                                betTypeName,
                                "</a>",
                                "<br/><br/>",
                                "<div id=\"divEvent_",
                                ticket.TransId.ToString(),
                                "\" style=\"display: none\" ></div>"
                            };

            string mixParlay = string.Join(null, components);

            Template.SetValue(mixParlay);

            return Template;
        }
コード例 #2
0
        protected override void BuildBetType(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            if (Template.BetType == null)
            {
                return;
            }

            Template.BetType.betTypeName = ticketHelper.GetBetTypeNameById(ticket.BetTypeId);
        }
コード例 #3
0
        public static string BuildColossusBetsTransactionType(int betTypeId, decimal cashOutPercent, ITicketHelper ticketHelper)
        {
            var betTypeName = ticketHelper.GetBetTypeNameById(betTypeId);

            if (betTypeId == CashOutBetTypeId
                && cashOutPercent > 0)
            {
                return string.Join(string.Empty, new string[] { betTypeName, " ", Formatter.DecFormat(cashOutPercent * 100, 0), "%" });
            }

            return betTypeName;
        }
コード例 #4
0
        protected override void BuildChoice(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            string betTypeName = ticketHelper.GetBetTypeNameById(ticket.BetTypeId);
            string custid = ticket.CustId.ToString();
            string showColosussBetsDetailsHtml = BuildShowColossusBetsDetails(
                ticket.RefNo,
                ticket.WinlostDate.ToString(),
                ticket.TransId.ToString(),
                custid,
                ticket.BetCheck);

            string colosussBetsHtml = BuildColossusBetsHtml(betTypeName, showColosussBetsDetailsHtml);

            Template.SetValue(colosussBetsHtml);
        }
コード例 #5
0
        public override List<IRichTextString> RenderRTF(
            ITicket ticket, 
            ITicketHelper ticketHelper, 
            List<ITicketData> ticketData, 
            bool isShowScoreMap, 
            RTFHelper rtfHelper)
        {
            RTFHelper tmpRtfHelper = rtfHelper.Clone();

            string betTypeName = ticketHelper.GetBetTypeNameById(ticket.BetTypeId);
            tmpRtfHelper.RTFRenderer.AddText(betTypeName, tmpRtfHelper.PosFont);

            var choice = tmpRtfHelper.RTFRenderer.Render();
            tmpRtfHelper.RTFRenderer.Clear();

            return new List<IRichTextString>() { choice };
        }
コード例 #6
0
        protected override void BuildBetType(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var parentBetTypeId = ticketHelper.GetParentIdByBetTypeId(ticket.BetTypeId);

            Template.BetType.betTypeName = ticketHelper.GetBetTypeNameById(parentBetTypeId);
        }
コード例 #7
0
 protected override void BuildBetType(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
 {
     Template.BetType.betTypeName = ticketHelper.GetBetTypeNameById(ticket.BetTypeId, ticket.BetId);
 }
コード例 #8
0
 protected virtual string GetBetTypeName(int betTypeId, ITicketHelper ticketHelper)
 {
     return ticketHelper.GetBetTypeNameById(betTypeId);
 }
コード例 #9
0
        private string BuildBetTypeName(int betTypeId, ITicketHelper ticketHelper)
        {
            var betTypeName = ticketHelper.GetBetTypeNameById(betTypeId);

            return string.Format("{0}{1}{2}", OpenBetTypeNameTag, betTypeName, CloseBetTypeNameTag);
        }
コード例 #10
0
        protected override void BuildSport(ITicket ticket, ITicketHelper ticketHelper)
        {
            string kenoLeagueInfo = string.Join(null, new string[] { ticketHelper.GetBetTypeNameById(ticket.BetTypeId), " [", ticket.MatchId.ToString(), "]" });

            Template.League.LeagueName.leagueName = kenoLeagueInfo;
        }