2018-12-22 15:52:17 +01:00
|
|
|
|
using HospitalServerManager.Model.Basic;
|
|
|
|
|
using HospitalServerManager.InterfacesAndEnums;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace HospitalServerManager.ViewModel
|
|
|
|
|
{
|
2019-01-07 19:49:48 +01:00
|
|
|
|
class SurgeryViewModel : IPrimaryKeyGetable
|
2018-12-22 15:52:17 +01:00
|
|
|
|
{
|
|
|
|
|
private Surgery model;
|
|
|
|
|
public string PrimaryKey { get => model.PrimaryKey; }
|
|
|
|
|
public string SurgeryName { get => model.SurgeryName; }
|
|
|
|
|
public TimeSpan AverageTime { get => model.AverageTime; }
|
|
|
|
|
public string KindOfSurgery { get => model.KindOfSurgery.GetEnumDescription(); }
|
|
|
|
|
public decimal Cost { get => model.Cost; }
|
|
|
|
|
public int Refoundation { get => model.Refoundation; }
|
|
|
|
|
|
|
|
|
|
public SurgeryViewModel(Surgery model)
|
|
|
|
|
{
|
|
|
|
|
this.model = model;
|
|
|
|
|
}
|
2019-01-07 19:49:48 +01:00
|
|
|
|
|
|
|
|
|
public string GetPrimaryKey()
|
|
|
|
|
{
|
|
|
|
|
return PrimaryKey;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GetPrimaryKeyName()
|
|
|
|
|
{
|
|
|
|
|
return model.PrimaryKeyName;
|
|
|
|
|
}
|
2019-01-11 22:32:18 +01:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return PrimaryKey + " " + SurgeryName;
|
|
|
|
|
}
|
2018-12-22 15:52:17 +01:00
|
|
|
|
}
|
|
|
|
|
}
|