Exemplo n.º 1
0
        private List <string> GetFlightFromRedis(int clnId, int flightNum)
        {
            List <string> redisData = new List <string>();

            ClientUtil clnUt = new ClientUtil();
            FlightUtil flUt  = new FlightUtil();

            redisData.Add(flUt.GetFlightFromAirport(flightNum));
            redisData.Add(flUt.GetFlightToAirport(flightNum));
            redisData.Add(flUt.GetFlightCost(flightNum).ToString());
            redisData.Add(flUt.GetFlightOrderAmount(flightNum, clnId).ToString());

            return(redisData);
        }
Exemplo n.º 2
0
        private List <string> GetClnFromRedis(int clnId, int flightNum)
        {
            List <string> redisData = new List <string>();

            string username = "";
            string email    = "";

            ClientUtil clnUt = new ClientUtil();
            FlightUtil flUt  = new FlightUtil();

            clnUt.GetClientInfo(clnId, out username, out email);
            redisData.Add(username);
            redisData.Add(email);
            redisData.Add(flUt.GetFlightOrderAmount(flightNum, clnId).ToString());

            return(redisData);
        }
Exemplo n.º 3
0
        private void buttonMore_Click(object sender, EventArgs e)
        {
            FlightUtil flightUt = new FlightUtil();

            if ((ticketsAmount < ticketsMaxAmount && isOrderOrCancelation == true) || (ticketsAmount < flightUt.GetFlightOrderAmount(flightId, clnId)))
            {
                ticketsAmount++;
                ticketsCost  += oneTicketCost;
                labelSum.Text = ticketsCost.ToString() + " EUR";
            }
            textBoxPassAmount.Text = ticketsAmount.ToString();
        }