mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2024-07-17 10:25:30 +02:00
![Marcel Grześ](/assets/img/avatar_default.png)
- EditRecordDialog has been added and edited; Others pages (View) has been added and completed; - All ViewModel and Models was completed; - WebService, ApiComandProvider has full funcionality, - New interface has been created; - Application is working now :) it's time to refractoring and testing
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using HospitalServerManager.InterfacesAndEnums;
|
|
using HospitalServerManager.Model.Basic;
|
|
using System;
|
|
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
|
|
{
|
|
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(); }
|
|
|
|
public PatientViewModel(Patient patient)
|
|
{
|
|
model = patient;
|
|
}
|
|
|
|
public string GetPrimaryKey()
|
|
{
|
|
return PrimaryKey;
|
|
}
|
|
|
|
public string GetPrimaryKeyName()
|
|
{
|
|
return model.PrimaryKeyName;
|
|
}
|
|
}
|
|
}
|