using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading.Tasks; using EveryThing.Data; using EveryThing.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; namespace EveryThing.Pages { [Authorize] public class IndexModel : PageModel { private readonly ILogger _logger; private readonly ApplicationDbContext _context; private readonly UserManager _userManager; private readonly SignInManager _loginManager; private readonly RoleManager _roleManager; public IndexModel(ApplicationDbContext context, UserManager userManager, SignInManager loginManager, RoleManager roleManager) { _context = context; _userManager = userManager; _loginManager = loginManager; _roleManager = roleManager; } public string Year { get; set; } public IActionResult OnGet(string year) { //_logger.LogInformation("Index"); Year = year; Year ??= DateTime.Now.Year.ToString(); ViewData["Years"] = new SelectList(Enumerable.Range(2022, (DateTime.Now.Year - 2022) + 2)); return Page(); } public IActionResult OnGetData(int year) { return new JsonResult(new { data = new List(), error = "", successful = true }); } } }