This commit is contained in:
2022-07-16 13:30:57 +01:00
parent 5fc6389af2
commit dc431e1634
79 changed files with 3570 additions and 310 deletions
@@ -68,10 +68,37 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
return RedirectToAction("", "");
// Retrieve organisation.
SaxOrganisation organisation = AccountMgr.GetOrganisationById(model.Filter.OrganisationId.ToSysId());
SaxOrganisation organisation = AccountMgr.GetOrganisationById(model.OrganisationId.ToSysId());
if (organisation == null)
RedirectToAction("", "Organisation");
model.MemberOrganisationName = organisation?.Name;
model.Filter.OrganisationId= SysId.ToString(organisation.Id);
model.Filter.OrganisationName = organisation.Name;
// Paging.
model.Paging.PageNo = 1;
model.Paging.PageLength = 12;
return View(model);
}
//-------------------------------------------------------------------
/// <summary>
/// Organisation Associations action.
/// <para>- POST action to allow Organisation Id to be supplied, eg. from Organsiations page.</para>
/// </summary>
[HttpPost]
public IActionResult Associations(Model_OrganisationAssociations model)
{
// Validate session.
if (!ValidUserSession)
return RedirectToAction("", "");
// Retrieve organisation.
SaxOrganisation organisation = AccountMgr.GetOrganisationById(model.OrganisationId.ToSysId());
if (organisation == null)
RedirectToAction("", "Organisation");
model.Filter.OrganisationId = SysId.ToString(organisation.Id);
model.Filter.OrganisationName = organisation.Name;
// Paging.
model.Paging.PageNo = 1;