v1.1.4.1
This commit is contained in:
@@ -137,6 +137,7 @@ namespace Saxonite.Net.Core.Web.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
private class CodeCache
|
||||
{
|
||||
public List<TypeCodeDesc> genderCodes;
|
||||
public List<TypeCodeDesc> sportParticipationCodes;
|
||||
public List<TypeCodeDesc> sportOfficiatingCodes;
|
||||
public List<TypeCodeDesc> regionTypeCodes;
|
||||
@@ -155,6 +156,16 @@ namespace Saxonite.Net.Core.Web.Base.App
|
||||
return SacsSystem.GetStatusDesc(status);
|
||||
}
|
||||
|
||||
// Gender.
|
||||
public String GetGenderCaption(Sax.Gender gender)
|
||||
{
|
||||
if ((int)gender < 1) return "";
|
||||
if (codes.genderCodes == null)
|
||||
codes.genderCodes = SaxSystem.GetCodesOfType(Sax.CodeType.Gender);
|
||||
// ToDo Opportunity Type localisation.
|
||||
return codes.genderCodes.GetDescForType(gender);
|
||||
}
|
||||
|
||||
// Sport Participation.
|
||||
public String GetSportParticipationTypeCaption(Sax.SportParticipation participation)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc.Razor;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
@@ -160,6 +161,10 @@ namespace Saxonite.Net.Core.Web.Base.App
|
||||
//config.app.UseAuthorization();
|
||||
config.app.UseAntiforgeryTokens();
|
||||
|
||||
// Localisation.
|
||||
IOptions<RequestLocalizationOptions> localizationOptions = config.app.ApplicationServices.GetService<IOptions<RequestLocalizationOptions>>();
|
||||
config.app.UseRequestLocalization(localizationOptions.Value);
|
||||
|
||||
config.app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllerRoute(
|
||||
|
||||
Reference in New Issue
Block a user