84 lines
2.4 KiB
C#
84 lines
2.4 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Logging;
|
|
using Sarand.Net.Standard.Base.Bus;
|
|
using Sarand.Net.Standard.Base.Core;
|
|
using Sarand.Net.Standard.Base.Dbas;
|
|
using Sarand.Net.Standard.Base.Utils;
|
|
using Saxonite.Net.Core.Web.Base.App;
|
|
using Saxonite.Net.Core.Web.Online.Models;
|
|
using Saxonite.Net.Standard.Base.App;
|
|
using Saxonite.Net.Standard.Base.Bus;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Saxonite.Net.Core.Web.Online.Controllers
|
|
{
|
|
//=======================================================================
|
|
// Online Search Controller.
|
|
//=======================================================================
|
|
public partial class SearchController : SaxController_Online
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
public SearchController(SaxLocaliser localiser, ILogger<HomeController> logger) :
|
|
base(localiser, logger)
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
[HttpGet]
|
|
public IActionResult Index()
|
|
{
|
|
// Validate session.
|
|
if (!ValidUserSession)
|
|
return RedirectToAction("", "");
|
|
|
|
// No 'Index' view as yet - default to home page.
|
|
return RedirectToAction("", "");
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Search - Users.
|
|
/// </summary>
|
|
[HttpGet]
|
|
public IActionResult Users()
|
|
{
|
|
// Validate session.
|
|
if (!ValidUserSession)
|
|
return RedirectToAction("", "");
|
|
|
|
// Model.
|
|
Model_Search_Users model = new Model_Search_Users(Localiser);
|
|
model.Paging.PageNo = 1;
|
|
model.Paging.PageLength = Sax.Config.Online.Search.Organisations.PageLengthDefault;
|
|
|
|
return View(model);
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Search - Organisations.
|
|
/// </summary>
|
|
[HttpGet]
|
|
public IActionResult Organisations()
|
|
{
|
|
// Validate session.
|
|
if (!ValidUserSession)
|
|
return RedirectToAction("", "");
|
|
|
|
// Model.
|
|
Model_Search_Organisations model = new Model_Search_Organisations(Localiser);
|
|
model.Paging.PageNo = 1;
|
|
model.Paging.PageLength = Sax.Config.Online.Search.Users.PageLengthDefault;
|
|
|
|
return View(model);
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|