diff options
author | marcinzelent <marcin@zelent.net> | 2017-05-27 22:38:14 +0200 |
---|---|---|
committer | marcinzelent <marcin@zelent.net> | 2017-05-27 22:38:14 +0200 |
commit | 8d651eff96f623cba3e75d5474a7e69736962db5 (patch) | |
tree | 78de85d12b6a46add355ac129ecef061da36f023 | |
parent | 28c8f5e1f6d583afcbd2c53327dca2c5779be6d6 (diff) |
Added managing users feature.
-rw-r--r-- | ApartmentManager/ApartmentManager/ApartmentManager.csproj | 14 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/AppShell.xaml.cs | 2 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/Handler/BmHandler.cs | 66 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/Handler/LoginHandler.cs | 1 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/Model/User.cs | 11 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/Persistency/ImgurPhotoUploader.cs | 23 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/Singletons/BmSingleton.cs | 1 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml | 2 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/View/BmContractOwnersPage.xaml | 11 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/View/BmMainPage.xaml | 2 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/View/BmUsersPage.xaml | 173 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/View/BmUsersPage.xaml.cs (renamed from ApartmentManager/ApartmentManager/View/BmContractOwnersPage.xaml.cs) | 4 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/ViewModel/BmViewModel.cs | 23 |
13 files changed, 295 insertions, 38 deletions
diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj index 2a04477..2378b79 100644 --- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj +++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj @@ -136,9 +136,6 @@ <Compile Include="View\BmChangesPage.xaml.cs"> <DependentUpon>BmChangesPage.xaml</DependentUpon> </Compile> - <Compile Include="View\BmContractOwnersPage.xaml.cs"> - <DependentUpon>BmContractOwnersPage.xaml</DependentUpon> - </Compile> <Compile Include="View\BmEditApartmentPage.xaml.cs"> <DependentUpon>BmEditApartmentPage.xaml</DependentUpon> </Compile> @@ -157,6 +154,9 @@ <Compile Include="View\BmCreateApartmentPage.xaml.cs"> <DependentUpon>BmCreateApartmentPage.xaml</DependentUpon> </Compile> + <Compile Include="View\BmUsersPage.xaml.cs"> + <DependentUpon>BmUsersPage.xaml</DependentUpon> + </Compile> <Compile Include="View\LoginPage.xaml.cs"> <DependentUpon>LoginPage.xaml</DependentUpon> </Compile> @@ -219,10 +219,6 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> - <Page Include="View\BmContractOwnersPage.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:Compile</Generator> - </Page> <Page Include="View\BmEditApartmentPage.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -247,6 +243,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="View\BmUsersPage.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="View\LoginPage.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> diff --git a/ApartmentManager/ApartmentManager/AppShell.xaml.cs b/ApartmentManager/ApartmentManager/AppShell.xaml.cs index dbe9c89..7332ad7 100644 --- a/ApartmentManager/ApartmentManager/AppShell.xaml.cs +++ b/ApartmentManager/ApartmentManager/AppShell.xaml.cs @@ -79,7 +79,7 @@ namespace ApartmentManager { Symbol = Symbol.Comment, Label = "Contract owners", - DestPage = typeof(BmContractOwnersPage), + DestPage = typeof(BmUsersPage), IsSelected = false }, diff --git a/ApartmentManager/ApartmentManager/Handler/BmHandler.cs b/ApartmentManager/ApartmentManager/Handler/BmHandler.cs index 27dc827..2cbffea 100644 --- a/ApartmentManager/ApartmentManager/Handler/BmHandler.cs +++ b/ApartmentManager/ApartmentManager/Handler/BmHandler.cs @@ -76,6 +76,72 @@ namespace ApartmentManager.Handler } #endregion + #region USERS + + public void GetUsers() + { + var users = JsonConvert.DeserializeObject<ObservableCollection<User>>(ApiClient.GetData("api/Users/")); + BmSingleton.Instance.Users.Clear(); + foreach (var user in users) BmSingleton.Instance.Users.Add(user); + } + + public void CreateUser() + { + try + { + ApiClient.PostData("api/Users/", _vm.UserTemplate); + GetUsers(); + _vm.UserTemplate = new User(); + } + catch (Exception e) + { + var msg = new MessageDialog(e.Message).ShowAsync(); + } + } + public void UpdateUser() + { + try + { + ApiClient.PutData("api/Users/" + _vm.UserTemplate.Username, _vm.UserTemplate); + GetUsers(); + } + catch (Exception e) + { + var msg = new MessageDialog(e.Message).ShowAsync(); + } + } + public void DeleteUser() + { + try + { + ApiClient.DeleteData("api/Users/" + _vm.UserTemplate.Username); + BmSingleton.Instance.Users.Remove(_vm.UserTemplate); + GetUsers(); + } + catch (Exception e) + { + var msg = new MessageDialog(e.Message).ShowAsync(); + } + } + + public async void UploadUserPhoto() + { + var picture = await ImgurPhotoUploader.UploadPhotoAsync(); + if (picture != "") + { + _vm.UserTemplate.Picture = picture; + var tmp = _vm.UserTemplate; + _vm.UserTemplate = new User(); + _vm.UserTemplate = tmp; + } + } + + public void ClearUserTemplate() + { + _vm.UserTemplate = new User(); + } + #endregion + #region RESIDENTS public void GetResidents() diff --git a/ApartmentManager/ApartmentManager/Handler/LoginHandler.cs b/ApartmentManager/ApartmentManager/Handler/LoginHandler.cs index e41f5ed..e4d9721 100644 --- a/ApartmentManager/ApartmentManager/Handler/LoginHandler.cs +++ b/ApartmentManager/ApartmentManager/Handler/LoginHandler.cs @@ -77,6 +77,7 @@ namespace ApartmentManager.Handler { BmViewModel bvm = new BmViewModel(); bvm.BmHandler.GetApartments(); + bvm.BmHandler.GetUsers(); bvm.BmHandler.GetResidents(); appShell.AppFrame.Navigate(typeof(BmMainPage)); } diff --git a/ApartmentManager/ApartmentManager/Model/User.cs b/ApartmentManager/ApartmentManager/Model/User.cs index f5da6fd..26a6b29 100644 --- a/ApartmentManager/ApartmentManager/Model/User.cs +++ b/ApartmentManager/ApartmentManager/Model/User.cs @@ -1,11 +1,6 @@ using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; -using Windows.UI.Xaml.Controls; using ApartmentManager.Annotations; namespace ApartmentManager.Model @@ -18,12 +13,12 @@ namespace ApartmentManager.Model public bool IsBm { get; set; } public string FirstName { get; set; } public string LastName { get; set; } - public DateTime BirthDate { get; set; } + public DateTimeOffset BirthDate { get; set; } public string Phone { get; set; } public string Email { get; set; } public string _picture { get; set; } - public DateTime? MoveInDate { get; set; } - public DateTime? MoveOutDate { get; set; } + public DateTimeOffset? MoveInDate { get; set; } + public DateTimeOffset? MoveOutDate { get; set; } public string Picture { diff --git a/ApartmentManager/ApartmentManager/Persistency/ImgurPhotoUploader.cs b/ApartmentManager/ApartmentManager/Persistency/ImgurPhotoUploader.cs index ed0041e..433058f 100644 --- a/ApartmentManager/ApartmentManager/Persistency/ImgurPhotoUploader.cs +++ b/ApartmentManager/ApartmentManager/Persistency/ImgurPhotoUploader.cs @@ -6,6 +6,7 @@ using System.IO; using System.Threading.Tasks; using Windows.Storage; using Windows.Storage.Pickers; +using Windows.UI.Popups; namespace ApartmentManager.Persistency { @@ -16,6 +17,7 @@ namespace ApartmentManager.Persistency /// </summary> public async static Task<string> UploadPhotoAsync() { + try { //Create new file picker FileOpenPicker fp = new FileOpenPicker() { @@ -38,15 +40,22 @@ namespace ApartmentManager.Persistency //Get image file with picker StorageFile file = await fp.PickSingleFileAsync(); - //Upload to Imgur and return link - if (file != null) + //Upload to Imgur and return link + if (file != null) + { + var client = new ImgurClient("7b05a61ed8df74f", "ade6f79163e19f92f852bc553bbe399d7d4218fe"); + var endpoint = new ImageEndpoint(client); + IImage image = await endpoint.UploadImageStreamAsync(await file.OpenStreamForReadAsync()); + return image.Link; + } + return ""; + } + catch(Exception ex) { - var client = new ImgurClient("7b05a61ed8df74f", "ade6f79163e19f92f852bc553bbe399d7d4218fe"); - var endpoint = new ImageEndpoint(client); - IImage image = await endpoint.UploadImageStreamAsync(await file.OpenStreamForReadAsync()); - return image.Link; + var msg = new MessageDialog(ex.Message).ShowAsync(); + return ""; } - else return ""; } + } }
\ No newline at end of file diff --git a/ApartmentManager/ApartmentManager/Singletons/BmSingleton.cs b/ApartmentManager/ApartmentManager/Singletons/BmSingleton.cs index 14c1100..737a1f3 100644 --- a/ApartmentManager/ApartmentManager/Singletons/BmSingleton.cs +++ b/ApartmentManager/ApartmentManager/Singletons/BmSingleton.cs @@ -15,6 +15,7 @@ namespace ApartmentManager.Singletons private BmSingleton() { + Users = new ObservableCollection<User>(); Residents = new ObservableCollection<Resident>(); } } diff --git a/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml index df052a6..001de31 100644 --- a/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml +++ b/ApartmentManager/ApartmentManager/View/ApartmentDefectPage.xaml @@ -15,7 +15,7 @@ <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <StackPanel Margin="10"> <TextBlock Text="Apartment Defects" HorizontalAlignment="Center" FontSize="30" FontWeight="Bold"></TextBlock> - <ListView ItemsSource="{Binding CatalogSingleton.Defects}" Height="615" SelectedItem="{Binding NewDefect, Mode=TwoWay}" > + <ListView ItemsSource="{Binding CatalogSingleton.Defects}" Height="500" SelectedItem="{Binding NewDefect, Mode=TwoWay}" > <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> diff --git a/ApartmentManager/ApartmentManager/View/BmContractOwnersPage.xaml b/ApartmentManager/ApartmentManager/View/BmContractOwnersPage.xaml deleted file mode 100644 index eed56f1..0000000 --- a/ApartmentManager/ApartmentManager/View/BmContractOwnersPage.xaml +++ /dev/null @@ -1,11 +0,0 @@ -<Page - x:Class="ApartmentManager.View.BmContractOwnersPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="using:ApartmentManager.View" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" /> -</Page> diff --git a/ApartmentManager/ApartmentManager/View/BmMainPage.xaml b/ApartmentManager/ApartmentManager/View/BmMainPage.xaml index 77abf21..adf2364 100644 --- a/ApartmentManager/ApartmentManager/View/BmMainPage.xaml +++ b/ApartmentManager/ApartmentManager/View/BmMainPage.xaml @@ -49,7 +49,7 @@ Content="Contract owners"> <interactivity:Interaction.Behaviors> <core:EventTriggerBehavior EventName="Click"> - <core:NavigateToPageAction TargetPage="ApartmentManager.View.BmContractOwnersPage" /> + <core:NavigateToPageAction TargetPage="ApartmentManager.View.BmUsersPage" /> </core:EventTriggerBehavior> </interactivity:Interaction.Behaviors> </Button> diff --git a/ApartmentManager/ApartmentManager/View/BmUsersPage.xaml b/ApartmentManager/ApartmentManager/View/BmUsersPage.xaml new file mode 100644 index 0000000..06b5ee7 --- /dev/null +++ b/ApartmentManager/ApartmentManager/View/BmUsersPage.xaml @@ -0,0 +1,173 @@ +<Page + x:Class="ApartmentManager.View.BmUsersPage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="using:ApartmentManager.View" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:vm="using:ApartmentManager.ViewModel" + mc:Ignorable="d"> + + <Page.Resources> + <Style x:Key="ListItemStyle" TargetType="ListViewItem"> + <Setter Property="Background" Value="White" /> + <Setter Property="Padding" Value="0" /> + <Setter Property="Margin" Value="12,12,12,0" /> + <Setter Property="BorderThickness" Value="1" /> + <Setter Property="BorderBrush" Value="#DFE0E4" /> + <Setter Property="HorizontalContentAlignment" Value="Stretch" /> + <Setter Property="VerticalContentAlignment" Value="Center" /> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="ListViewItem"> + <ListViewItemPresenter /> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style x:Key="TextBlockStyle" TargetType="TextBlock"> + <Setter Property="Margin" Value="0,0,0,10" /> + <Setter Property="Foreground" Value="White" /> + </Style> + <Style x:Key="ActionButtonStyle" TargetType="Button"> + <Setter Property="Background" Value="Transparent" /> + <Setter Property="Height" Value="40" /> + <Setter Property="Width" Value="40" /> + <Setter Property="HorizontalAlignment" Value="Right" /> + <Setter Property="VerticalAlignment" Value="Top" /> + </Style> + </Page.Resources> + + <Page.DataContext> + <vm:BmViewModel /> + </Page.DataContext> + + <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="50" /> + <RowDefinition /> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition Width="450" /> + </Grid.ColumnDefinitions> + + <Grid Background="#E9EBEE"> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Orientation="Horizontal"> + <TextBlock + Margin="50,0,10,0" + VerticalAlignment="Center" + FontSize="18" + Text="Search: " /> + <TextBox Height="32" PlaceholderText="Type search parameters..." /> + </StackPanel> + <AppBarButton + Grid.Column="1" + HorizontalAlignment="Right" + Command="{Binding ClearUserTemplateCommand}" + Icon="Add" /> + </Grid> + <ListView + Grid.Row="1" + Padding="10" + Background="#E9EBEE" + ItemsSource="{Binding BmSingleton.Users}" + SelectedItem="{Binding UserTemplate, Mode=TwoWay}"> + + <ListView.ItemContainerStyle> + <Style BasedOn="{StaticResource ListItemStyle}" TargetType="ListViewItem" /> + </ListView.ItemContainerStyle> + + <ListView.ItemTemplate> + + <DataTemplate> + <Grid Height="150"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="150" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + + <Image + Margin="5" + Source="{Binding Picture}" + Stretch="Fill" /> + + <Grid Grid.Column="1"> + <StackPanel Margin="10,0,0,0" VerticalAlignment="Center"> + <TextBlock FontSize="20"><Run Text="Name: " /><Run Text="{Binding FirstName}" /><Run Text=" " /><Run Text="{Binding LastName}" /></TextBlock> + <TextBlock><Run Text="Apartment number: " /><Run Text="{Binding ApartmentId}" /></TextBlock> + <TextBlock><Run Text="Birth date: " /><Run Text="{Binding BirthDate.Day}" /><Run Text="." /><Run Text="{Binding BirthDate.Month}" /><Run Text="." /><Run Text="{Binding BirthDate.Year}" /></TextBlock> + <TextBlock><Run Text="E-mail address: " /><Run Text="{Binding Email}" /></TextBlock> + <TextBlock><Run Text="Phone number: " /><Run Text="{Binding Phone}" /></TextBlock> + </StackPanel> + </Grid> + </Grid> + </DataTemplate> + + </ListView.ItemTemplate> + </ListView> + <Grid Grid.RowSpan="2" Grid.Column="1"> + <Grid.RowDefinitions> + <RowDefinition/> + <RowDefinition Height="60"/> + </Grid.RowDefinitions> + <ScrollViewer> + <StackPanel Width="400" HorizontalAlignment="Center"> + <Image + Width="150" + Height="150" + Source="{Binding UserTemplate.Picture, Mode=TwoWay}" /> + <Button + Margin="0,5,0,0" + HorizontalAlignment="Stretch" + Command="{Binding UploadUserPhotoCommand}" + Content="Upload Picture" /> + <TextBlock Margin="0,5,0,1" Text="Username" /> + <TextBox Text="{Binding UserTemplate.Username, Mode=TwoWay}" /> + <TextBlock Margin="0,5,0,1" Text="Password" /> + <PasswordBox Password="{Binding UserTemplate.Password, Mode=TwoWay}" /> + <StackPanel Margin="0,10,0,0" Orientation="Horizontal"> + <TextBlock VerticalAlignment="Center" Text="Apartment number:" /> + <TextBox Margin="10,0,40,0" Text="{Binding UserTemplate.ApartmentId, Mode=TwoWay}" /> + <CheckBox Content="Board member" IsChecked="{Binding UserTemplate.IsBm}" /> + </StackPanel> + <TextBlock Margin="0,5,0,1" Text=" First name" /> + <TextBox Text="{Binding UserTemplate.FirstName, Mode=TwoWay}" /> + <TextBlock Margin="0,5,0,1" Text="Last Name" /> + <TextBox Text="{Binding UserTemplate.LastName, Mode=TwoWay}" /> + <TextBlock Margin="0,5,0,1" Text="Birth date" /> + <DatePicker HorizontalAlignment="Stretch" Date="{Binding UserTemplate.BirthDate, Mode=TwoWay}" /> + <TextBlock Margin="0,5,0,1" Text="Email address" /> + <TextBox Text="{Binding UserTemplate.Email, Mode=TwoWay}" /> + <TextBlock Margin="0,5,0,1" Text="Phone number" /> + <TextBox Text="{Binding UserTemplate.Phone, Mode=TwoWay}" /> + <TextBlock Margin="0,5,0,1" Text="Move-in date" /> + <DatePicker HorizontalAlignment="Stretch" Date="{Binding UserTemplate.MoveInDate, Mode=TwoWay}" /> + </StackPanel> + </ScrollViewer> + <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> + <Button + Width="125" + Margin="0" + Command="{Binding CreateUserCommand}" + Content="Create" /> + <Button + Width="125" + Margin="10,0" + Command="{Binding DeleteUserCommand}" + Content="Delete" /> + <Button + Width="125" + Margin="0" + Command="{Binding UpdateUserCommand}" + Content="Update" /> + </StackPanel> + </Grid> + </Grid> + </Grid> +</Page> diff --git a/ApartmentManager/ApartmentManager/View/BmContractOwnersPage.xaml.cs b/ApartmentManager/ApartmentManager/View/BmUsersPage.xaml.cs index 389ee44..de51f22 100644 --- a/ApartmentManager/ApartmentManager/View/BmContractOwnersPage.xaml.cs +++ b/ApartmentManager/ApartmentManager/View/BmUsersPage.xaml.cs @@ -20,9 +20,9 @@ namespace ApartmentManager.View /// <summary> /// An empty page that can be used on its own or navigated to within a Frame. /// </summary> - public sealed partial class BmContractOwnersPage : Page + public sealed partial class BmUsersPage : Page { - public BmContractOwnersPage() + public BmUsersPage() { this.InitializeComponent(); } diff --git a/ApartmentManager/ApartmentManager/ViewModel/BmViewModel.cs b/ApartmentManager/ApartmentManager/ViewModel/BmViewModel.cs index 0ccea4e..7a324a8 100644 --- a/ApartmentManager/ApartmentManager/ViewModel/BmViewModel.cs +++ b/ApartmentManager/ApartmentManager/ViewModel/BmViewModel.cs @@ -24,6 +24,12 @@ namespace ApartmentManager.ViewModel public ICommand ClearApartmentTemplateCommand { get; } public ICommand GetApartmentsCommand { get; } + public ICommand CreateUserCommand { get; } + public ICommand DeleteUserCommand { get; } + public ICommand UpdateUserCommand { get; } + public ICommand UploadUserPhotoCommand { get; } + public ICommand ClearUserTemplateCommand { get; } + public ICommand CreateResidentCommand { get; } public ICommand DeleteResidentCommand { get; } public ICommand UpdateResidentCommand { get; } @@ -31,6 +37,7 @@ namespace ApartmentManager.ViewModel public ICommand ClearResidentTemplateCommand { get; } private static Apartment _apartmentTemplate = new Apartment(); + private static User _userTemplate = new User(); private static Resident _residentTemplate = new Resident(); public BmViewModel() @@ -44,6 +51,12 @@ namespace ApartmentManager.ViewModel ClearApartmentTemplateCommand = new RelayCommand(BmHandler.ClearApartmentTemplate); GetApartmentsCommand = new RelayCommand(BmHandler.GetApartments); + CreateUserCommand = new RelayCommand(BmHandler.CreateUser); + DeleteUserCommand = new RelayCommand(BmHandler.DeleteUser); + UpdateUserCommand = new RelayCommand(BmHandler.UpdateUser); + UploadUserPhotoCommand = new RelayCommand(BmHandler.UploadUserPhoto); + ClearUserTemplateCommand = new RelayCommand(BmHandler.ClearUserTemplate); + CreateResidentCommand = new RelayCommand(BmHandler.CreateResident); DeleteResidentCommand = new RelayCommand(BmHandler.DeleteResident); UpdateResidentCommand = new RelayCommand(BmHandler.UpdateResident); @@ -61,6 +74,16 @@ namespace ApartmentManager.ViewModel } } + public User UserTemplate + { + get => _userTemplate; + set + { + _userTemplate = value; + OnPropertyChanged(); + } + } + public Resident ResidentTemplate { get => _residentTemplate; |