Exemplo n.º 1
0
        void load_data()
        {
            PhieuNhapDTO pn = new PhieuNhapDTO();

            pn.ma_phieu_nhap        = txtMaPN.Text;
            dgvSanPham.DataSource   = SanPhamBUS.Load_DSSP();
            cbxLSP.DataSource       = cbxLoaiSP.DataSource = LoaiSanPhamBUS.Load_DSLSP();
            dgvChitietPN.DataSource = PhieuNhapBUS.Load_DSMaPN(pnh);
            cbxLSP.DisplayMember    = cbxLoaiSP.DisplayMember = "ten_loai_sp";
            cbxLSP.ValueMember      = cbxLoaiSP.ValueMember = "ma_loai";
            cbxNVLPN.DataSource     = NhanVienBUS.GetDSNV();
            cbxNVLPN.DisplayMember  = "ten_nv";
            cbxNVLPN.ValueMember    = "ma_nv";
            cbxNCC.DataSource       = NhaCCBUS.Load_DSNCC();
            cbxNCC.DisplayMember    = "ten_ncc";
            cbxNCC.ValueMember      = "ma_ncc";
            groupBox2.Enabled       = false;
        }
Exemplo n.º 2
0
 //load du lieu
 private void load_data()
 {
     dgvDMSanPham_PDH.DataSource = dgvDanhMucSP_HD.DataSource = SanPhamBUS.Load_DSSP();
     dgvKhachHang.DataSource     = KhachHangBUS.Load_DSKH();
     cbxNhanvien.DataSource      = NhanVienBUS.GetDSNV();
     cbxNhanvien.DisplayMember   = "ten_nv";
     cbxNhanvien.ValueMember     = "ma_nv";
     cbxNVLHD.DataSource         = NhanVienBUS.GetDSNV();
     cbxNVLHD.DisplayMember      = "ten_nv";
     cbxNVLHD.ValueMember        = "ma_nv";
     dgvCTPDH.DataSource         = PhieuDatHangBUS.Load_DSTheoMaPDH(pdh);
     dgvCTHD.DataSource          = HoaDonBUS.Load_DSTheoMaHD(hd);
     cbxLoaiSP.DataSource        = LoaiSanPhamBUS.Load_DSLSP();
     cbxLoaiSP.DisplayMember     = "ten_loai_sp";
     cbxLoaiSP.ValueMember       = "ma_loai";
     cbxlsp.DataSource           = LoaiSanPhamBUS.Load_DSLSP();
     cbxlsp.DisplayMember        = "ten_loai_sp";
     cbxlsp.ValueMember          = "ma_loai";
 }