37 lines
832 B
Plaintext
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(); *@
|
|
@* } *@
|
|
@* *@
|
|
@* } *@
|
|
@* } *@
|