private void QuanLyTacGia_Load(object sender, EventArgs e) { string sql = "Select *from TacGia"; ac.TaoBang(sql); dataGridViewTacGia.DataSource = ac.TaoBang(sql); Xoa(); }
private void QuanLyThe_Load(object sender, EventArgs e) { string sql1 = "Select *from The"; dataGridViewThe.DataSource = ac.TaoBang(sql1); Xoa(); //Hiển thị mã độc giả cbxMaDocGiaThe.DataSource = LayMaDocGia(); cbxMaDocGiaThe.DisplayMember = "MaDocGia"; }
public static DataTable LayTenTheLoai() { string sql; sql = "Select TenTheLoai from TheLoai "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
public static DataTable LayTenSach() { string sql; sql = "Select TenSach from TuaSach "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
public static DataTable LayMaTheDocGia() { string sql; sql = "Select MaThe from The "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
public static DataTable LayMaTheMuon() { string sql; sql = "Select DISTINCT MaThe from PhieuMuon "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
public static DataTable LayTenNXB() { string sql; sql = "Select TenNhaXuatBan from NhaXuatBan "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
public static DataTable laymasacht() { string sql; sql = "Select masach from Sach "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
public static DataTable LayMaSach() { string sql; sql = "Select MaSach from Sach where hientrang=N'Chưa thuê'"; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
public static DataTable LayTenTheLoai() { string sql; sql = "Select TenTheLoai from TheLoai "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
public static DataTable LayTenSach() { string sql; sql = "Select TenSach from TuaSach "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
public static DataTable LayMaTheMuon() { string sql; sql = "Select DISTINCT MaThe from PhieuMuon "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
public static DataTable LayNgayHenTra() { string sql; sql = "Select NgayTra from PhieuMuon "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
public static DataTable LayMaDocGia() { string sql; sql = "Select MaDocGia from DocGia "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
public static DataTable laymasacht() { string sql; sql = "Select masach from Sach "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
public static DataTable LayMaSach() { string sql; sql = "Select MaSach from Sach where hientrang=N'Chưa thuê'"; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
public static DataTable LayTenNXB() { string sql; sql = "Select TenNhaXuatBan from NhaXuatBan "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return(dt); }
private void QuanLyDocGia_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'quanLyThuVienDataSet1.DocGia' table. You can move, or remove it, as needed. //this.docGiaTableAdapter1.Fill(this.quanLyThuVienDataSet1.DocGia); string sql = "Select *from DocGia"; ac.TaoBang(sql); dataGridViewDocGia.DataSource = ac.TaoBang(sql); Xoa(); }
public static DataTable LayNgayHenTra() { string sql; sql = "Select NgayTra from PhieuMuon "; AccessData db = new AccessData(); DataTable dt; dt = db.TaoBang(sql); return dt; }
private void QuanLySach_Load(object sender, EventArgs e) { string sql = "Select *from TuaSach"; ac.TaoBang(sql); dataGridViewSach.DataSource = ac.TaoBang(sql); //dataGridViewTacGia.DataSource = ac.TaoBang(sql); // Xoa(); //Thêm dữ liệu vào cboTinhTrangSach this.cbxTinhTrangSach.Items.Add("Tốt"); this.cbxTinhTrangSach.Items.Add("Xấu"); this.cbxTinhTrangSach.Items.Add("Bình Thường"); this.cbxTinhTrangSach.SelectedItem = "Tốt"; this.cbxNamXuatBan.SelectedItem = "2010"; // this.cbxKhoSach.SelectedItem = "20X30"; // this.cbxNgonNgu.SelectedItem = "Tiếng việt"; string sql1 = "Select *from TuaSach"; dataGridViewSach.DataSource = ac.TaoBang(sql1); XoaSach(); string sql2 = "Select *from TheLoai"; dataGridViewTheLoai.DataSource = ac.TaoBang(sql2); XoaTheLoai(); string sql3 = "Select *from NhaXuatBan"; dataGridViewNXB.DataSource = ac.TaoBang(sql3); XoaNXB(); //lấy tên tác giả cbxTenTacGiaSach.DataSource = LayTenTacGia(); cbxTenTacGiaSach.DisplayMember = "TenTacGia"; //Lấy tên thể loại cbxTenTheLoai.DataSource = LayTenTheLoai(); cbxTenTheLoai.DisplayMember = "TenTheLoai"; //Lấy tên NXB cbxTenNXBSach.DataSource = LayTenNXB(); cbxTenNXBSach.DisplayMember = "TenNhaXuatBan"; }
private void cbxTenSachTK_SelectedIndexChanged(object sender, EventArgs e) { string sql1 = "Select *from TuaSach where TenSach like N'%" + cbxTenSachTK.Text.ToString() + "%'"; dataGridViewTimKiem.DataSource = ac.TaoBang(sql1); }
private void HienThi() { string sql = "Select *from ChiTietMuonSach"; dataGridViewMuon.DataSource = ac.TaoBang(sql); }