//Creates new tickt numbers
 public IActionResult GenerateTickets()
 {
     if (ModelState.IsValid)
     {
         int             TotalNumEntries = 100;
         GenerateTickets NewTickets      = new GenerateTickets();
         NewTickets.Generate(TotalNumEntries);
         return(RedirectToAction(nameof(Index)));
     }
     return(View());
 }
예제 #2
0
 public async Task <IActionResult> GenerateTickets()
 {
     /* Handles requrest to generate new Entries and ticket ID numbers
      * Creates an object of the type NewTickets and calls its function generate new entries and Ticket ID
      * Returns the user to the index scene
      */
     if (ModelState.IsValid)
     {
         int             TotalNumEntries = 100;
         GenerateTickets NewTickets      = new GenerateTickets();
         NewTickets.Generate(TotalNumEntries);
         return(RedirectToAction(nameof(Index)));
     }
     return(View());
 }
예제 #3
0
 public PipelineBuilder(
     SendEmail sendEmail,
     SaveChanges saveChanges,
     RegisterUser registerUser,
     ScheduleTaskToBuyReturnTicket scheduleTaskToBuyReturnTicket,
     NotifySlack notifySlack,
     GenerateTickets generateTickets,
     GenerateEmail generateEmail,
     CardinityPayment creditCardPayment,
     PayPalPayment payPalPayment)
 {
     //keeping short for brevity
     _sendEmail    = sendEmail;
     _saveChanges  = saveChanges;
     _registerUser = registerUser;
     _scheduleTaskToBuyReturnTicket = scheduleTaskToBuyReturnTicket;
     _notifySlack       = notifySlack;
     _generateTickets   = generateTickets;
     _generateEmail     = generateEmail;
     _creditCardPayment = creditCardPayment;
     _payPalPayment     = payPalPayment;
 }