Example #1
0
        public int SaveTicket(ref TicketWS ticket, User user)
        {
            if (ticket != null && ticket.bets != null && ticket.bets.Length > 0 && ticket.bets[0] != null && (ticket.ticketTyp == Ticket.TICKET_TYP_BOTH || ticket.ticketTyp == Ticket.TICKET_TYP_LIVEBET))
            {
                if (ticket.bets[0].betType == Bet.BET_TYPE_SINGLE)
                {
                    Thread.Sleep(StationRepository.SngLiveBetTicketAcceptTime);
                }
                else
                {
                    Thread.Sleep(StationRepository.CombiLiveBetTicketAcceptTime);
                }
            }

            return(TicketSaveHandler.SaveTicket(ticket, StationRepository.StationNumber, false, user));
        }
Example #2
0
        public int StoreTicket(User user, ref TicketWS ticket, Ticket newTicket, string pin)
        {
            ticket = CreateNewTicketWS(newTicket);

            if (ticket != null && ticket.bets != null && ticket.bets.Length > 0 && ticket.bets[0] != null && newTicket.TipItems.ToSyncList().Any(x => x.IsLiveBet))
            {
                if (ticket.bets[0].betType == Bet.BET_TYPE_SINGLE)
                {
                    Thread.Sleep(StationRepository.SngLiveBetTicketAcceptTime);
                }
                else
                {
                    Thread.Sleep(StationRepository.CombiLiveBetTicketAcceptTime);
                }
            }

            TicketSaveHandler th = new TicketSaveHandler();
            var saveRet          = th.StoreTicket(user, ticket, StationRepository.StationNumber, false, pin, newTicket.TipItems.ToSyncList().Any(x => x.IsLiveBet));

            return(saveRet);
        }