예제 #1
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            if (TaiKhoan.IsValid(txtTenDangNhap.Text, txtMatKhau.Text))
            {
                TAIKHOAN tk = TaiKhoan.Select(txtTenDangNhap.Text);
                GlobalSettings.UserID   = TaiKhoan.FullUserID(tk);
                GlobalSettings.UserName = txtTenDangNhap.Text;
                GlobalSettings.UserType = (UserType)TaiKhoan.FullUserType(tk);

                Settings.Default.Login_UserName = txtTenDangNhap.Text;
                Settings.Default.Login_Password = txtMatKhau.Text;
                Settings.Default.Save();

                this.DialogResult = DialogResult.OK;
            }
            else
            {
                lblNotification.Text = "Tên đăng nhập hoặc mật khẩu không chính xác";
                System.Media.SystemSounds.Exclamation.Play();
            }
        }
예제 #2
0
 public frmDoiMatKhau(string userName)
 {
     InitializeComponent();
     currentUser = TaiKhoan.Select(userName);
 }