mh_custom/wtmProject.Shared/Pages/_Admin/FrameworkPost/Details.razor
2024-05-17 13:43:36 +08:00

37 lines
992 B
Plaintext

@page "/_Admin/FrameworkPost/Details/{id}"
@using wtmProject.ViewModel._Admin.FrameworkPostVMs;
@inherits BasePage
<ValidateForm @ref="vform" Model="@Model" >
<Row ItemsPerRow="ItemsPerRow.Two" RowType="RowType.Normal">
<Display @bind-Value="@Model.Entity.PostCode" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.PostName" ShowLabel="true"/>
</Row>
<div class="modal-footer table-modal-footer">
<Button Color="Color.Primary" Icon="fa fa-save" Text="@WtmBlazor.Localizer["Sys.Close"]" OnClick="OnClose" />
</div>
</ValidateForm>
@code {
private FrameworkPostVM Model = null;
private ValidateForm vform { get; set; }
[Parameter]
public string id { get; set; }
protected override async Task OnInitializedAsync()
{
var rv = await WtmBlazor.Api.CallAPI<FrameworkPostVM>($"/api/FrameworkPost/{id}");
Model = rv.Data;
}
public void OnClose()
{
CloseDialog();
}
}