protected virtual void Page_Load(object sender, EventArgs e) { if (!this.mIsPageLoaded) { this.mIsPageLoaded = true; } else { return; } ClsSysCurrentUser CurrentUser = this.pCurrentUser; if (this.mCheckLogin) { if (!CurrentUser.pIsLoggedIn) { if (!this.mIsPageLogin) { this.Session.Clear(); this.pCurrentUser_New(); this.Response.Redirect("~/Page/Default.aspx"); return; } } else { if (this.mIsPageLogin) { this.Response.Redirect("~/Page/Menu.aspx"); } } } //[-] if (!this.IsPostBack) { this.SetupPage_ObjID(); } else { this.mObjID = (string)this.ViewState[CnsObjID]; this.mProperties = (ClsBaseMain_Master_Properties)this.ViewState[CnsProperties]; } }
public void Setup( bool pIsPageLogin = false , bool pCheckLogin = true , Layer02_Constants.eSystem_Modules pSystem_ModulesID = Layer02_Constants.eSystem_Modules.None , bool pIsAdminPage = false , bool pIsContributorPage = false , bool pIsShowLoginPanel = true) { this.mIsPageLogin = pIsPageLogin; this.mCheckLogin = pCheckLogin; this.mIsAdminPage = pIsAdminPage; this.mIsContributorPage = pIsContributorPage; this.mIsShowLoginPanel = pIsShowLoginPanel; this.mProperties = new ClsBaseMain_Master_Properties(); this.mProperties.System_ModulesID = pSystem_ModulesID; this.ViewState[CnsProperties] = this.mProperties; }