Example #1
0
        public static void ShowNote(question_data data)
        {
            frmNote note = new frmNote(data);

            note.Owner = _this;
            note.ShowDialog();
        }
Example #2
0
 private void btnLogIn_Click(object sender, EventArgs e)
 {
     if (UserControllers.getUser(this.txtUsername.Text.Trim()) != null && UserControllers.checkPassword(this.txtUsername.Text.Trim(), this.txtPassword.Text.Trim()) == true)
     {
         MessageBox.Show("Đăng nhập thành công", "Thông báo", MessageBoxButtons.OK);
         this.Hide();
         frmNote f2 = new frmNote(this.txtUsername.Text.Trim());
         f2.ShowDialog();
         this.Show();
         this.txtUsername.Clear();
         this.txtPassword.Clear();
     }
     else
     {
         MessageBox.Show("Sai tên đăng nhập hoặc mật khẩu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         txtUsername.Clear();
         txtPassword.Clear();
         txtUsername.TabIndex = 1;
     }
 }