fix
This commit is contained in:
parent
f6916f2cc1
commit
d7b015b447
@ -10,8 +10,6 @@ namespace GiftShopFileImplement.Models
|
||||
{
|
||||
public int GiftId { get; private set; }
|
||||
|
||||
public string GiftName { get; private set; }
|
||||
|
||||
public int Count { get; private set; }
|
||||
|
||||
public double Sum { get; private set; }
|
||||
@ -34,7 +32,6 @@ namespace GiftShopFileImplement.Models
|
||||
{
|
||||
Id = model.Id,
|
||||
GiftId = model.GiftId,
|
||||
GiftName = model.GiftName,
|
||||
Count = model.Count,
|
||||
Sum = model.Sum,
|
||||
Status = model.Status,
|
||||
@ -53,7 +50,6 @@ namespace GiftShopFileImplement.Models
|
||||
{
|
||||
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
|
||||
GiftId = Convert.ToInt32(element.Element("GiftId")!.Value),
|
||||
GiftName = element.Element("GiftName")!.Value,
|
||||
Count = Convert.ToInt32(element.Element("Count")!.Value),
|
||||
Sum = Convert.ToDouble(element.Element("Sum")!.Value),
|
||||
Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), element.Element("Status")!.Value),
|
||||
@ -73,7 +69,6 @@ namespace GiftShopFileImplement.Models
|
||||
return;
|
||||
}
|
||||
GiftId = model.GiftId;
|
||||
GiftName = model.GiftName;
|
||||
Count = model.Count;
|
||||
Sum = model.Sum;
|
||||
Status = model.Status;
|
||||
@ -85,7 +80,6 @@ namespace GiftShopFileImplement.Models
|
||||
{
|
||||
Id = Id,
|
||||
GiftId = GiftId,
|
||||
GiftName = GiftName,
|
||||
Count = Count,
|
||||
Sum = Sum,
|
||||
Status = Status,
|
||||
@ -95,7 +89,6 @@ namespace GiftShopFileImplement.Models
|
||||
|
||||
public XElement GetXElement => new("Order",
|
||||
new XAttribute("Id", Id),
|
||||
new XElement("GiftName", GiftName),
|
||||
new XElement("GiftId", GiftId.ToString()),
|
||||
new XElement("Count", Count.ToString()),
|
||||
new XElement("Sum", Sum.ToString()),
|
||||
|
Loading…
Reference in New Issue
Block a user