mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2024-10-20 01:00:35 +02:00
0806b25c79
- 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
32 lines
841 B
C#
32 lines
841 B
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HospitalServerManager.Model.Basic
|
|
{
|
|
class Room : SqlTable
|
|
{
|
|
public int PlacesNumber { get; protected set; }
|
|
public bool IsSpecialCare { get; protected set; }
|
|
|
|
protected Room() : base() { }
|
|
public Room(List<string> listOfValues)
|
|
: base(listOfValues[0], "Nr_sali", new List<string>())
|
|
{
|
|
if (int.TryParse(listOfValues[1], out int placesNumber))
|
|
PlacesNumber = placesNumber;
|
|
IsSpecialCare = bool.Parse(listOfValues[2]);
|
|
}
|
|
[JsonConstructor]
|
|
protected Room(int roomNumber, int numberOfBeds, bool increasedCare)
|
|
:base(roomNumber.ToString(), "Nr_sali", new List<string>())
|
|
{
|
|
PlacesNumber = numberOfBeds;
|
|
IsSpecialCare = increasedCare;
|
|
}
|
|
}
|
|
}
|