-
Notifications
You must be signed in to change notification settings - Fork 15
/
Order.cs
64 lines (57 loc) · 1.59 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
60
61
62
63
64
using System;
namespace CustomAppearance {
public class Order : ModelObject {
DateTime date;
bool shipped;
Product product;
int quantity;
public Order() {
this.date = DateTime.Today;
this.shipped = false;
this.product = new Product("", 0);
this.Quantity = 0;
}
public Order(DateTime date, bool shipped, Product product, int quantity) {
this.date = date;
this.shipped = shipped;
this.product = product;
this.quantity = quantity;
}
public DateTime Date {
get { return date; }
set {
if (date != value) {
date = value;
RaisePropertyChanged("Date");
}
}
}
public bool Shipped {
get { return shipped; }
set {
if (shipped != value) {
shipped = value;
RaisePropertyChanged("Shipped");
}
}
}
public Product Product {
get { return product; }
set {
if (product != value) {
product = value;
RaisePropertyChanged("Product");
}
}
}
public int Quantity {
get { return quantity; }
set {
if (quantity != value) {
quantity = value;
RaisePropertyChanged("Quantity");
}
}
}
}
}