TicketHistory.cs 686 B

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