This commit is contained in:
revengel66 2024-03-13 00:15:17 +04:00
parent b118e4b633
commit 40637ffd0f

View File

@ -50,9 +50,9 @@ namespace PizzeriaFileImplement.Models
PizzaId = Convert.ToInt32(element.Element("PizzaId")!.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),
DateCreate = DateTime.Parse(element.Element("DateCreate")!.Value),
DateImplement = DateTime.Parse(element.Element("DateImplement")!.Value)
Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), element.Element("Status")!.Value),
DateCreate = Convert.ToDateTime(element.Element("DateCreate")!.Value),
DateImplement = string.IsNullOrEmpty(element.Element("DateImplement")!.Value) ? null : Convert.ToDateTime(element.Element("DateImplement")!.Value)
};
}
public void Update(OrderBindingModel? model)
@ -76,7 +76,7 @@ namespace PizzeriaFileImplement.Models
DateImplement = DateImplement
};
public XElement GetXElement => new("Component",
public XElement GetXElement => new("Order",
new XAttribute("Id", Id),
new XElement("PizzaId", PizzaId),
new XElement("Count", Count.ToString()),