mh_custom/wtmProject.Shared/Pages/_Admin/WTM_PROJECT/Details.razor

37 lines
988 B
Plaintext
Raw Normal View History

2024-05-16 17:30:33 +08:00
@page "/_Admin/WTM_PROJECT/Details/{id}"
@using wtmProject.ViewModel._Admin.WTM_PROJECTVMs;
@inherits BasePage
<ValidateForm @ref="vform" Model="@Model" >
<Row ItemsPerRow="ItemsPerRow.Two" RowType="RowType.Normal">
<Display @bind-Value="@Model.Entity.ProjectCode" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.ProjectName" 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 WTM_PROJECTVM Model = null;
private ValidateForm vform { get; set; }
[Parameter]
public string id { get; set; }
protected override async Task OnInitializedAsync()
{
var rv = await WtmBlazor.Api.CallAPI<WTM_PROJECTVM>($"/api/WTM_PROJECT/{id}");
Model = rv.Data;
}
public void OnClose()
{
CloseDialog();
}
}