PaymentForm.cs 657 B

123456789101112131415161718192021222324
  1. using Microsoft.AspNetCore.Mvc;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace LotteryWebApp.Components
  7. {
  8. public class PaymentFormModel
  9. {
  10. public String data { get; set; }
  11. public string ticketType { get; set; }
  12. }
  13. public class PaymentForm : ViewComponent
  14. {
  15. public async Task<IViewComponentResult> InvokeAsync(String data, String ticketType)
  16. {
  17. PaymentFormModel model = new PaymentFormModel();
  18. model.data = data;
  19. model.ticketType = ticketType;
  20. return View("PaymentForm", model);
  21. }
  22. }
  23. }