Esempio n. 1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        string flag     = "";
        string UserName = txtUsername.Value.Trim();
        string Password = txtPass.Value.Trim();

        if (UserName == "请输入您的用户名" && Password == "")
        {
            UserName = "******";
            Password = "******";
        }

        BLL_Login bll = new BLL_Login("BaseSystem");

        Session["UserName"] = UserName;
        flag = bll.CheckUser_BaseSys(UserName, Password);
        if (flag == "true")
        {
            Session["DoMain"] = "sys";
            bll = new BLL_Login("BaseSystem");
            Response.Redirect("indexMap.aspx");
        }
        else
        {
            Label1.Text = flag;
        }
    }