private void Populate() { LoadData(); UpdateConfigHolder.Visible = false; ServiceRepeater.DataSource = services; ServiceRepeater.DataBind(); NoServicesLit.Visible = services.Count == 0; ServiceEditHolder.Visible = false; ServiceListHolder.Visible = true; AppearanceEditor1.Populate(); ButtonEditor1.Populate(); TabEditor1.Populate(); }
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]); } } }