void BindOnline() { try { var zone = AdminMgr.GetSelectZoneIdInt(HttpContext.Current, ddlZone); var startTime = DateTime.Today.AddDays(-5); var endTime = DateTime.Today; var list = StatisticOnlineMgr.GetbyDate(zone, startTime, endTime); datagrid2.DataSource = list; datagrid2.DataBind(); } catch (Exception ex) { LogHelper.Insert(ex); } }
public MessageCode JobCreateRecord() { try { StatisticDetailMgr.Create(ShareUtil.ZoneId, DateTime.Today); StatisticKpiMgr.Create(ShareUtil.ZoneId, DateTime.Today); StatisticOnlineMgr.Create(ShareUtil.ZoneId, DateTime.Today); StatisticInfoMgr.Create(ShareUtil.ZoneId); return(MessageCode.Success); } catch (Exception ex) { SystemlogMgr.Error("JobCreateRecord", ex); return(MessageCode.Exception); } }
public MessageCode JobGetOnlineData() { try { int userCount = 0; long totalTime = 0; DateTime curTime = DateTime.Now; NbUserMgr.GetOnline(ref userCount, ref totalTime); var hour = curTime.Hour; StatisticOnlineMgr.Update(ShareUtil.ZoneId, hour.ToString(), curTime.Date, curTime, userCount, totalTime); return(MessageCode.Success); } catch (Exception ex) { SystemlogMgr.Error("JobGetOnlineData", ex); return(MessageCode.Exception); } return(MessageCode.Exception); }