HBM.HBMMaster.Page_Init C# (CSharp) Method

Page_Init() protected method

protected Page_Init ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session[Constants.SESSION_LOGGEDUSER] == null)
            {
                ClearSessions();
                Response.Redirect(Constants.URL_LOGIN, false);
            }

            if (LoggedUser != null)
            {
                this.lblLoggedUser.Text = LoggedUser.FirstName + " " + LoggedUser.LastName;

                if (CurrentCompany.CompanyLogo.Length > 0)
                {
                    this.bimgLogo.ContentBytes = this.CurrentCompany.CompanyLogo;
                }
            }
            else
            {
                ClearSessions();
                Response.Redirect(HBM.Common.Constants.URL_LOGIN, false);
            }

            if (CurrentCompany == null)
            {
                ClearSessions();
                Response.Redirect(HBM.Common.Constants.URL_LOGIN, false);
            }
        }