aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------ApartmentAdmin0
-rw-r--r--ApartmentManager/ApartmentManager/ApartmentManager.csproj16
-rw-r--r--ApartmentManager/ApartmentManager/Assets/plan.jpgbin0 -> 69301 bytes
-rw-r--r--ApartmentManager/ApartmentManager/Model/Resident.cs34
-rw-r--r--ApartmentManager/ApartmentManager/Model/User.cs10
-rw-r--r--ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs2
-rw-r--r--ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml46
-rw-r--r--ApartmentManager/ApartmentManager/View/PlanPage.xaml14
-rw-r--r--ApartmentManager/ApartmentManager/View/PlanPage.xaml.cs30
-rw-r--r--ApartmentManager/ApartmentManager/View/ResidentsPage.xaml29
-rw-r--r--ApartmentManager/ApartmentManager/View/ResidentsPage.xaml.cs30
-rw-r--r--HousingDatabase.ldfbin8388608 -> 8388608 bytes
-rw-r--r--HousingDatabase.mdfbin8388608 -> 8388608 bytes
13 files changed, 197 insertions, 14 deletions
diff --git a/ApartmentAdmin b/ApartmentAdmin
-Subproject f4d7fc3fa885184fb073fbae2aea28a476a85b8
+Subproject da22548164ed3a3a9b89f25b31780c35a89a3b3
diff --git a/ApartmentManager/ApartmentManager/ApartmentManager.csproj b/ApartmentManager/ApartmentManager/ApartmentManager.csproj
index 36cb8cd..cbffb62 100644
--- a/ApartmentManager/ApartmentManager/ApartmentManager.csproj
+++ b/ApartmentManager/ApartmentManager/ApartmentManager.csproj
@@ -104,6 +104,7 @@
<Compile Include="Model\Apartment.cs" />
<Compile Include="Model\NavMenuItem.cs" />
<Compile Include="Model\CatalogSingleton.cs" />
+ <Compile Include="Model\Resident.cs" />
<Compile Include="Model\User.cs" />
<Compile Include="Persistency\Persistency.cs" />
<Compile Include="Properties\Annotations.cs" />
@@ -118,6 +119,12 @@
<Compile Include="View\PersonalInfoPage.xaml.cs">
<DependentUpon>PersonalInfoPage.xaml</DependentUpon>
</Compile>
+ <Compile Include="View\PlanPage.xaml.cs">
+ <DependentUpon>PlanPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="View\ResidentsPage.xaml.cs">
+ <DependentUpon>ResidentsPage.xaml</DependentUpon>
+ </Compile>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
@@ -125,6 +132,7 @@
</AppxManifest>
</ItemGroup>
<ItemGroup>
+ <Content Include="Assets\plan.jpg" />
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
@@ -159,6 +167,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="View\PlanPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="View\ResidentsPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
diff --git a/ApartmentManager/ApartmentManager/Assets/plan.jpg b/ApartmentManager/ApartmentManager/Assets/plan.jpg
new file mode 100644
index 0000000..54df873
--- /dev/null
+++ b/ApartmentManager/ApartmentManager/Assets/plan.jpg
Binary files differ
diff --git a/ApartmentManager/ApartmentManager/Model/Resident.cs b/ApartmentManager/ApartmentManager/Model/Resident.cs
new file mode 100644
index 0000000..b86cf03
--- /dev/null
+++ b/ApartmentManager/ApartmentManager/Model/Resident.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Windows.UI.Xaml.Controls;
+
+namespace ApartmentManager.Model
+{
+ class Resident
+ {
+ public string Name { get; set; }
+ public string LastName { get; set; }
+ public int Phone { get; set; }
+ public DateTime BirthDate { get; set; }
+ public string Email { get; set; }
+ public Image Picture { get; set; }
+ public int ApartmentNr { get; set; }
+
+ public Resident(string Name, string LastName, int Phone, DateTime BirthDate, string Email, int ApartmentNr)
+ {
+ this.Name = Name;
+ this.LastName = LastName;
+ this.Phone = Phone;
+ this.BirthDate = BirthDate;
+ this.Email = Email;
+ this.ApartmentNr = ApartmentNr;
+ }
+ public override string ToString()
+ {
+ return string.Format($"Name: {Name}, LastName: {LastName}, Birth Date: {BirthDate}, Phone {Phone}, Email {Email} ");
+ }
+ }
+}
diff --git a/ApartmentManager/ApartmentManager/Model/User.cs b/ApartmentManager/ApartmentManager/Model/User.cs
index 4559cb0..d9591ab 100644
--- a/ApartmentManager/ApartmentManager/Model/User.cs
+++ b/ApartmentManager/ApartmentManager/Model/User.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Windows.UI.Xaml.Controls;
namespace ApartmentManager.Model
{
@@ -13,7 +14,16 @@ namespace ApartmentManager.Model
public int Phone { get; set; }
public DateTime BirthDate { get; set; }
public string Email { get; set; }
+ public Image Picture { get; set; }
public int ApartmentNr { get; set; }
+ public string SecondName { get; set; }
+ public string SecondLastName { get; set; }
+ public string SecondBirthDate { get; set; }
+ public string SecondPhone { get; set; }
+ public string SecondEmail { get; set; }
+ public string Username { get; set; }
+ public string Password { get; set; }
+
public User() { }
diff --git a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs
index f977517..38c1673 100644
--- a/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs
+++ b/ApartmentManager/ApartmentManager/View/ApartmentPage.xaml.cs
@@ -29,7 +29,7 @@ namespace ApartmentManager.View
private void click(object sender, RoutedEventArgs e)
{
-
+ Frame.Navigate(typeof(PlanPage));
}
private void GotoPernalInfoPage(object sender, RoutedEventArgs e)
diff --git a/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml
index 5e84fcf..2d09cb1 100644
--- a/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml
+++ b/ApartmentManager/ApartmentManager/View/PersonalInfoPage.xaml
@@ -1,26 +1,46 @@
<Page
- x:Class="ApartmentManager.View.PersonalInfoPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ApartmentManager.View"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:ViewModel="using:ApartmentManager.ViewModel"
+ x:Class="ApartmentManager.View.PersonalInfoPage"
mc:Ignorable="d">
+ <Page.DataContext>
+ <ViewModel:ApartmentViewModel/>
+ </Page.DataContext>
+
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
- <StackPanel Margin="50">
+ <StackPanel Margin="50" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
+ <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="Name"></TextBlock>
- <TextBox ></TextBox>
- <TextBlock Margin="0,10,0,10" Text="Last Name"></TextBlock>
- <TextBox ></TextBox>
- <TextBlock Margin="0,10,0,10" Text="Birthdate"></TextBlock>
- <DatePicker HorizontalAlignment="Stretch"></DatePicker>
- <TextBlock Margin="0,10,0,10" Text="Email Address"></TextBlock>
- <TextBox ></TextBox>
- <TextBlock Margin="0,10,0,10" Text="Phone Number"></TextBlock>
- <TextBox ></TextBox>
- <Button Margin="0,10,0,10" Content="Update" HorizontalAlignment="Stretch"></Button>
+ <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"/>
</StackPanel>
</StackPanel>
</Grid>
diff --git a/ApartmentManager/ApartmentManager/View/PlanPage.xaml b/ApartmentManager/ApartmentManager/View/PlanPage.xaml
new file mode 100644
index 0000000..5769290
--- /dev/null
+++ b/ApartmentManager/ApartmentManager/View/PlanPage.xaml
@@ -0,0 +1,14 @@
+<Page
+ x:Class="ApartmentManager.View.PlanPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="using:ApartmentManager.View"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d">
+
+ <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
+ <Image Source="ms-appx:///Assets/plan.jpg" Margin="50"></Image>
+
+ </Grid>
+</Page>
diff --git a/ApartmentManager/ApartmentManager/View/PlanPage.xaml.cs b/ApartmentManager/ApartmentManager/View/PlanPage.xaml.cs
new file mode 100644
index 0000000..bce6221
--- /dev/null
+++ b/ApartmentManager/ApartmentManager/View/PlanPage.xaml.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
+
+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 PlanPage : Page
+ {
+ public PlanPage()
+ {
+ this.InitializeComponent();
+ }
+ }
+}
diff --git a/ApartmentManager/ApartmentManager/View/ResidentsPage.xaml b/ApartmentManager/ApartmentManager/View/ResidentsPage.xaml
new file mode 100644
index 0000000..cc924da
--- /dev/null
+++ b/ApartmentManager/ApartmentManager/View/ResidentsPage.xaml
@@ -0,0 +1,29 @@
+<Page
+ x:Class="ApartmentManager.View.ResidentsPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="using:ApartmentManager.View"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d">
+
+ <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
+ <ListView HorizontalAlignment="Left" Height="600" Margin="0,0,50,0" VerticalAlignment="Top" Width="500"/>
+ <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,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>
+ </Grid>
+</Page>
diff --git a/ApartmentManager/ApartmentManager/View/ResidentsPage.xaml.cs b/ApartmentManager/ApartmentManager/View/ResidentsPage.xaml.cs
new file mode 100644
index 0000000..46e9f6f
--- /dev/null
+++ b/ApartmentManager/ApartmentManager/View/ResidentsPage.xaml.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
+
+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 ResidentsPage : Page
+ {
+ public ResidentsPage()
+ {
+ this.InitializeComponent();
+ }
+ }
+}
diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf
index a788913..970a933 100644
--- a/HousingDatabase.ldf
+++ b/HousingDatabase.ldf
Binary files differ
diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf
index 808d5ab..303047c 100644
--- a/HousingDatabase.mdf
+++ b/HousingDatabase.mdf
Binary files differ