aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ApartmentManager/ApartmentManager/View/ApartmentPage.xaml2
-rw-r--r--ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml47
-rw-r--r--ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml45
3 files changed, 65 insertions, 29 deletions
diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml
index acf1cbc..6a3f6c1 100644
--- a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml
+++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml
@@ -35,7 +35,7 @@
<StackPanel Orientation="Horizontal">
<TextBlock Text="Apartment Number :" FontSize="20" Margin="0,0,10,0" FontWeight="Bold"/>
- <TextBlock Text="{Binding CatalogSingleton.Apartment.ApartmentNumber}" FontSize="20"/>
+ <TextBlock Text="{Binding CatalogSingleton.Apartment.ApartmentId}" FontSize="20"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
diff --git a/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml
index ff394b3..ea4711e 100644
--- a/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml
+++ b/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml
@@ -14,10 +14,53 @@
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel Margin="10" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="top" >
+ <StackPanel>
+ <Grid Background="LightGray" Height="150" Width="800" Margin="0,0,0,5">
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="150"/>
+ <ColumnDefinition />
+ </Grid.ColumnDefinitions>
+
+ <Grid Grid.Column="0" Background="Gray" BorderThickness="0,0,2,0" BorderBrush="#CCFFFFFF" >
+ <Image Stretch="Fill" Source="{Binding Picture}"/>
+ </Grid>
+
+ <Grid Grid.Column="1" Margin="3,3,3,3">
+
+ <StackPanel Margin="10">
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Full Name :" Margin="0,0,10,0" FontSize="30" FontWeight="Bold" ></TextBlock>
+ <TextBlock Text="{Binding UserSingleton.CurrentUser.FirstName}" Margin="0,0,10,0" FontSize="30"></TextBlock>
+ <TextBlock Text="{Binding UserSingleton.CurrentUser.LastName}" Margin="0,0,10,0" FontSize="30"></TextBlock>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Email Address :" Margin="0,0,10,0" FontSize="20" FontWeight="Bold"></TextBlock>
+ <TextBlock Text="{Binding UserSingleton.CurrentUser.Email}" Margin="0,0,10,0" FontSize="20"></TextBlock>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Phone Number :" Margin="0,0,10,0" FontSize="20" FontWeight="Bold"></TextBlock>
+ <TextBlock Text="{Binding UserSingleton.CurrentUser.Phone}" Margin="0,0,10,0" FontSize="20"></TextBlock>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Birth Date :" Margin="0,0,10,0" FontSize="20" FontWeight="Bold"></TextBlock>
+ <TextBlock Text="{Binding UserSingleton.CurrentUser.BirthDate}" FontSize="20"></TextBlock>
+ <TextBlock Text="-" FontSize="20"></TextBlock>
+ <TextBlock Text="{Binding BirthDate.Month}" FontSize="20"></TextBlock>
+ <TextBlock Text="-" FontSize="20"></TextBlock>
+ <TextBlock Text="{Binding BirthDate.Day}" FontSize="20"></TextBlock>
+ </StackPanel>
+
+ </StackPanel>
+ </Grid>
+ </Grid>
<ListView ItemsSource="{Binding CatalogSingleton.Residents}" Margin="10,10,10,116" SelectedItem="{Binding NewResident, Mode=TwoWay}" >
-
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
@@ -74,7 +117,7 @@
</ListView.ItemTemplate>
</ListView>
-
+ </StackPanel>
<StackPanel Width="400" Margin="0,0,50,0">
diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml
index 0886372..b7952a3 100644
--- a/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml
+++ b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml
@@ -13,34 +13,27 @@
</Page.DataContext>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
- <StackPanel Margin="50" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
+ <StackPanel Margin="20" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
<StackPanel Width="400" Margin="0,0,50,0">
<TextBlock Margin="0,10,0,10" Text="First Contract Owner" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold"/>
- <TextBlock Margin="0,10,0,10" Text="Name"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].Name, Mode=TwoWay}" />
- <TextBlock Margin="0,10,0,10" Text="Last Name"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].LastName, Mode=TwoWay}" />
- <TextBlock Margin="0,10,0,10" Text="Birthdate"/>
- <DatePicker HorizontalAlignment="Stretch" Date="{Binding CatalogSingleton.User[0].BirthDate}"/>
- <TextBlock Margin="0,10,0,10" Text="Email Address"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].Email, Mode=TwoWay}" />
- <TextBlock Margin="0,10,0,10" Text="Phone Number"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].Phone, Mode=TwoWay}" />
- <Button Margin="0,10,0,10" Content="Update" HorizontalAlignment="Stretch"/>
- </StackPanel>
- <StackPanel Width="400">
- <TextBlock Margin="0,10,0,10" Text="Second Contract Owner" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold"/>
- <TextBlock Margin="0,10,0,10" Text="Name"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].SecondName, Mode=TwoWay}" />
- <TextBlock Margin="0,10,0,10" Text="Last Name"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].SecondLastName, Mode=TwoWay}" />
- <TextBlock Margin="0,10,0,10" Text="Birthdate"/>
- <DatePicker HorizontalAlignment="Stretch" Date="{Binding CatalogSingleton.User[0].SecondBirthDate}"/>
- <TextBlock Margin="0,10,0,10" Text="Email Address"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].SecondEmail, Mode=TwoWay}" />
- <TextBlock Margin="0,10,0,10" Text="Phone Number"/>
- <TextBox Text="{Binding CatalogSingleton.User[0].SecondPhone, Mode=TwoWay}" />
- <Button Margin="0,10,0,10" Content="Update" HorizontalAlignment="Stretch"/>
+
+ <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,5,0,5" Text="Name"/>
+ <TextBox Text="{Binding UserSingleton.CurrentUser.FirstName, Mode=TwoWay}" />
+ <TextBlock Margin="0,5,0,5" Text="Last Name"/>
+ <TextBox Text="{Binding UserSingleton.CurrentUser.LastName, Mode=TwoWay}" />
+ <TextBlock Margin="0,5,0,5" Text="Birthdate"/>
+ <DatePicker HorizontalAlignment="Stretch" Date="{Binding UserSingleton.CurrentUser.BirthDate, Mode=TwoWay}"/>
+ <TextBlock Margin="0,5,0,5" Text="Email Address"/>
+ <TextBox Text="{Binding UserSingleton.CurrentUser.Email, Mode=TwoWay}" />
+ <TextBlock Margin="0,5,0,5" Text="Phone Number"/>
+ <TextBox Text="{Binding UserSingleton.CurrentUser.Phone, Mode=TwoWay}" />
+ <TextBlock Margin="0,5,0,5" Text="Password"/>
+ <TextBox Text="{Binding UserSingleton.CurrentUser.Password, Mode=TwoWay}" />
+ <Button Margin="0,5,0,5" Content="Update" HorizontalAlignment="Stretch"/>
+
</StackPanel>
</StackPanel>
</Grid>