private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { panel3.Visible = true; panel1.Width = 803; panel1.Height = 659; cbbMaChiTiet.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString(); cbbMaTaiLieu.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString(); cbbTenChiTiet.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString(); cbbNhaCC.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString(); cbbNhaXB.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString(); cbbTacGia.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString(); cbbViTri.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString(); cbbSoLuong.Text = dataGridView1.CurrentRow.Cells[7].Value.ToString(); txtLink.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString(); txtSoTrang.Text = dataGridView1.CurrentRow.Cells[9].Value.ToString(); txtGiaBia.Text = dataGridView1.CurrentRow.Cells[10].Value.ToString(); txtGiaNhap.Text = dataGridView1.CurrentRow.Cells[11].Value.ToString(); txtNgayNhap.Text = dataGridView1.CurrentRow.Cells[12].Value.ToString(); txtNguoiNhap.Text = dataGridView1.CurrentRow.Cells[13].Value.ToString(); TaiLieu tl = new TaiLieu(); pictureBox2.Image = byteArrayToImage(tl.loadAnhQR(cbbTenChiTiet.Text).ToArray()); pictureBox1.Image = byteArrayToImage(tl.loadAnhTaiLieu(cbbTenChiTiet.Text).ToArray()); }
private void listView1_MouseClick(object sender, MouseEventArgs e) { lblSoLuongGioHang.Visible = false; btnGioHang.Visible = false; panel6.Visible = true; string tentailieu = listView1.SelectedItems[0].SubItems[0].Text.ToString(); TaiLieu tl = new TaiLieu(); txtCTTL.TextName = tl.loadMaChiTietTaiLieu(tentailieu); txtTenTL.TextName = tentailieu; txtNXB.TextName = tl.loadtennxb(tentailieu); txtTacGia.TextName = tl.loadtacgia(tentailieu); txtViTri.TextName = tl.loadvitri(tentailieu); txtTheLoai.TextName = tl.loadtheloai(tentailieu); txtSoLuong.TextName = tl.loadsoluongtailieu(tentailieu); txtGiaBia.TextName = tl.loadgiabia(tentailieu);; txtNCC.TextName = tl.loadncc(tentailieu); anhQR.Image = byteArrayToImage(tl.loadAnhQR(tentailieu)); }