50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Logging;
|
|
using Sarand.Net.Standard.Base.Utils;
|
|
using Saxonite.Net.Core.Web.Admin.Models;
|
|
using Saxonite.Net.Core.Web.Base.App;
|
|
using Saxonite.Net.Core.Web.Base.Controllers;
|
|
using Saxonite.Net.Standard.Base.Bus;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Saxonite.Net.Core.Web.Admin.Controllers
|
|
{
|
|
//=======================================================================
|
|
public partial class UserController : SaxController_Admin
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
public UserController(SaxLocaliser localiser, ILogger<HomeController> logger) :
|
|
base(localiser, logger)
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
[HttpGet]
|
|
public IActionResult Index(String sta)
|
|
{
|
|
// Validate session.
|
|
if (!ValidUserSession)
|
|
return RedirectToAction("", "");
|
|
|
|
// Paging.
|
|
Model_User model = new Model_User(Localiser);
|
|
model.Paging.PageNo = 1;
|
|
model.Paging.PageLength = 12;
|
|
|
|
// Default status.
|
|
if (sta.StartsWithCI("Awa"))
|
|
model.Filter.UserStatusCategoryCode = nameof(SaxUserAccount.StatusCat.AwaitingOnly);
|
|
|
|
return View(model);
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|