CalMonthServices.cs 767 B

12345678910111213141516171819202122232425262728
  1. using Blazored.LocalStorage;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Net.Http;
  6. using System.Net.Http.Json;
  7. using System.Threading.Tasks;
  8. using wispro.sp.entity;
  9. namespace wispro.sp.web.Services
  10. {
  11. public class CalMonthServices
  12. {
  13. private readonly HttpClient _httpClient;
  14. private readonly ILocalStorageService _localStorageService;
  15. public CalMonthServices(HttpClient httpClient)
  16. {
  17. _httpClient = httpClient;
  18. }
  19. public async Task<CalMonth> GetHandlingMonth()
  20. {
  21. var data = await _httpClient.GetFromJsonAsync<CalMonth>($"http://localhost:39476/api/CalMonth/GetHandlingMonth");
  22. return data;
  23. }
  24. }
  25. }