aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ApartmentManager/ApartmentManager/Handler/ApartmentHandler.cs3
-rw-r--r--ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml10
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>