mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2025-01-08 21:27:34 +01:00
52f1c1e71f
All database models has been added; All basic ViewModels has been added;
30 lines
947 B
C#
30 lines
947 B
C#
using HospitalServerManager.InterfacesAndEnums;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HospitalServerManager.Model.Basic
|
|
{
|
|
class Surgery : SqlTable
|
|
{
|
|
public string SurgeryName { get; protected set; }
|
|
public TimeSpan AverageTime { get; protected set; }
|
|
public SurgeryKind KindOfSurgery { get; protected set; }
|
|
public decimal Cost { get; protected set; }
|
|
public int Refoundation { get; protected set; }
|
|
|
|
protected Surgery() : base() { }
|
|
public Surgery(List<string> listOfValues)
|
|
: base(listOfValues[0], "Id_operacji", new List<string>())
|
|
{
|
|
SurgeryName = listOfValues[1];
|
|
AverageTime = TimeSpan.Parse(listOfValues[2]);
|
|
KindOfSurgery = listOfValues[3].GetEnumFromDescription<SurgeryKind>();
|
|
Cost = decimal.Parse(listOfValues[4]);
|
|
Refoundation = int.Parse(listOfValues[5]) > 100 ? 100 : int.Parse(listOfValues[5]);
|
|
}
|
|
}
|
|
}
|