Add query string to AddEditServer page to prefill city.
This commit is contained in:
parent
86e41b22ff
commit
8cf581efca
@ -72,6 +72,9 @@ else
|
||||
[SupplyParameterFromForm]
|
||||
private Server? server { get; set; }
|
||||
|
||||
[SupplyParameterFromQuery]
|
||||
public string? City { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (this.Id.HasValue)
|
||||
@ -82,6 +85,11 @@ else
|
||||
{
|
||||
server ??= new Server() { IsOnline = false };
|
||||
}
|
||||
|
||||
if (server != null && !string.IsNullOrEmpty(this.City))
|
||||
{
|
||||
server.City = this.City;
|
||||
}
|
||||
}
|
||||
|
||||
private void SubmitServer()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user