Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (AppUser.Current.Role.Name != "admin")
     {
         Response.Redirect("/cp/");
     }
     if (!IsPostBack)
     {
         sessions = new StreamingLiveLib.TrafficSessions(StreamingLiveLib.TrafficMinutes.Load(DateTime.Today.AddDays(-5), DateTime.Today.AddDays(1), AppUser.Current.Site.KeyName + ".streaminglive.church"));
         sessions = sessions.Sort("StartTime", true);
         ServiceRepeater.DataSource = sessions;
         ServiceRepeater.DataBind();
         if (sessions.Count > 0)
         {
             ShowChart(sessions[0]);
         }
     }
 }
Пример #2
0
 private void LoadSessions()
 {
     Sessions = new StreamingLiveLib.TrafficSessions(StreamingLiveLib.TrafficMinutes.Load(DateTime.Today.AddDays(-5), DateTime.Today.AddDays(1), AppUser.CurrentSite.KeyName + ".streaminglive.church"));
     Sessions = Sessions.Sort("StartTime", true);
 }