Files
Mf/Mf.Razor/Components/DisplayUser.razor
T
2026-04-29 00:53:30 +03:30

37 lines
832 B
Plaintext

@* @using System.Reflection *@
@* @inherits BaseForm *@
@* @inject HttpClient httpClient *@
@* *@
@* *@
@* <span>@DisplayName</span> *@
@* *@
@* *@
@* @code { *@
@* [Parameter] *@
@* public Guid Id { get; set; } *@
@* *@
@* private string DisplayName = ""; *@
@* *@
@* public List<string> PropertyFilters = new List<string> { /* "CreateDate", "UpdateDate" */ }; *@
@* *@
@* User user = new User(); *@
@* *@
@* *@
@* *@
@* *@
@* protected override async Task OnInitializedAsync() *@
@* { *@
@* user = await httpClient.GetItemAsync<User>(Id); *@
@* *@
@* if (user != null) *@
@* { *@
@* DisplayName = user.DisplayName; *@
@* } *@
@* else *@
@* { *@
@* DisplayName = Id.ToString(); *@
@* } *@
@* *@
@* } *@
@* } *@