protected void Page_Load(object sender, EventArgs e) { if (!this.IsUserLogin) { // 未登录 this.TopWindowLocation(WebCommon.GetLoginPageUrl()); return; } this.a_reloginPageUrl.HRef = WebCommon.GetReloginPageUrl(); this.a_modifyPasswordPageUrl.HRef = WebCommon.GetModifyPasswordPageUrl(); this.lbl_zsmc.InnerText = this.UserInfo.UserName; }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { //string parentID = this.Request.QueryString["parentID"]; if (!this.IsUserLogin) { // 未登录 this.TopWindowLocation(WebCommon.GetLoginPageUrl()); return; } if (!this.UserInfo.HasAttribute(系统管理员特性编号)) { this.ResponseRedirect(UserInfo.UserName + "(" + UserInfo.LoginName + ")" + ",您不是系统管理员,没有 管理中心 权限!", "top"); return; } } }
protected void Button1_Click(object sender, EventArgs e) { string loginName = this.TextBox1.Text.TrimString(); if (loginName.IsEmpty()) { this.Label1.Text = "请输入用户名"; return; } Bigdesk8.Business.UserRightManager.UserRightManager um = new Bigdesk8.Business.UserRightManager.UserRightManager(); if (!um.UserExists(loginName)) { this.Label1.Text = "用户名不存在"; return; } else { Session[WebCommon.GetLoginSessionName()] = loginName; this.Response.Redirect("Index.aspx"); return; } }
protected override void OnPreLoad(EventArgs e) { base.OnPreLoad(e); this.UserInfo = new UserRightInfo(WebCommon.GetLoginNameFromSession()); }
protected void Page_Load(object sender, EventArgs e) { this.rootPath = WebCommon.GetRootUrl(); }