Esempio n. 1
0
        protected void BtnReset_Click(object sender, EventArgs e)
        {
            UserBl userBl = new UserBl();
            User user = userBl.GetUserByItCode(this.TxtUserName.Text);

            if (user != null)
            {
                userBl.SendPassword(user.ItCode);

                this.LtrMsg.Text = "The password has been send to your lenovo mail box!";
            }
            else
            {
                this.LtrMsg.Text = "Invalid ItCode!";
            }

            this.Page.Form.DefaultButton = this.BtnLogin.UniqueID;
        }
Esempio n. 2
0
        public static bool LoginDirect(string username)
        {
            UserBl userBl = new UserBl();
            User user = userBl.GetUserByItCode(username);

            SessionUser sUser = LoginPrivate(user);

            if (sUser != null)
                return true;
            else
                return false;
        }