end lab2
This commit is contained in:
parent
b118e4b633
commit
40637ffd0f
@ -51,8 +51,8 @@ namespace PizzeriaFileImplement.Models
|
|||||||
Count = Convert.ToInt32(element.Element("Count")!.Value),
|
Count = Convert.ToInt32(element.Element("Count")!.Value),
|
||||||
Sum = Convert.ToDouble(element.Element("Sum")!.Value),
|
Sum = Convert.ToDouble(element.Element("Sum")!.Value),
|
||||||
Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), element.Element("Status")!.Value),
|
Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), element.Element("Status")!.Value),
|
||||||
DateCreate = DateTime.Parse(element.Element("DateCreate")!.Value),
|
DateCreate = Convert.ToDateTime(element.Element("DateCreate")!.Value),
|
||||||
DateImplement = DateTime.Parse(element.Element("DateImplement")!.Value)
|
DateImplement = string.IsNullOrEmpty(element.Element("DateImplement")!.Value) ? null : Convert.ToDateTime(element.Element("DateImplement")!.Value)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
public void Update(OrderBindingModel? model)
|
public void Update(OrderBindingModel? model)
|
||||||
@ -76,7 +76,7 @@ namespace PizzeriaFileImplement.Models
|
|||||||
DateImplement = DateImplement
|
DateImplement = DateImplement
|
||||||
};
|
};
|
||||||
|
|
||||||
public XElement GetXElement => new("Component",
|
public XElement GetXElement => new("Order",
|
||||||
new XAttribute("Id", Id),
|
new XAttribute("Id", Id),
|
||||||
new XElement("PizzaId", PizzaId),
|
new XElement("PizzaId", PizzaId),
|
||||||
new XElement("Count", Count.ToString()),
|
new XElement("Count", Count.ToString()),
|
||||||
|
Loading…
Reference in New Issue
Block a user