public void Login() { DTacc = BLacc.LayTaiKhoanByUsername(txtUsername.Text.Trim(), txtPassword.Text.Trim()); if (DTacc.Rows.Count != 0) { try { string pathPicture = BLacc.getPathPictureByUsername(this.txtPassword.Text); DTacc.Columns.Add(); DTacc.Rows[0][6] = pathPicture; Form f = new FormXuLi(DTacc); this.Hide(); f.ShowDialog(); this.txtPassword.Text = ""; this.txtUsername.Text = ""; this.txtUsername.Focus(); this.Show(); } catch { } } else { MessageBox.Show("Tên đăng nhập hoặc mật khẩu không đúng!!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); txtUsername.Focus(); } }