Example #1
0
        private void frmPhieuMuonSach_Load(object sender, EventArgs e)
        {
            cbHoTen.DataSource  = bus.LayThongtinHT("where iddocgia ='" + _message + "'");
            cbHoTen.ValueMember = "hoten";
            BUS_Sach  buss   = new BUS_Sach();
            DataTable dt     = buss.LayDanhSachSach();
            string    showid = "select iddocgia from DocGia where hoten = '" + cbHoTen.Text + "'";

            db.LoadData2Label(lbid, showid);
            //cbmasach.DisplayMember = "masach";
            //cbtacgia.DisplayMember = "tacgia";
            //cbtensach.DisplayMember = "tensach";
            //cbtheloai.DisplayMember = "theloai";
            cbmasach.ValueMember  = "masach";
            cbtacgia.ValueMember  = "tacgia";
            cbtensach.ValueMember = "tensach";
            cbtheloai.ValueMember = "theloai";
            cbmasach.DataSource   = dt;
            cbtacgia.DataSource   = dt;
            cbtheloai.DataSource  = dt;
            cbtensach.DataSource  = dt;
        }