protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication(); if (CalendarId == 0) { Response.Redirect("Calendars.aspx"); } }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication(); if (Request["new"] != null) { int blank = SERVGlobal.Service.CreateBlankLocation(SERVGlobal.User); Response.Redirect("ViewLocation.aspx?locationId=" + blank + "&message=Make sure the location you intend on adding does not already exist!"); } }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication(); if (Request["new"] != null) { int blank = SERVGlobal.Service.CreateBlankMember(SERVGlobal.User); Response.Redirect("ViewMember.aspx?memberId=" + blank); } }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication(); if (IsAdding()) { SERVGlobal.AssertAuthentication((int)SERVDataContract.UserLevel.Controller, "Sorry, only controllers and above have access to contribute to the controller log."); Model = new MilkRunEditViewModel { Controller = MemberName() }; return; } Model = new MilkLogBLL(new MilkRunMapper()).GetRunLogForEdit(Request["RunLogID"]); }
protected override void OnLoad(EventArgs e) { if (Request["Delete"] != null) { SERVGlobal.AssertAuthentication((int)SERVDataContract.UserLevel.Admin, "Sorry, only administrators can delete from the controller log."); SERVGlobal.Service.DeleteRun(RunLogID); Response.Redirect("RecentRuns.aspx"); } if (RunLogID < 0) { SERVGlobal.AssertAuthentication((int)SERVDataContract.UserLevel.Controller, "Sorry, only controllers and above have access to contribute to the controller log."); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); List <Report> reports = SERVBLLFactory.Factory.RunLogBLL().RunReports(); ContentPlaceHolder contentPlaceholderContent = (ContentPlaceHolder)Master.FindControl("contentPlaceholder"); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "<div class=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>\n " + "<strong>Please Note:</strong> This data is cached for 2 minutes. If you log or update a run, you may need to wait before you see it displayed here.</div>" }); foreach (Report r in reports) { contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "<div class=\"row\">" }); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "<div class=\"span12\">" }); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "<a id=\"" + r.Anchor + "\"></a>" }); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "<h3>" + r.Heading + "</h3>" }); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "<p>" + r.Description + "</p> " }); DataGrid dg = new DataGrid(); dg.CssClass = "table table-striped table-bordered table-condensed"; dg.DataSource = r.Results; dg.DataBind(); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, dg); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "</div>" }); contentPlaceholderContent.Controls.AddAt(contentPlaceholderContent.Controls.Count - 1, new Literal() { Text = "</div>" }); } SERVGlobal.AssertAuthentication(); }
protected override void OnLoad(EventArgs e) { if (!IsPostBack) { for (var year = DateTime.Now.Year; year >= 2014; year--) { RunYear.Items.Add(new ListItem(year.ToString(), year.ToString())); } } var selectedYear = RunYear.Items[RunYear.SelectedIndex].Value; SERVGlobal.AssertAuthentication(); dgRecentRuns.DataSource = new RunLogBLL().Report_RunLog(selectedYear); dgRecentRuns.DataBind(); if ((dgRecentRuns.DataSource as DataTable).Rows.Count == 0) { runMessage.Text = "No runs for selected year"; } else { runMessage.Text = ""; } }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication(); }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication(); dgRecentRuns.DataSource = SERVBLLFactory.Factory.RunLogBLL().Report_RunLog(); dgRecentRuns.DataBind(); }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication((int)SERVDataContract.UserLevel.Admin, "Sorry, only admins can access this page."); }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication((int)SERVDataContract.UserLevel.Controller, "Sorry, you don't have access to take control."); this.DefaultNumber = SERVGlobal.User.Member.MobileNumber.Replace(" ", ""); }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication(); pushBulletPanel.Visible = SERVGlobal.PushBulletEnabled; }
protected override void OnLoad(EventArgs e) { SERVGlobal.AssertAuthentication((int)SERVDataContract.UserLevel.Controller, "Sorry, you don't have access to the Bulk SMS tool."); }