@page "/_Admin/WTM_CUSTOM/Edit/{id}"
@using wtmProject.Model
@using wtmProject.ViewModel._Admin.WTM_CUSTOMVMs;
@inherits BasePage
@* *@
@* *@
@code {
private WTM_CUSTOMVM Model = null;
private ValidateForm vform { get; set; }
[Parameter]
public string id { get; set; }
private List AllWTM_AREAs = new List();
private List AllWTM_CUSTOMs = new List();
private IEnumerable list { get; set; }
protected override async Task OnInitializedAsync()
{
AllWTM_AREAs = await WtmBlazor.Api.CallItemsApi("/api/WTM_CUSTOM/GetWTM_AREAs", placeholder: WtmBlazor.Localizer["Sys.PleaseSelect"]);
AllWTM_CUSTOMs = await WtmBlazor.Api.CallItemsApi("/api/WTM_VISIT_PLAN/GetWTM_CUSTOMs", placeholder: WtmBlazor.Localizer["Sys.PleaseSelect"]);
var rv = await WtmBlazor.Api.CallAPI($"/api/WTM_CUSTOM/{id}");
Model = rv.Data;
list = Model.Entity.CustomPerson;
await base.OnInitializedAsync();
}
private async Task Submit(EditContext context)
{
Model.Entity.CustomPerson = list.ToList();
await PostsForm(vform, $"/api/WTM_CUSTOM/edit", (s) => "Sys.OprationSuccess", method: HttpMethodEnum.PUT);
}
public void OnClose()
{
CloseDialog();
}
}