private void LayDanhSachNoiSanXuat() { NoiSanXuatBUS itemBUS = new NoiSanXuatBUS(); BindingList <NoiSanXuatDTO> danhSach = itemBUS.LayDanhSach(); danhSach.AllowEdit = danhSach.AllowNew = danhSach.AllowRemove = true; gcDanhMucNoiSanXuat.DataSource = danhSach; }
public RepositoryItemLookUpEdit NoiSanXuat() { NoiSanXuatBUS noiSanXuatBUS = new NoiSanXuatBUS(); BindingList <NoiSanXuatDTO> dsNoiSanXuat = noiSanXuatBUS.LayDanhSach(); RepositoryItemLookUpEdit repositoryNoiSanXuat = new RepositoryItemLookUpEdit(); repositoryNoiSanXuat.DataSource = dsNoiSanXuat; repositoryNoiSanXuat.PopulateColumns(); foreach (LookUpColumnInfo col in repositoryNoiSanXuat.Columns) { if (col.FieldName == "Id" || col.FieldName == "GhiChu") { col.Visible = false; } } repositoryNoiSanXuat.DisplayMember = "TenNoiSanXuat"; repositoryNoiSanXuat.ValueMember = "Id"; return(repositoryNoiSanXuat); }