Compare commits

..
2 Commits
+6 -4
View File
@@ -57,22 +57,24 @@ namespace ForwardingServerUI.Class
if (s_ == 30)
{
if (DAT.StartsWith("{") || DAT.StartsWith("["))
string trimmedDat = DAT.Trim();
if (!string.IsNullOrEmpty(trimmedDat) &&
(trimmedDat[0] == '{' || trimmedDat[0] == '['))
{
MainWindowViewModel.Person deserializedPerson = JsonSerializer.Deserialize<MainWindowViewModel.Person>(DAT)!;
MainWindowViewModel.Person deserializedPerson = JsonSerializer.Deserialize<MainWindowViewModel.Person>(trimmedDat)!;
//转发逻辑
var dr = MainWindowViewModel._userTable.Select("Terminal='" + deserializedPerson.Terminal + "'");
if (dr.Length > 0)
{
DataRow drEmployee = dr.First();
drEmployee.BeginEdit();
drEmployee["RDAT"] = DAT;
drEmployee["RDAT"] = trimmedDat;
drEmployee.EndEdit();
drEmployee.AcceptChanges();
}
}
}
} else if (s_ == 90) { }
}
else
{