void LoadThongTin() { ThongTinSach temp = SBLL.LayThongTinSach(MaSach); lbMaDauSach.Text = temp.MaDauSach; MaDauSach = temp.MaDauSach; lbTenDauSach.Text = temp.TenDauSach; lbTacGia.Text = temp.TenTacGia; lbTheLoai.Text = temp.TheLoai; lbNgonNgu.Text = temp.NgonNgu; lbNhaXuatBan.Text = temp.NhaXuatBan; lbMaSach.Text = temp.MaSach; lbMaDauSach.Text = temp.MaDauSach; lbNgayThem.Text = temp.NgayThem; nbTap.Value = temp.Tap; nbLanTB.Value = temp.LanTaiBan; nbTang.Value = temp.Tang; nbNgan.Value = temp.Ngan; txbSoTrang.Text = temp.SoTrang.ToString(); txbNamXB.Text = temp.NamXuatBan.ToString("dd/MM/yyyy"); txbTinhTrang.Text = temp.TinhTrang; cbGia.Text = temp.MaGiaSach.ToString() + " - " + temp.TenGiaSach; if (temp.HinhAnh != "") { pictureBox1.Image = new Bitmap(Application.StartupPath + "\\HinhAnh\\" + temp.HinhAnh); } // Gợi ý dữ liệu cho giá sách List <GiaSach> LGS = SBLL.LayGiaSach(); foreach (GiaSach a in LGS) { cbGia.Items.Add(a.MaGiaSach.ToString() + " - " + a.TenGiaSach); } // }
void LoadThongTin() { ThongTinSach temp = SBLL.LayThongTinSach(MaSach); lbMaDauSach.Text = temp.MaDauSach; MaDauSach = temp.MaDauSach; lbTenDauSach.Text = temp.TenDauSach; lbTacGia.Text = temp.TenTacGia; lbTheLoai.Text = temp.TheLoai; lbNgonNgu.Text = temp.NgonNgu; lbNhaXuatBan.Text = temp.NhaXuatBan; lbMaSach.Text = temp.MaSach; lbMaDauSach.Text = temp.MaDauSach; lbNgayThem.Text = temp.NgayThem; nbTap.Value = temp.Tap; nbLanTB.Value = temp.LanTaiBan; nbTang.Value = temp.Tang; nbNgan.Value = temp.Ngan; txbSoTrang.Text = temp.SoTrang.ToString(); txbNamXB.Text = temp.NamXuatBan.ToString("dd/MM/yyyy"); txbTinhTrang.Text = temp.TinhTrang; cbGia.Text = temp.MaGiaSach.ToString() + " - " + temp.TenGiaSach; // Gợi ý dữ liệu cho giá sách List <GiaSach> LGS = SBLL.LayGiaSach(); foreach (GiaSach a in LGS) { cbGia.Items.Add(a.MaGiaSach.ToString() + " - " + a.TenGiaSach); } // }