Example #1
0
 public string SendAccountPackage(Account oldAccount, Account newAccount, string keyword)
 {
     if (clientModel.HasFunction(FunctionType.UserSystem))
     {
         while (sending)
         {
             Thread.Sleep(100);
         }
         sending   = true;
         isReceive = false;
         AccountList sendList = new AccountList();
         sendList.AddOldAndNewAccount(oldAccount, newAccount);
         AccountPackage sendPackage = new AccountPackage(sendList, keyword);
         string         send        = JsonSerializer.Serialize(sendPackage);
         Send(send);
         while (!isReceive)
         {
             Thread.Sleep(100);
         }
         sending = false;
         return(receiveMessage);
     }
     else
     {
         return("User System offline, please logoff.");
     }
 }