ow
This commit is contained in:
1 parent
d2c2b3cf59
commit
4359903d9c
33 files changed
+2708
-246
No files matched your search
@@ -7,6 +7,7 @@ using CloudBuilder.Security.Policy;
|
||||
using CloudBuilder.Security.SearchCriteria;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
namespace CloudBuilder.Security.Service
|
||||
{
|
||||
public class LocaleService : ILocaleService
|
||||
@@ -27,6 +28,31 @@ namespace CloudBuilder.Security.Service
|
||||
return repository.DetachedEntities.ToArray();
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public SelectOption[] FindSelectOption(string groupName, bool blank = true)
|
||||
{
|
||||
LocaleEntity[] ents = repository.DetachedEntities.Where(x => x.GroupName == groupName && x.Lang == service.Locale).OrderBy(x => x.OrderBy).ToArray();
|
||||
|
||||
List<SelectOption> l = new List<SelectOption>();
|
||||
|
||||
SelectOption selectOption;
|
||||
if (blank)
|
||||
{
|
||||
selectOption = new SelectOption();
|
||||
l.Add(selectOption);
|
||||
}
|
||||
|
||||
foreach (var ent in ents)
|
||||
{
|
||||
selectOption = new SelectOption();
|
||||
selectOption.BindValue = ent.Name;
|
||||
selectOption.DisplayName = ent.Value;
|
||||
l.Add(selectOption);
|
||||
}
|
||||
return l.ToArray();
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
public LocaleResultData FindBySearchCriteria(LocaleSearchCriteria criteria)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user