private void frmNhapHang_Load(object sender, EventArgs e) { TangHD(); TangMSP(); HamThanhTien(); gctSanPham.DataSource = sanphambus.DanhSachSanPham(); }
private void frmBanHang_Load(object sender, EventArgs e) { HamTongtien(); lstSanPham = sanphambus.DanhSachSanPham(); gctSP.DataSource = sanphambus.DanhSachSanPham(); List <KhachHangDTO> lstkh = new List <KhachHangDTO>(); lstkh = khbus.DanhSachKhachHang(); lueKH.Properties.DataSource = lstkh; lueKH.Properties.DisplayMember = "TenKH"; lueKH.Properties.ValueMember = "MaKH"; lueKH.ItemIndex = 0; TangHD(); btnLM.Enabled = false; }
private void CRSanPham_Load(object sender, EventArgs e) { SanPhamBUS sanphambus = new SanPhamBUS(); List <SanPhamDTO> lssanphamdto = new List <SanPhamDTO>(); lssanphamdto = sanphambus.DanhSachSanPham(); ReportDocument rp = new ReportDocument(); rp.Load(@"C:\Users\Ron\Desktop\Tốt Nghiệp\CHTapHoa\CHTapHoa\Reports\DanhSachSanPham.rpt"); rp.SetDataSource(lssanphamdto); crystalReportViewer1.ReportSource = rp; this.crystalReportViewer1.Show(); this.crystalReportViewer1.RefreshReport(); }
private void frmSanPham_Load(object sender, EventArgs e) { dssp = sanphambus.DanhSachSanPham(); gctSanPham.DataSource = dssp; lueLSP.Properties.DataSource = dsl; lueLSP.Properties.DisplayMember = "TenLoaiSP"; lueLSP.Properties.ValueMember = "MaLoaiSP"; lueLSP.ItemIndex = 0; luencc.Properties.DataSource = dsncc; luencc.Properties.DisplayMember = "TenNCC"; luencc.Properties.ValueMember = "MaNCC"; luencc.ItemIndex = 0; gctSanPham.DataSource = sanphambus.DanhSachSanPham(); txtMSP.Text = lst[0].MaSP; txtTSP.Text = lst[0].TenSP; lueLSP.Text = lst[0].MaLoaiSP; luencc.Text = lst[0].MaNCC; txtXX.Text = lst[0].XuatXu; txtGT.Text = (lst[0].GiaTien).ToString(); ptbHinhSP.ImageLocation = lst[0].HinhAnh; btnS.Enabled = false; barButtonItem3.Enabled = false; btnX.Enabled = false; btnLM.Enabled = true; btnEC.Enabled = false; btnRP.Enabled = true; }