From 89f3006ea4c2be7f49a3302c055020d3682a6b05 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Wed, 31 May 2017 10:51:05 +0200 Subject: Cleaned models, updated DCD. --- .../ApartmentManager/Model/Apartment.cs | 2 -- .../ApartmentManager/Model/ApartmentChange.cs | 2 +- ApartmentManager/ApartmentManager/Model/Defect.cs | 18 ------------------ ApartmentManager/ApartmentManager/Model/User.cs | 3 ++- Diagrams/DCD.png | Bin 0 -> 374167 bytes Diagrams/DCD.vsdx | Bin 109929 -> 130157 bytes 6 files changed, 3 insertions(+), 22 deletions(-) create mode 100644 Diagrams/DCD.png diff --git a/ApartmentManager/ApartmentManager/Model/Apartment.cs b/ApartmentManager/ApartmentManager/Model/Apartment.cs index a32c081..3096214 100644 --- a/ApartmentManager/ApartmentManager/Model/Apartment.cs +++ b/ApartmentManager/ApartmentManager/Model/Apartment.cs @@ -14,8 +14,6 @@ namespace ApartmentManager.Model public string Address { get; set; } private string _planPicture; - public Apartment() { } - public string PlanPicture { get => _planPicture; diff --git a/ApartmentManager/ApartmentManager/Model/ApartmentChange.cs b/ApartmentManager/ApartmentManager/Model/ApartmentChange.cs index 640112c..608db89 100644 --- a/ApartmentManager/ApartmentManager/Model/ApartmentChange.cs +++ b/ApartmentManager/ApartmentManager/Model/ApartmentChange.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; namespace ApartmentManager { - public class ApartmentChange + public class ApartmentChange : INotifyPropertyChanged { public int ChangeId { get; set; } public int ApartmentId { get; set; } diff --git a/ApartmentManager/ApartmentManager/Model/Defect.cs b/ApartmentManager/ApartmentManager/Model/Defect.cs index 6e78e66..29f8b55 100644 --- a/ApartmentManager/ApartmentManager/Model/Defect.cs +++ b/ApartmentManager/ApartmentManager/Model/Defect.cs @@ -14,27 +14,9 @@ namespace ApartmentManager.Model public DateTime UploadDate { get; set; } public string Description { get; set; } public string Status { get; set; } - public string MainPicture { get; set; } private ObservableCollection _pictures; private ObservableCollection _comments; - public Defect() { } - - public Defect(int defectId, int apartmentId, string name, DateTime uploadDate, string description, string status) - { - DefectId = defectId; - ApartmentId = apartmentId; - Name = name; - UploadDate = uploadDate; - Description = description; - Status = status; - } - - public override string ToString() - { - return string.Format($"Defect ID: {DefectId}, Apartment number: {ApartmentId}, Name: {Name}, Upload date: {UploadDate}, Description: {Description}, Status: {Status}"); - } - public ObservableCollection Pictures { get => _pictures; diff --git a/ApartmentManager/ApartmentManager/Model/User.cs b/ApartmentManager/ApartmentManager/Model/User.cs index 26a6b29..e91fdcd 100644 --- a/ApartmentManager/ApartmentManager/Model/User.cs +++ b/ApartmentManager/ApartmentManager/Model/User.cs @@ -16,10 +16,11 @@ namespace ApartmentManager.Model public DateTimeOffset BirthDate { get; set; } public string Phone { get; set; } public string Email { get; set; } - public string _picture { get; set; } public DateTimeOffset? MoveInDate { get; set; } public DateTimeOffset? MoveOutDate { get; set; } + private string _picture; + public string Picture { get => _picture; diff --git a/Diagrams/DCD.png b/Diagrams/DCD.png new file mode 100644 index 0000000..e212d65 Binary files /dev/null and b/Diagrams/DCD.png differ diff --git a/Diagrams/DCD.vsdx b/Diagrams/DCD.vsdx index 9f9e57e..2c80690 100644 Binary files a/Diagrams/DCD.vsdx and b/Diagrams/DCD.vsdx differ -- cgit v1.2.3