try another way to implement the data stucture

This commit is contained in:
2020-09-30 22:05:18 +02:00
parent 410062daae
commit 1b387adae1
19 changed files with 234 additions and 257 deletions

View File

@ -77,7 +77,7 @@ else
<Select TValue="Guid?" SelectedValue="@((Guid?)(context.CellValue))" SelectedValueChanged="@(v => context.CellValue = v)" >
@foreach (var item in OrganizationUnits ?? Enumerable.Empty<OrganizationUnit>())
{
<SelectItem TValue="Guid" Value="@(item.Id)">@item.CommonName</SelectItem>
<SelectItem TValue="int" Value="@(item.Id)">@item.CommonName</SelectItem>
}
</Select>
</EditTemplate>

View File

@ -56,8 +56,8 @@ namespace UserService.Pages
if (arg == null) throw new ArgumentNullException(nameof(arg));
var securityGroup = arg.Item;
securityGroup.MapFields(arg.Values);
securityGroup.Parent =
OrganizationUnits?.FirstOrDefault(x => x.Id == (Guid?)arg.Values[nameof(Node.ParentId)]);
//securityGroup.Parent =
// OrganizationUnits?.FirstOrDefault(x => x.Id == (Guid?)arg.Values[nameof(Node.Parent.Id)]);
var result = await SecurityGroupsRepository.UpdateAsync(securityGroup).ConfigureAwait(false);
arg.Cancel = !result;
}
@ -98,9 +98,7 @@ namespace UserService.Pages
if (SelectedSecurityGroup is null) return;
if (!SelectedSecurityGroup.Members.Add(new MembersMember
{
MemberId = SelectedSecurityGroup.Id,
Member = SelectedSecurityGroup,
AttachedMemberId = SelectedMember.Id,
AttachedMember = SelectedMember
}))
{

View File

@ -93,7 +93,7 @@ else
<Select TValue="Guid?" SelectedValue="@((Guid?)(context.CellValue))" SelectedValueChanged="@(v => context.CellValue = v)" >
@foreach (var item in OrganizationUnits ?? Enumerable.Empty<OrganizationUnit>())
{
<SelectItem TValue="Guid" Value="@(item.Id)">@item.CommonName</SelectItem>
<SelectItem TValue="int" Value="@(item.Id)">@item.CommonName</SelectItem>
}
</Select>
</EditTemplate>