/// <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("", ticket.TransId.ToString(), "","", ticket.RefNo, "");" }; 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; }
protected override void BuildBetType(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData) { if (Template.BetType == null) { return; } Template.BetType.betTypeName = ticketHelper.GetBetTypeNameById(ticket.BetTypeId); }
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; }
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); }
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 }; }
protected override void BuildBetType(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData) { var parentBetTypeId = ticketHelper.GetParentIdByBetTypeId(ticket.BetTypeId); Template.BetType.betTypeName = ticketHelper.GetBetTypeNameById(parentBetTypeId); }
protected override void BuildBetType(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData) { Template.BetType.betTypeName = ticketHelper.GetBetTypeNameById(ticket.BetTypeId, ticket.BetId); }
protected virtual string GetBetTypeName(int betTypeId, ITicketHelper ticketHelper) { return ticketHelper.GetBetTypeNameById(betTypeId); }
private string BuildBetTypeName(int betTypeId, ITicketHelper ticketHelper) { var betTypeName = ticketHelper.GetBetTypeNameById(betTypeId); return string.Format("{0}{1}{2}", OpenBetTypeNameTag, betTypeName, CloseBetTypeNameTag); }
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; }