コード例 #1
0
        private void QuanLyTacGia_Load(object sender, EventArgs e)
        {
            string sql = "Select *from TacGia";

            ac.TaoBang(sql);
            dataGridViewTacGia.DataSource = ac.TaoBang(sql);
            Xoa();
        }
コード例 #2
0
        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";
        }
コード例 #3
0
 public static DataTable LayTenTheLoai()
 {
     string sql;
     sql = "Select TenTheLoai from TheLoai ";
     AccessData db = new AccessData();
     DataTable dt;
     dt = db.TaoBang(sql);
     return dt;
 }
コード例 #4
0
ファイル: TimKiem.cs プロジェクト: yenxichha1993/thuctapnhom
 public static DataTable LayTenSach()
 {
     string sql;
     sql = "Select TenSach from TuaSach ";
     AccessData db = new AccessData();
     DataTable dt;
     dt = db.TaoBang(sql);
     return dt;
 }
コード例 #5
0
 public static DataTable LayMaTheDocGia()
 {
     string sql;
     sql = "Select MaThe from The ";
     AccessData db = new AccessData();
     DataTable dt;
     dt = db.TaoBang(sql);
     return dt;
 }
コード例 #6
0
 public static DataTable LayMaTheMuon()
 {
     string sql;
     sql = "Select DISTINCT MaThe from PhieuMuon ";
     AccessData db = new AccessData();
     DataTable dt;
     dt = db.TaoBang(sql);
     return dt;
 }
コード例 #7
0
 public static DataTable LayTenNXB()
 {
     string sql;
     sql = "Select TenNhaXuatBan from NhaXuatBan ";
     AccessData db = new AccessData();
     DataTable dt;
     dt = db.TaoBang(sql);
     return dt;
 }
コード例 #8
0
 public static DataTable laymasacht()
 {
     string sql;
     sql = "Select masach from Sach ";
     AccessData db = new AccessData();
     DataTable dt;
     dt = db.TaoBang(sql);
     return dt;
 }
コード例 #9
0
 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;
 }
コード例 #10
0
        public static DataTable LayTenTheLoai()
        {
            string sql;

            sql = "Select TenTheLoai from TheLoai ";
            AccessData db = new AccessData();
            DataTable  dt;

            dt = db.TaoBang(sql);
            return(dt);
        }
コード例 #11
0
        public static DataTable LayTenSach()
        {
            string sql;

            sql = "Select TenSach from TuaSach ";
            AccessData db = new AccessData();
            DataTable  dt;

            dt = db.TaoBang(sql);
            return(dt);
        }
コード例 #12
0
        public static DataTable LayMaTheMuon()
        {
            string sql;

            sql = "Select DISTINCT MaThe from PhieuMuon ";
            AccessData db = new AccessData();
            DataTable  dt;

            dt = db.TaoBang(sql);
            return(dt);
        }
コード例 #13
0
        public static DataTable LayNgayHenTra()
        {
            string sql;

            sql = "Select NgayTra from PhieuMuon ";
            AccessData db = new AccessData();
            DataTable  dt;

            dt = db.TaoBang(sql);
            return(dt);
        }
コード例 #14
0
        public static DataTable LayMaDocGia()
        {
            string sql;

            sql = "Select MaDocGia from DocGia ";
            AccessData db = new AccessData();
            DataTable  dt;

            dt = db.TaoBang(sql);
            return(dt);
        }
コード例 #15
0
        public static DataTable laymasacht()
        {
            string sql;

            sql = "Select masach from Sach ";
            AccessData db = new AccessData();
            DataTable  dt;

            dt = db.TaoBang(sql);
            return(dt);
        }
コード例 #16
0
        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);
        }
コード例 #17
0
        public static DataTable LayTenNXB()
        {
            string sql;

            sql = "Select TenNhaXuatBan from NhaXuatBan ";
            AccessData db = new AccessData();
            DataTable  dt;

            dt = db.TaoBang(sql);
            return(dt);
        }
コード例 #18
0
        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();
        }
コード例 #19
0
 public static DataTable LayNgayHenTra()
 {
     string sql;
     sql = "Select NgayTra from PhieuMuon ";
     AccessData db = new AccessData();
     DataTable dt;
     dt = db.TaoBang(sql);
     return dt;
 }
コード例 #20
0
        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";
        }
コード例 #21
0
        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);
        }
コード例 #22
0
        private void HienThi()
        {
            string sql = "Select *from ChiTietMuonSach";

            dataGridViewMuon.DataSource = ac.TaoBang(sql);
        }