diff options
author | Donatas Adamonis <dona0169@edu.easj.dk> | 2017-05-22 20:24:01 +0200 |
---|---|---|
committer | Donatas Adamonis <dona0169@edu.easj.dk> | 2017-05-22 20:24:01 +0200 |
commit | ad0091548a5b023b74a3f72ca8086cd83b6cc760 (patch) | |
tree | 44ea8c66eae772054a44e7d46762e66522445caf | |
parent | 899b172cdc92776d5405858853c4e68a5edf7e88 (diff) |
Updated personalInfoPage and residents page
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> |