1
0
mirror of https://github.com/SirLecram/HospitalServerManager synced 2024-07-17 18:30:30 +02:00
admissionManager/ViewModel/PatientViewModel.cs

38 lines
1.0 KiB
C#
Raw Normal View History

using HospitalServerManager.InterfacesAndEnums;
using HospitalServerManager.Model.Basic;
using System;
2018-11-18 18:49:40 +01:00
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalServerManager.ViewModel
{
//Zmienic interfejs na taki dla viewmodeli
class PatientViewModel : IPrimaryKeyGetable
2018-11-18 18:49:40 +01:00
{
private Patient model;
public string PrimaryKey { get => model.PrimaryKey; }
public string Name { get => model.Name; }
public string Surname { get => model.Surname; }
public DateTime BirthDate { get => model.BirthDate; }
public string PatientState { get => model.PatientState.GetEnumDescription(); }
public string PatientSex { get => model.PatientSex.GetEnumDescription(); }
2018-11-18 18:49:40 +01:00
public PatientViewModel(Patient patient)
2018-11-18 18:49:40 +01:00
{
model = patient;
}
public string GetPrimaryKey()
{
return PrimaryKey;
}
public string GetPrimaryKeyName()
{
return model.PrimaryKeyName;
2018-11-18 18:49:40 +01:00
}
}
}