diff options
author | Donatas Adamonis <dona0169@edu.easj.dk> | 2017-05-10 23:47:05 +0200 |
---|---|---|
committer | Donatas Adamonis <dona0169@edu.easj.dk> | 2017-05-10 23:47:05 +0200 |
commit | 8cea12cb9aa399a4c453f58f5d86b3538e9b62ee (patch) | |
tree | 417acbe021c523f346db168257b81236bfe94648 | |
parent | e116a32b7c8c9c11b37653b43a7cc3243cfe660e (diff) | |
parent | 18acea8a3751f81695ee475e68669145f67c1f24 (diff) |
Merge branch 'master' of https://github.com/marcinzelent/ApartmentAdmin
-rw-r--r-- | ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs | 3 | ||||
-rw-r--r-- | ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs b/ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs index 7bc39f9..f3cc8b3 100644 --- a/ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs +++ b/ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs @@ -142,6 +142,9 @@ namespace ApartmentManager.Handler try { ApartmentViewModel.NewResident.Picture = await ImgurPhotoUploader.UploadPhotoAsync(); + var tmp = ApartmentViewModel.NewResident; + ApartmentViewModel.NewResident = new Resident(); + ApartmentViewModel.NewResident = tmp; } catch (Exception e) { diff --git a/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml index e7018bf..ff394b3 100644 --- a/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml +++ b/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml @@ -13,7 +13,7 @@ </Page.DataContext> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - <StackPanel Margin="20" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="top" > + <StackPanel Margin="10" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="top" > <ListView ItemsSource="{Binding CatalogSingleton.Residents}" Margin="10,10,10,116" SelectedItem="{Binding NewResident, Mode=TwoWay}" > @@ -78,7 +78,7 @@ <StackPanel Width="400" Margin="0,0,50,0"> - <TextBlock Margin="0,10,0,10" Text="Resident Info" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold"/> + <TextBlock Margin="0,5,0,10" Text="Resident Info" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold"/> <Image Source="{Binding NewResident.Picture, Mode=TwoWay}" Height="150" Width="150" ></Image> <Button Content="Upload Picture" HorizontalAlignment="Stretch" Margin="0,10,0,0" Command="{Binding UploadResidentPhoto}" ></Button> <TextBlock Margin="0,10,0,10" Text="Name"/> @@ -94,9 +94,9 @@ <StackPanel Orientation="Horizontal"> - <Button Margin="0,10,12,10" Content="Create" Width="125" Command="{Binding CreateResidentCommand}"/> - <Button Margin="0,10,0,10" Content="Delete" Width="125" Command="{Binding DeleteResidentCommand}"/> - <Button Margin="13,10,0,10" Content="Update" Width="125" Command="{Binding UpdateResidentCommand}"/> + <Button Margin="0,5,12,10" Content="Create" Width="125" Command="{Binding CreateResidentCommand}"/> + <Button Margin="0,5,0,10" Content="Delete" Width="125" Command="{Binding DeleteResidentCommand}"/> + <Button Margin="13,5,0,10" Content="Update" Width="125" Command="{Binding UpdateResidentCommand}"/> </StackPanel> </StackPanel> |