Пример #1
0
        /// <summary>
        /// 上传在线用户
        /// </summary>
        /// <param name="dbName">帐套信息</param>
        /// <param name="time">下次上传数据时间</param>
        public static void UpLoadOnline(string dbName, string time)
        {
            InitHashtable();
            List <UserOnlineModel> lists = MonitorHandler.GetUser(dbName);
            string type = string.Empty;

            foreach (UserOnlineModel uom in lists)
            {
                if (uom.onlineStatus == "1")
                {
                    type = DataSources.EnumOperationType.Add.ToString("d");
                }
                else
                {
                    type = DataSources.EnumOperationType.Update.ToString("d");
                }
                Operation(uom.GetDataTable(), type, dbName);
                //用户行为
                List <BehaviorModel> bmLists = MonitorHandler.GetBehavior(dbName, uom.tbUserOnlineId, time);
                foreach (BehaviorModel bm in bmLists)
                {
                    Operation(bm.GetDataTable(), DataSources.EnumOperationType.Add.ToString("d"), dbName);
                }
            }
        }
Пример #2
0
 /// <summary>
 /// 上传服务站在线状态
 /// </summary>
 public static void UpLoadServerStatus()
 {
     InitHashtable();
     Operation(MonitorHandler.GetServerStatus(), DataSources.EnumOperationType.Add.ToString("d"), string.Empty);
 }