Merge branch 'Lab2_Base' into Lab2_Hard

This commit is contained in:
Данияр Аглиуллов 2023-02-15 04:39:20 +04:00
commit 643ae3117b

View File

@ -45,15 +45,16 @@ namespace ConfectioneryFileImplement.Models
{
return null;
}
var dateImplement = element.Element("DateImplement")!.Value;
return new()
{
Id = Convert.ToInt32(element.Attribute("Id")),
Sum = Convert.ToDouble(element.Element("Sum")),
Count = Convert.ToInt32(element.Element("Count")),
Status = (OrderStatus)Convert.ToInt32(element.Element("Status")),
PastryId = Convert.ToInt32(element.Element("PastryId")),
DateCreate = Convert.ToDateTime(element.Element("DateCreate")),
DateImplement = Convert.ToDateTime(element.Element("DateImplement")),
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
Sum = Convert.ToDouble(element.Element("Sum")!.Value),
Count = Convert.ToInt32(element.Element("Count")!.Value),
Status = (OrderStatus)Convert.ToInt32(element.Element("Status")!.Value),
PastryId = Convert.ToInt32(element.Element("PastryId")!.Value),
DateCreate = Convert.ToDateTime(element.Element("DateCreate")!.Value),
DateImplement = string.IsNullOrEmpty(dateImplement) ? null : Convert.ToDateTime(dateImplement),
};
}