diff --git a/UserClass/AsyncTcpClient.cs b/UserClass/AsyncTcpClient.cs index 21da3eb..e565873 100644 --- a/UserClass/AsyncTcpClient.cs +++ b/UserClass/AsyncTcpClient.cs @@ -25,6 +25,7 @@ using System.Xml.Linq; using TouchSocket.Core; using TouchSocket.Sockets; using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper; +using static SunlightCentralizedControlManagement_SCCM_.View.MachinesView; using static System.Windows.Forms.AxHost; using static System.Windows.Forms.VisualStyles.VisualStyleElement; using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock; @@ -128,7 +129,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass DataRow drEmployee = MainWindowViewModel.Machines.Select("IP='" + client.IP + "'").First(); drEmployee.BeginEdit(); drEmployee["SYSKEY"] = Chart_new.GetValue("SYSKEY").ToString(); - // drEmployee["NAME"] = Chart_new.GetValue("MACHINE").ToString(); + // drEmployee["NAME"] = Chart_new.GetValue("MACHINE").ToString(); drEmployee["Groups"] = Chart_new.GetValue("GROUP").ToString(); drEmployee["State"] = "802"; drEmployee.EndEdit(); @@ -168,11 +169,21 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass } catch (Exception ex) { LogGing.LogGingDATA("[ERR='" + ex + "']=Exception"); MainWindowViewModel.ERR_c++; } } - else if (SYSAPI == "SC830") + else if (SYSAPI == "SC827") { try { + DAT = DAT.Substring(DAT.IndexOf("]") + 1); + MainWindowViewModel.Dyelot_CALL = JsonConvert.DeserializeObject(DAT).Copy();//反序列化 + + } + catch (Exception ex) { LogGing.LogGingDATA("[ERR='" + ex + "']=Exception"); MainWindowViewModel.ERR_c++; } + }//呼叫领料单 + else if (SYSAPI == "SC830") + { + try + { DAT = DAT.Substring(DAT.IndexOf("]") + 1); Dictionary _new = new Dictionary();//缓存函数 _new = JsonConvert.DeserializeObject>(DAT);//反序列化 @@ -244,9 +255,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass { try { - DAT = DAT.Substring(DAT.IndexOf("]") + 1); + DAT = DAT.Substring(DAT.IndexOf("]") + 1); MonitorView.Product_DAT = JsonConvert.DeserializeObject(DAT).Copy();//反序列化 - MonitorView.Product_bool=true; + MonitorView.Product_bool = true; } catch (Exception ex) { LogGing.LogGingDATA("[ERR='" + ex + "']=Exception"); MainWindowViewModel.ERR_c++; } }//当前领料单信息 diff --git a/View/MonitorView.xaml b/View/MonitorView.xaml index 684d80c..7a0e16a 100644 --- a/View/MonitorView.xaml +++ b/View/MonitorView.xaml @@ -120,16 +120,15 @@ - + + CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" CanUserAddRows="False">