Example #1
0
        /// <summary>
        /// This Method Represents Delete ticket cancellation by booking
        /// </summary>
        static void DeleteTicketCancellation()
        {
            TicketCancellation tc = new TicketCancellation();

            Console.Write("Enter Existing booking id to Delete ticket cancellation ");
            _ticketCancellationBusinessLogicLayer.DeleteTicketCancellation(tc);
            Console.WriteLine("The ticket cancellation is Deleted Successfully \n");
        }
        /// <summary>
        /// This Method Represents AddTicketCancellation
        /// </summary>
        /// <param name="bookingID"></param>

        public void AddTicketCancellations(TicketCancellation bookingID)
        {
            if (TicketCancellation.bookingID != null)
            {
                tcdal.AddTicketCancellations(bookingID);
            }
            else
            {
                throw new Exception("bookingId can't be null");
            }
        }
Example #3
0
        public async Task <ActionResult> Cancel()
        {
            var queueName    = _configuration["TicketCancellationQueueName"].ToString();
            var sendEndpoint = await _sendEndpointProvider.GetSendEndpoint(new Uri(queueName));

            var cancel = new TicketCancellation {
                TicketId = Guid.NewGuid(), CancellationId = Guid.NewGuid()
            };

            await sendEndpoint.Send <TicketCancellation>(cancel);

            return(Ok(cancel));
        }
 //methods to add ticket cancellation
 public void AddTicketCancellations(TicketCancellation bookingId)
 {
     if (_cancellationID.Exists(temp => temp.CustomerID == bookingId.CustomerID))
     {
         bookingId.CancellationID = bookingId.CustomerID + 45;
         _cancellationID.Add(bookingId);
     }
     else
     {
         //throws exception that booking id doesnot exist
         throw new Exception("bookingId doesnot exists");
     }
 }
Example #5
0
        /// <summary>
        /// This Method Represents Update ticket cancellation
        /// </summary>
        static void UpdateTicketCancellation()
        {
            TicketCancellation tc = new TicketCancellation();

            Console.Write("Enter Existing booking id: ");
            tc.BookingID = int.Parse(ReadLine());

            Console.Write("Enter existing customer id");
            tc.CustomerID = int.Parse(ReadLine());

            _ticketCancellationBusinessLogicLayer.UpdateTicketCancellations(tc);
            Console.WriteLine("The cancellation of ticket is Updated Successfully \n");
        }
Example #6
0
        /// <summary>
        /// This Method Represents add ticket cancellation
        /// </summary>
        static void AddTicketCancellation()
        {
            TicketCancellation tc = new TicketCancellation();

            Console.Write("Enter booking id: ");
            tc.BookingID = int.Parse(ReadLine());

            Console.Write("Enter customer id ");
            tc.CustomerID = int.Parse(ReadLine());

            _ticketCancellationBusinessLogicLayer.AddTicketCancellations(tc);

            Console.WriteLine("The details of ticket cancellation  is Successfully Added \n");
        }
 public void UpdateTicketCancellations(TicketCancellation tc)
 {
     throw new NotImplementedException();
 }