private void PhiếuMượnChiTiếtToolStripMenuItem_Click(object sender, EventArgs e) { PhieuMuonChiTiet phieuMuonChiTiet = new PhieuMuonChiTiet(); phieuMuonChiTiet.Show(); this.Hide(); }
public void check() { SqlConnection connect = openSQL(); string queryThuThu = "select * from tblThuThu where maThuThu = '" + taiKhoan.Text + "'and email = '" + matKhau.Text + "';"; SqlCommand cmdThuThu = new SqlCommand(queryThuThu, connect); SqlDataReader readerThuThu = cmdThuThu.ExecuteReader(); if (readerThuThu.HasRows) { PhieuMuonChiTiet phieuMuonChiTiet = new PhieuMuonChiTiet(); phieuMuonChiTiet.Show(); this.Hide(); } else { const string message = "Tài khoản hoặc mật khẩu sai!"; const string caption = "Đăng nhập"; MessageBox.Show(message, caption, MessageBoxButtons.OK); taiKhoan.Focus(); } connect.Close(); }