添加信息
This commit is contained in:
commit
4004177313
1 file changed
+24
-24
+24
-24
@@ -47,36 +47,36 @@ namespace ForwardingServer
|
|||||||
{
|
{
|
||||||
if (DAT.Length > 5)
|
if (DAT.Length > 5)
|
||||||
{
|
{
|
||||||
DataRow[] r_ = DATA.MachineTable.Select("ID='" + client.Id + "'");
|
DataRow[] r_ = DATA.MachineTable.Select("ID='" + client.Id + "'");
|
||||||
if (r_.Length > 0)
|
if (r_.Length > 0)
|
||||||
{
|
{
|
||||||
int? s_ = r_.First().Field<int?>("Start");
|
int? s_ = r_.First().Field<int?>("Start");
|
||||||
|
|
||||||
if (s_ == 30)
|
if (s_ == 30)
|
||||||
|
{
|
||||||
|
if (DAT.StartsWith("{") || DAT.StartsWith("["))
|
||||||
{
|
{
|
||||||
if (DAT.StartsWith("{") || DAT.StartsWith("["))
|
DATA.Person deserializedPerson = JsonSerializer.Deserialize<DATA.Person>(DAT)!;
|
||||||
|
//转发逻辑
|
||||||
|
var dr = DATA.UserTable.Select("Terminal='" + deserializedPerson.Terminal + "'");
|
||||||
|
if (dr.Length > 0)
|
||||||
{
|
{
|
||||||
DATA.Person deserializedPerson = JsonSerializer.Deserialize<DATA.Person>(DAT)!;
|
DataRow drEmployee = dr.First();
|
||||||
//转发逻辑
|
drEmployee.BeginEdit();
|
||||||
var dr = DATA.UserTable.Select("Terminal='" + deserializedPerson.Terminal + "'");
|
drEmployee["RDAT"] = DAT;
|
||||||
if (dr.Length > 0)
|
drEmployee.EndEdit();
|
||||||
{
|
drEmployee.AcceptChanges();
|
||||||
DataRow drEmployee = dr.First();
|
|
||||||
drEmployee.BeginEdit();
|
|
||||||
drEmployee["RDAT"] = DAT;
|
|
||||||
drEmployee.EndEdit();
|
|
||||||
drEmployee.AcceptChanges();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
Personm deserializedPerson = JsonSerializer.Deserialize<Personm>(DAT)!;
|
{
|
||||||
DATA.MachineTable.Rows.Add(client.Id, client.IP, 30, "/" + deserializedPerson.SERVEREnterprise,
|
Personm deserializedPerson = JsonSerializer.Deserialize<Personm>(DAT)!;
|
||||||
deserializedPerson.SERVERMachineName, deserializedPerson.MachineVer);
|
DATA.MachineTable.Rows.Add(client.Id, client.IP, 30, "/" + deserializedPerson.SERVEREnterprise,
|
||||||
Console.WriteLine("["+DateTime.Now.ToString("yyyy-MM-DD HH:mm:ss:fff")+"] LINK ID " + client.Id + " IP " + client.IP + "\n DATA =" + DAT);
|
deserializedPerson.SERVERMachineName, deserializedPerson.MachineVer);
|
||||||
|
Console.WriteLine("["+DateTime.Now.ToString("yyyy-MM-DD HH:mm:ss:fff")+" [LINK ID " + client.Id + " IP " + client.IP + "]\nDATA =" + DAT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user