示例#1
0
文件: LogHelper.cs 项目: viticm/pap2
 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");
     }
 }
示例#2
0
        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");
            }
        }