try another way to implement the data stucture
This commit is contained in:
@ -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>
|
||||
|
@ -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
|
||||
}))
|
||||
{
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user