diff --git a/GroomWise.Application/ViewModels/CustomerViewModel.cs b/GroomWise.Application/ViewModels/CustomerViewModel.cs index 26f1a83..5eca187 100644 --- a/GroomWise.Application/ViewModels/CustomerViewModel.cs +++ b/GroomWise.Application/ViewModels/CustomerViewModel.cs @@ -48,7 +48,8 @@ await Task.Run(() => { var customers = GroomWiseDbContext!.Customers .GetAll() - .Select(CustomerMapper.ToObservable); + .Select(CustomerMapper.ToObservable) + .OrderBy(customer => customer.FullName); Customers = new ConcurrentObservableCollection(customers); }); } diff --git a/GroomWise.WPF/Views/Dialogs/AddCustomersView.xaml b/GroomWise.WPF/Views/Dialogs/AddCustomersView.xaml index 453ab93..3fd476f 100644 --- a/GroomWise.WPF/Views/Dialogs/AddCustomersView.xaml +++ b/GroomWise.WPF/Views/Dialogs/AddCustomersView.xaml @@ -12,6 +12,7 @@ Width="600" d:DataContext="{d:DesignInstance viewModels:CustomerViewModel, IsDesignTimeCreatable=True}" + FocusManager.FocusedElement="{Binding ElementName=FullNameTextBox}" NoDecorations="True" ResizeMode="NoResize" SizeToContent="Height" @@ -37,6 +38,7 @@ VerticalAlignment="Top"> UsernameBox.Name.Contains(field))) - UsernameBox.Clear(); - if (fields.Any(field => PasswordBox.Name.Contains(field))) - PasswordBox.Clear(); - UsernameBox.Focus(); } protected override void OnClosed(EventArgs e)