-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRoom.cs
118 lines (105 loc) · 2.48 KB
/
Room.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OOP_Project___Hospital_Management_System
{
class Room
{
int room_no;
char floor_no;
string room_status;
int price_per_hour;
string room_type;
public string InPat_Code { get; set; }
public int Room_ID { get; }
public int Room_No
{
get => room_no;
set
{
if (this.room_no >= 0)
{
this.room_no = value;
}
else
{
MessageBox.Show("Room Number can't be negative");
}
}
}
public char Floor_No
{
get => floor_no;
set
{
if (this.floor_no.ToString().Length == 1)
{
this.floor_no = value;
}
else
{
MessageBox.Show("Floor should be correct");
}
}
}
public string Room_status
{
get => room_status;
set
{
if (this.room_status != "")
{
room_status = value;
}
else
{
MessageBox.Show("Status is not correct");
}
}
}
public int Price_Per_Hour
{
get => price_per_hour;
}
public void setPricePerHour()
{
if (this.room_type == "Deluxe")
{
price_per_hour = 1500;
}
else if (this.Room_type == "Private")
{
price_per_hour = 1000;
}
else
{
price_per_hour = 500;
}
}
//public int GetPricePerDay()
//{
// return price_per_hour;
//}
public string Room_type
{
get => room_type;
set
{
if (this.room_type != "")
{
room_type = value;
}
else
{
MessageBox.Show("Value is too short");
}
}
}
//public int GetTotalAmount()
//{
//}
}
}