SVN r1064

SVN-Revision: r1064
This commit is contained in:
tdx
2025-12-02 04:22:09 +00:00
parent 98a8ef3f22
commit 594e020e24
2 changed files with 854 additions and 921 deletions
@@ -477,40 +477,4 @@ namespace AfkDataService
// try
// {
// MySqlHelper._connection.Close();
// MySqlHelper._connection.Dispose();
// }
// catch (Exception)
// {
// }
// MySqlHelper._connection = null;
// }
// try
// {
// MySqlHelper._connection = new MySqlConnection(connStr);
// MySqlHelper._connection.Open();
// return true;
// }
// catch (Exception ex)
// {
// Console.WriteLine(ex.Message);
// }
// return false;
//}
#endregion
public void SendMessage(TextBox textBox, string message)
{
if (textBox.InvokeRequired)
{
textBox.Invoke(new Action(() =>
{
textBox.AppendText(message);
}));
}
else
{
textBox.AppendText(message);
}
}
#endregion
}
}
//
@@ -293,6 +293,7 @@ namespace AfkDataService
{
//未配置日志表
frmMain.SendMessage(frmMain.toAfkTextBox, $"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}:反写日志==>{abutmentModel.logTabName}成功,但未查询到对应日志表\r\n");
isSuccess = true;
}
}
catch (Exception ex)
@@ -850,35 +851,3 @@ namespace AfkDataService
{
stringBuilder.Append($"getdate() as {selectRow["Field"]},");
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return stringBuilder;
}
/// <summary>
/// 改变afk的同步标识
/// </summary>
/// <param name="item"></param>
/// <param name="dataDirection"></param>
/// <returns></returns>
private string GetChangeSynchroTagSql(AbutmentModel abutmentModel)
{
string sql = "";
try
{
string conditions = string.Empty;
conditions = abutmentModel.targetStrs.Length == 2 ? " where isSynchro is null and " + abutmentModel.targetStrs[1] : "";
sql = string.Format("update {0} set isSynchro='1' {1} ", abutmentModel.afkTabName, conditions);
}
catch (Exception)
{
}
return sql;
}
}
}