Skip to content

Commit 2025246

Browse files
authored
Modify the model changes
Modify the model changes
1 parent cc281a8 commit 2025246

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

SfDataGridDemo/Model/Model.cs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ public class OrderInfo : INotifyPropertyChanged
1010
string country;
1111
string customerName;
1212
string shippingCity;
13-
private decimal unitPrice;
13+
decimal unitPrice;
14+
bool _review;
1415

1516
public int OrderID
1617
{
@@ -45,14 +46,9 @@ public string ShipCity
4546
public decimal UnitPrice
4647
{
4748
get { return unitPrice; }
48-
set
49-
{
50-
unitPrice = value;
51-
this.RaisePropertyChanged("UnitPrice");
52-
}
49+
set { unitPrice = value; this.RaisePropertyChanged("UnitPrice"); }
5350
}
54-
55-
private bool _review;
51+
5652
public bool Review
5753
{
5854
get { return _review; }
@@ -64,15 +60,15 @@ public OrderInfo()
6460

6561
}
6662

67-
public OrderInfo(int orderId, string customerName, string country, string customerId, string shipCity, decimal unitPrice)
63+
public OrderInfo(int orderId, string customerName, string country, string customerId, string shipCity, decimal unitPrice, bool review)
6864
{
6965
this.OrderID = orderId;
7066
this.CustomerName = customerName;
7167
this.Country = country;
7268
this.CustomerID = customerId;
7369
this.ShipCity = shipCity;
7470
this.UnitPrice = unitPrice;
75-
71+
this.Review = review;
7672
}
7773

7874
public event PropertyChangedEventHandler PropertyChanged;
@@ -82,4 +78,4 @@ public void RaisePropertyChanged(string propName)
8278
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
8379
}
8480
}
85-
}
81+
}

0 commit comments

Comments
 (0)