From 28f3cb773d37c48e42fde411ddc06e9ad4eef75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=BA=20=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Wed, 1 Mar 2023 10:36:05 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B0=D0=B4=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=87=D1=82=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=B0?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B2=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=BA=D0=B0=D0=B7=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlacksmithWorkshopFileImplement/Models/Order.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/Models/Order.cs b/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/Models/Order.cs index c39e6ef..8ce8605 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/Models/Order.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopFileImplement/Models/Order.cs @@ -38,6 +38,11 @@ namespace BlacksmithWorkshopFileImplement.Models { return null; } + DateTime? dateImplement = null; + if (element.Element("DateImplement")!.Value != "") + { + dateImplement = Convert.ToDateTime(element.Element("DateImplement")!.Value); + } return new Order() { Id = Convert.ToInt32(element.Attribute("Id")!.Value), @@ -46,7 +51,7 @@ namespace BlacksmithWorkshopFileImplement.Models Sum = Convert.ToDouble(element.Element("Sum")!.Value), Status = (OrderStatus)Convert.ToInt32(element.Element("Status")!.Value), DateCreate = Convert.ToDateTime(element.Element("DateCreate")!.Value), - DateImplement = Convert.ToDateTime(element.Element("DateImplement")!.Value) + DateImplement = dateImplement }; } public void Update(OrderBindingModel? model)