aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Adamonis <dona0169@edu.easj.dk>2017-05-23 12:04:59 +0200
committerDonatas Adamonis <dona0169@edu.easj.dk>2017-05-23 12:04:59 +0200
commit6f42f24e0d6d3a42fd9a852ee9ab02bf9b81f449 (patch)
tree1a6b0c9f55b00dfefa9d7fa00f788e91d992844b
parentad0091548a5b023b74a3f72ca8086cd83b6cc760 (diff)
cahnge datetime? to dateTime
-rw-r--r--ApartmentManager/ApartmentManager/Model/Resident.cs4
-rw-r--r--ApartmentManager/ApartmentManager/Model/User.cs4
-rw-r--r--ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml6
-rw-r--r--ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs2
4 files changed, 8 insertions, 8 deletions
diff --git a/ApartmentManager/ApartmentManager/Model/Resident.cs b/ApartmentManager/ApartmentManager/Model/Resident.cs
index d897d4b..d3d18d3 100644
--- a/ApartmentManager/ApartmentManager/Model/Resident.cs
+++ b/ApartmentManager/ApartmentManager/Model/Resident.cs
@@ -8,7 +8,7 @@ namespace ApartmentManager.Model
public int ApartmentId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
- public DateTime? BirthDate { get; set; }
+ public DateTime BirthDate { get; set; }
public string Phone { get; set; }
public string Email { get; set; }
public byte[] Picture { get; set; }
@@ -29,7 +29,7 @@ namespace ApartmentManager.Model
}
public override string ToString()
{
- return string.Format($"First name: {FirstName}, Last name: {LastName}, Birth date: {BirthDate.Value.Date}, Phone: {Phone}, Email: {Email} ");
+ return string.Format($"First name: {FirstName}, Last name: {LastName}, Birth date: {BirthDate}, Phone: {Phone}, Email: {Email} ");
}
}
}
diff --git a/ApartmentManager/ApartmentManager/Model/User.cs b/ApartmentManager/ApartmentManager/Model/User.cs
index e506791..ea0e004 100644
--- a/ApartmentManager/ApartmentManager/Model/User.cs
+++ b/ApartmentManager/ApartmentManager/Model/User.cs
@@ -15,7 +15,7 @@ namespace ApartmentManager.Model
public bool IsBm { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
- public DateTime? BirthDate { get; set; }
+ public DateTime BirthDate { get; set; }
public string Phone { get; set; }
public string Email { get; set; }
public byte[] Picture { get; set; }
@@ -24,7 +24,7 @@ namespace ApartmentManager.Model
public User() { }
- public User(string FirstName, string LastName, string Phone, DateTime? BirthDate, string Email, int ApartmentNr)
+ public User(string FirstName, string LastName, string Phone, DateTime BirthDate, string Email, int ApartmentNr)
{
this.FirstName = FirstName;
this.LastName = LastName;
diff --git a/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml b/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml
index ea4711e..d654a03 100644
--- a/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml
+++ b/ApartmentManager/ApartmentManager/View/ApartmentResidentsPage.xaml
@@ -48,11 +48,11 @@
<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="{Binding UserSingleton.CurrentUser.BirthDate.Year}" FontSize="20"></TextBlock>
<TextBlock Text="-" FontSize="20"></TextBlock>
- <TextBlock Text="{Binding BirthDate.Month}" FontSize="20"></TextBlock>
+ <TextBlock Text="{Binding UserSingleton.CurrentUser.BirthDate.Month }" FontSize="20"></TextBlock>
<TextBlock Text="-" FontSize="20"></TextBlock>
- <TextBlock Text="{Binding BirthDate.Day}" FontSize="20"></TextBlock>
+ <TextBlock Text="{Binding UserSingleton.CurrentUser.BirthDate.Day}" FontSize="20"></TextBlock>
</StackPanel>
</StackPanel>
diff --git a/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs b/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs
index aa5f0c3..bbda517 100644
--- a/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs
+++ b/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs
@@ -45,7 +45,7 @@ namespace ApartmentManager.View
// if (String.IsNullOrEmpty(TextFilter.Text))
// return true;
// else
- // return ((item as Apartment).BoardMemberCatalogSingleton.IndexOf(TextFilter.Text, StringComparison.OrdinalIgnoreCase) >= 0);
+ // return BoardMemberCatalogSingleton.Instance.Apartment.IndexOf(TextFilter.Text));
//}
//private void txtFilter_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)