-
Notifications
You must be signed in to change notification settings - Fork 0
/
order.cs
59 lines (55 loc) · 1.31 KB
/
order.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Prachecnaya
{
class order
{
public uint id;
public List<serivce> serivces= new List<serivce>();
private uint price;
private string dateIn ;
private string dateOut;
public bool isReady=false;
public bool isTake;
public order(uint id,List<serivce> pampam )
{
this.id = id;
this.dateIn = DateTime.Now.ToString();
this.isReady = false;
this.isTake = false;
this.serivces = pampam;
}
public void addService(serivce ADD)
{
serivces.Add(ADD);
}
public void toTakePrice()
{
price = 0;
foreach (serivce Serv in serivces)
{
price += Serv.getPrice();
}
}
public void setDataOut()
{
dateOut= DateTime.Now.ToString();
}
public uint getPrice()
{
toTakePrice();
return price;
}
public string getDateIn()
{
return dateIn;
}
public string getDateOut()
{
return dateOut;
}
}
}