Beispiel #1
0
        private void LayDanhSachHangHoa()
        {
            HangHoaBUS itemBUS = new HangHoaBUS();
            BindingList <HangHoaDTO> danhSach = itemBUS.LayDanhSach();

            danhSach.AllowEdit          = danhSach.AllowNew = danhSach.AllowRemove = true;
            gcDanhMucHangHoa.DataSource = danhSach;

            BCIT_ComboBoxItems iComboBox = new BCIT_ComboBoxItems();

            gvDanhMucHangHoa.Columns["IdHoatChatChinh"].ColumnEdit = iComboBox.HoatChatChinh();
            gvDanhMucHangHoa.Columns["IdNhomHangHoa"].ColumnEdit   = iComboBox.NhomHangHoa();
            gvDanhMucHangHoa.Columns["IdLoaiHangHoa"].ColumnEdit   = iComboBox.LoaiHangHoa();
            gvDanhMucHangHoa.Columns["IdHangSanXuat"].ColumnEdit   = iComboBox.HangSanXuat();
            gvDanhMucHangHoa.Columns["IdNoiSanXuat"].ColumnEdit    = iComboBox.NoiSanXuat();
            gvDanhMucHangHoa.Columns["IdViTri"].ColumnEdit         = iComboBox.ViTri();
            gvDanhMucHangHoa.Columns["IdDonViTinh"].ColumnEdit     = iComboBox.DonViTinh();
            gvDanhMucHangHoa.Columns["IdDonViQuyDoi1"].ColumnEdit  = iComboBox.DonViTinh();
            gvDanhMucHangHoa.Columns["IdDonViQuyDoi2"].ColumnEdit  = iComboBox.DonViTinh();
        }