protected void Page_Load(object sender, EventArgs e) { string sLinkID = Request.QueryString["LinkID"]; if (sLinkID == null) { ErrorResponse.InnerText = "You must specify a link ID in your request"; return; } m_apiInterop = new ApiInterop(Context, Server, Startup.apiRoot); DoReport(sLinkID); }
protected void Page_Load(object sender, EventArgs e) { m_auth = new Auth(LoginOutButton, Request, Session, Context.GetOwinContext().Environment["System.Web.HttpContextBase"] as HttpContextBase, ViewState, $"{Startup.s_sRoot}/CalendarLink.aspx", null, OnAfterLogin, null, null); m_apiInterop = new ApiInterop(Context, Server, Startup.apiRoot); ConnectionStringSettings conn = ConfigurationManager.ConnectionStrings["dbSchedule"]; string sSqlConnectionString = conn.ConnectionString; DBConn = new SqlConnection(sSqlConnectionString); m_userData = m_auth.CurrentPrivs; // if they login, then we will load new privs m_auth.SetupLoginLogout(); DataGrid1.ItemCommand += new DataGridCommandEventHandler(DataGrid_Command); GoHome.Click += DoGoHome; if (!IsPostBack) { if (m_auth.IsAuthenticated() && m_userData.privs == Auth.UserPrivs.NotAuthenticated) { m_userData = m_auth.LoadPrivs(DBConn); } FillTeamList(m_userData); if (!string.IsNullOrEmpty(m_userData.sTeamName)) { BuildPageSqlQuery(); BindSource(); } else { SqlQuery = null; BindSource(); } } }
/*---------------------------------------------------------------------------- * %%Function: Page_Load * %%Qualified: Rwp.AdminPage.Page_Load * %%Contact: rlittle * * Initialize authentication and api interop * ----------------------------------------------------------------------------*/ protected void Page_Load(object sender, EventArgs e) { m_auth = new Auth(LoginOutButton, Request, Session, Context.GetOwinContext().Environment["System.Web.HttpContextBase"] as HttpContextBase, ViewState, $"{s_sRoot}/admin.aspx", null, null, null, null); m_apiInterop = new ApiInterop(Context, Server, Startup.apiRoot); ConnectionStringSettings conn = ConfigurationManager.ConnectionStrings["dbSchedule"]; string sSqlConnectionString = conn.ConnectionString; DBConn = new SqlConnection(sSqlConnectionString); m_userData = m_auth.LoadPrivs(DBConn); ipClient.InnerText = Request.UserHostAddress; CheckServiceServerConsistency(sSqlConnectionString); EnableUIForAdmin(); m_auth.SetupLoginLogout(); GoHome.Click += DoGoHome; if (!IsPostBack) { rowAddUser.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { m_apiInterop = new ApiInterop(Context, Server, Startup.apiRoot); DoReport(); }