public void LogToTable(string clientkey, string tablename, ModifyOperate operate) { NetClient client = NetClientManager.GetNetClient(clientkey); string hostname = client.HostName; lock (mLogTable) { int index = mLogTable.Rows.Count; DataRow row = mLogTable.NewRow(); row["id"] = index; row["hostname"] = hostname; row["tablename"] = tablename; row["operate"] = operate.ToString(); row["edittime"] = DateTime.Now; mLogTable.Rows.Add(row); mTableUnitManager.MarkTableChanged("sys_remote_log"); mTableUnitManager.SaveTable("sys_remote_log"); } }