Exemplo n.º 1
0
        public void LoadData()
        {
            dtKho = new DataTable();
            dtKho.Clear();
            DataSet ds = nvkho.LayHangHoaDeBan();

            dtKho = ds.Tables[0];
            dv    = new DataView(dtKho);
            dgvHangHoa.DataSource = dv;
            dgvHangHoa.AutoResizeColumns();


            dtKhachHang = new DataTable();
            dtKhachHang.Clear();
            DataSet dskh = nvkh.LayKH();

            dtKhachHang             = dskh.Tables[0];
            dvKH                    = new DataView(dtKhachHang);
            dgvKhachHang.DataSource = dvKH;
            dgvKhachHang.AutoResizeColumns();

            dtNhanVien = new DataTable();
            dtNhanVien.Clear();
            DataSet dsnv = nvnv.LayNV();

            dtNhanVien             = dsnv.Tables[0];
            dvNV                   = new DataView(dtNhanVien);
            dgvNhanVien.DataSource = dvNV;
            dgvNhanVien.AutoResizeColumns();
        }