This commit is contained in:
Максим Сергунов 2023-04-27 23:29:50 +04:00
parent f6916f2cc1
commit d7b015b447

View File

@ -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()),