nuevas correciones
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using MieSystem.Models;
|
||||
using MieSystem.Data.Interfaces;
|
||||
using AspNetCoreGeneratedDocument;
|
||||
using MieSystem.Models;
|
||||
using MieSystem.Models.ViewModels;
|
||||
|
||||
namespace MieSystem.Controllers
|
||||
@@ -20,24 +17,14 @@ namespace MieSystem.Controllers
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
|
||||
_expedienteRepository = expedienteRepository;
|
||||
|
||||
// Datos de prueba iniciales
|
||||
/*if (_expedientes.Count == 0)
|
||||
{
|
||||
_ = InitializeTestData();
|
||||
}*/
|
||||
}
|
||||
|
||||
private async Task InitializeTestData()
|
||||
// GET: Expedientes
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
var today = DateTime.Today;
|
||||
var lst = await _expedienteRepository.GetAllAsync();
|
||||
_expedientes = [.. lst];
|
||||
}
|
||||
|
||||
// GET: Expedientes
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
@@ -45,7 +32,6 @@ namespace MieSystem.Controllers
|
||||
[HttpGet]
|
||||
public IActionResult GetDashboardStats()
|
||||
{
|
||||
_ = InitializeTestData();
|
||||
var totalNinos = _expedientes.Count;
|
||||
var mesActual = DateTime.Now.Month;
|
||||
|
||||
@@ -78,9 +64,6 @@ namespace MieSystem.Controllers
|
||||
[HttpGet]
|
||||
public IActionResult GetExpedientes(int page = 1, int pageSize = 10)
|
||||
{
|
||||
if (_expedientes.Count == 0)
|
||||
_ = InitializeTestData();
|
||||
|
||||
var query = _expedientes
|
||||
.Where(e => e.Activo)
|
||||
.OrderBy(e => e.Apellidos)
|
||||
@@ -122,7 +105,6 @@ namespace MieSystem.Controllers
|
||||
|
||||
// POST: Expedientes/Create
|
||||
[HttpPost]
|
||||
// [ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(ExpedienteViewModel model)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user