コード例 #1
0
        /// <summary>
        /// Render the match block.
        /// </summary>
        /// <param name="rowBlock">Row block.</param>
        /// <param name="serial">Serial ID.</param>
        protected void RenderMatchBlock(SystemParlayDetail_Contents_Block rowBlock, long serial)
        {
            rowBlock.Match.Clear();
            var serialDataInOneDay = _serialList.Where(d => d.Serial == serial).ToList();
            if (serialDataInOneDay.Count == 0)
            {
                rowBlock.Match.SetValue(CoreBetList.losingtickets);
                return;
            }

            foreach (var serialData in serialDataInOneDay)
            {
                var matchBlock = new SystemParlayDetail_Contents_Match_Block();
                matchBlock.HomeTeam = _ticketHelper.GetTeamNameById(serialData.HomeId);
                matchBlock.AwayTeam = _ticketHelper.GetTeamNameById(serialData.AwayId);
                rowBlock.Match.Append(matchBlock);
            }
        }
コード例 #2
0
        /// <summary>
        /// Renders the empty row in case have no data.
        /// </summary>
        protected void RenderEmptyRowInCaseHaveNoData()
        {
            if (_ticketList.Count > 0)
            {
                return;
            }

            var emptycontent = new SystemParlayDetail_Contents_Block
            {
                Stake = string.Empty,
                Winloss = string.Empty,
                WinlossDate = new SystemParlayDetail_Contents_WinlossDate_Block { WinlossDate = string.Empty },
                Odds = string.Empty,
                Status = string.Empty,
                PlayerCommission = null
            };

            emptycontent.Match.Hide();
            _template.Contents.Append(emptycontent);
        }
コード例 #3
0
        /// <summary>
        /// Renders the event.
        /// </summary>
        /// <param name="dataInDate">The data in date.</param>
        /// <param name="eventOrderInDay">The event order in day.</param>
        protected void RenderEvent(List<ISystemParlayTicket> dataInDate, int eventOrderInDay)
        {
            var dataInRow = dataInDate[eventOrderInDay];
            var rowBlock = new SystemParlayDetail_Contents_Block();

            rowBlock.WinlossDate.RowSpan = dataInDate.Count.ToString();
            rowBlock.WinlossDate.WinlossDate = string.Format("{0:MM/dd/yyyy}", dataInRow.WinLostDate);
            rowBlock.WinlossDate.Visible = eventOrderInDay == 0;
            rowBlock.Status = GetBetListStatusName(dataInRow.StatusId);
            rowBlock.Winloss = Formatter.HighlightNegativeNumber(dataInRow.WinLost);
            rowBlock.Odds = dataInRow.MOdds == 0 ? "-" : Formatter.HighlightNegativeNumber(dataInRow.MOdds);
            rowBlock.Stake = Formatter.DecFormat(dataInRow.Stake, 2);
            rowBlock.PlayerCommission.Visible = _ticketHelper.ShowSystemParlayPlayerComm;
            rowBlock.PlayerCommission.PlayerCommission = Formatter.DecFormat(dataInRow.PlayerComm, 2);

            // Event
            RenderMatchBlock(rowBlock, dataInRow.Serial);

            _template.Contents.Append(rowBlock);
        }