/// <summary> /// 登录后获取管理员 ID和权限列表 /// </summary> /// <param name="e"></param> protected override void OnLoad(EventArgs e) { tbl_canshu cs = new tbl_canshu(); cs.GetModel(1); if (cs.jiesuan_flag == 1) { Response.Write("<script language='javascript'>alert('系统正在结算中,请稍后访问!');</script>"); return; } tbl_open bll_open = new tbl_open(); bll_open.GetModel(1); if (bll_open.open_flag == 1) { Response.Write("<script language=javascript>alert('" + bll_open.tishi + "!');top.location.href='/index.aspx';</script>"); return; } if (Session["hy_id1"] == null) { Response.Write("<script language=javascript>alert('您已经退出系统,请通过微信公众号重新登录!');top.location.href='/shop/index.aspx';</script>"); Response.End(); //Response.Redirect("~/shop/index.aspx"); } else { hy_id1 = Session["hy_id1"].ToString(); hy_bianhao1 = Session["hy_bianhao1"].ToString(); } base.OnLoad(e); }
protected void Page_Load(object sender, EventArgs e) { Response.Redirect("shop/index.aspx"); Response.End(); //系统关闭提示 tbl_open bll_open = new tbl_open(); bll_open.GetModel(1); if (bll_open.open_flag == 1) { Response.Write(bll_open.tishi); Response.End(); } ImageButton Button1 = (ImageButton)this.Master.FindControl("ibtnLogin");//Button1是用母版页上的一个button记住不在母版页上为它写任何的事件代码。 Button1.Click += new ImageClickEventHandler(ibtnLogin_Click); }