mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
57 lines
1.4 KiB
Plaintext
57 lines
1.4 KiB
Plaintext
<EditForm Model="@Customer" OnValidSubmit="@OnValidSubmit">
|
|
<DataAnnotationsValidator />
|
|
<div class="form-group">
|
|
<div>
|
|
<label>Customer Id</label>
|
|
<div>
|
|
<InputText @bind-Value="@Customer.CustomerId" />
|
|
<ValidationMessage For="@(() => Customer.CustomerId)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group ">
|
|
<div>
|
|
<label>Company Name</label>
|
|
<div>
|
|
<InputText @bind-Value="@Customer.CompanyName" />
|
|
<ValidationMessage For="@(() => Customer.CompanyName)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group ">
|
|
<div>
|
|
<label>Address</label>
|
|
<div>
|
|
<InputText @bind-Value="@Customer.Address" />
|
|
<ValidationMessage For="@(() => Customer.Address)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group ">
|
|
<div>
|
|
<label>Country</label>
|
|
<div>
|
|
<InputText @bind-Value="@Customer.Country" />
|
|
<ValidationMessage For="@(() => Customer.Country)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-@ButtonStyle">
|
|
@ButtonText
|
|
</button>
|
|
</EditForm>
|
|
|
|
@code {
|
|
[Parameter]
|
|
public Customer Customer { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public string ButtonText { get; set; } = "Save Changes";
|
|
|
|
[Parameter]
|
|
public string ButtonStyle { get; set; } = "info";
|
|
|
|
[Parameter]
|
|
public EventCallback OnValidSubmit { get; set; }
|
|
}
|