diff --git a/WinForms/WinForms/FormMain.cs b/WinForms/WinForms/FormMain.cs index 6224f4a..db03804 100644 --- a/WinForms/WinForms/FormMain.cs +++ b/WinForms/WinForms/FormMain.cs @@ -68,7 +68,7 @@ namespace WinForms var service = Program.ServiceProvider?.GetService(typeof(FormOrder)); if (!(service is FormOrder form)) return; - var selectedOrder = TreeView.GetNode(typeof(OrderBindingModel));//ошибка + var selectedOrder = TreeView.GetNode(typeof(OrderBindingModel)); if (selectedOrder != null) { diff --git a/WinForms/WinForms/FormOrder.cs b/WinForms/WinForms/FormOrder.cs index 166b32c..143a2ed 100644 --- a/WinForms/WinForms/FormOrder.cs +++ b/WinForms/WinForms/FormOrder.cs @@ -81,6 +81,7 @@ namespace WinForms return; } string? amount = controlInputNullableInt1.Value.ToString(); + if (controlInputNullableInt1.Value == null) amount = null; try {