AddressSelector & Blazorise
This commit is contained in:
22
Server/Components/Dialogs/AddressSelector.razor
Normal file
22
Server/Components/Dialogs/AddressSelector.razor
Normal file
@@ -0,0 +1,22 @@
|
||||
@using Server.Data
|
||||
@using Server.Model
|
||||
@using Address = Server.Model.Address
|
||||
|
||||
<ModalBody>
|
||||
|
||||
<DataGrid TItem="Address"
|
||||
Data="@CustomerData.Instance.Customers.Where(x => !string.IsNullOrWhiteSpace(x.Name) && x.State != RecordState.Deleted)"
|
||||
Responsive
|
||||
@bind-SelectedRow="SelectedCustomer"
|
||||
RowDoubleClicked="SelectedAsync">
|
||||
<DataGridColumn Field="@nameof(Address.Name)" Caption="Name" Sortable="true" />
|
||||
<DataGridColumn Field="@nameof(Address.Street)" Caption="Straße" />
|
||||
<DataGridColumn Field="@nameof(Address.City)" Caption="City" />
|
||||
|
||||
</DataGrid>
|
||||
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button Color="Color.Primary" Clicked="SelectedAsync">Auswählen</Button>
|
||||
<Button Color="Color.Secondary" Clicked="ModalService.Hide">Abbrechen</Button>
|
||||
</ModalFooter>
|
||||
Reference in New Issue
Block a user