예제 #1
0
        protected void BtnLogin_Click(object sender, EventArgs e)
        {
            string username = txtName.Text.Trim().ToLower();
            string password = txtPwd.Text.Trim().ToLower();

            AdminUser adminUser = new AdminUser();
            adminUser.UserNm = username;
            adminUser.UserPw = password;

            AdminUserBLL  adminBll = new  AdminUserBLL ();
            if (adminBll.CheckLogin(adminUser))
            {
                if (!txtValidate.Text.ToUpper().Equals(Session["CheckCode"].ToString()))
                {
                    MessageBox.ShowAndRedirect(this, "您输入的验证码有误,请重新输入!", "Login.aspx");
                    return;
                }

                /*设置session变量username为用户名*/
                Session["username"] = username;
                Session["usertype"] = "S";
                Response.Redirect("~/System/EnterpriseUserList.aspx");
            }
            else
            {
                MessageBox.ShowAndRedirect(this, "您输入的用户名称或者密码有误,请重新输入!", "Login.aspx");
            }
        }
예제 #2
0
        public DataSet GetActivityByUserAndDimen(string eUser)
        {
            AdminUserBLL adminBll = new AdminUserBLL();
            DataSet dsEuser = adminBll.GetEnterpriseUserByName(eUser);
            string user_id = dsEuser.Tables[0].Rows[0]["users_id"].ToString();
            adminBll = null;

            DataSet ds = ActivityDAL.GetListAndDimen(user_id);
            return ds;
        }