|
|
@ -1,11 +1,13 @@ |
|
|
using System; |
|
|
using SunlightAggregationManager.ViewModel; |
|
|
|
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Text.Json; |
|
|
using System.Data; |
|
|
|
|
|
using System.Security.Cryptography.Pkcs; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
|
|
|
using System.Text.Json; |
|
|
|
|
|
using System.Xml.Linq; |
|
|
using TouchSocket.Core; |
|
|
using TouchSocket.Core; |
|
|
using TouchSocket.Sockets; |
|
|
using TouchSocket.Sockets; |
|
|
using SunlightAggregationManager.ViewModel; |
|
|
|
|
|
using System.Security.Cryptography.Pkcs; |
|
|
|
|
|
|
|
|
|
|
|
namespace SunlightAggregationManager.UserClass |
|
|
namespace SunlightAggregationManager.UserClass |
|
|
{ |
|
|
{ |
|
|
@ -77,6 +79,19 @@ namespace SunlightAggregationManager.UserClass |
|
|
|
|
|
|
|
|
Console.WriteLine("[Log on]User[" + deserializedPerson?.User + "]IP[" + deserializedPerson?.IP ?? client.IP + |
|
|
Console.WriteLine("[Log on]User[" + deserializedPerson?.User + "]IP[" + deserializedPerson?.IP ?? client.IP + |
|
|
"]ID[" + client.Id + "]Terminal[" + (deserializedPerson?.Terminal ?? "unknown device") + "]"); |
|
|
"]ID[" + client.Id + "]Terminal[" + (deserializedPerson?.Terminal ?? "unknown device") + "]"); |
|
|
|
|
|
|
|
|
|
|
|
//返回登录信息
|
|
|
|
|
|
Dictionary<string, object> login = new Dictionary<string, object>(); |
|
|
|
|
|
DataRow? dat = MainWindowViewModel.Selet_Row(MainWindowViewModel._userData,"User='" + |
|
|
|
|
|
deserializedPerson?.User + "' and Password ='" + deserializedPerson?.Password + "'"); |
|
|
|
|
|
login.Add("Enterprise", dat?.Field<object>("Enterprise")??""); |
|
|
|
|
|
login.Add("Department", dat?.Field<object>("Department") ?? ""); |
|
|
|
|
|
login.Add("Groups", dat?.Field<object>("Groups") ?? ""); |
|
|
|
|
|
login.Add("UserId", dat?.Field<object>("UserID") ?? ""); |
|
|
|
|
|
login.Add("UserName", dat?.Field<object>("Name") ?? ""); |
|
|
|
|
|
|
|
|
|
|
|
var d = JsonSerializer.Serialize(login); |
|
|
|
|
|
client.SendAsync(d); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
|