private void LayDanhSachHoatChatChinh() { HoatChatChinhBUS itemBUS = new HoatChatChinhBUS(); BindingList <HoatChatChinhDTO> danhSach = itemBUS.LayDanhSach(); danhSach.AllowEdit = danhSach.AllowNew = danhSach.AllowRemove = true; gcDanhMucHoatChatChinh.DataSource = danhSach; }
public RepositoryItemLookUpEdit HoatChatChinh() { HoatChatChinhBUS hoatChatChinhBUS = new HoatChatChinhBUS(); BindingList <HoatChatChinhDTO> dsHoatChatChinh = hoatChatChinhBUS.LayDanhSach(); RepositoryItemLookUpEdit repositoryItem = new RepositoryItemLookUpEdit(); repositoryItem.DataSource = dsHoatChatChinh; repositoryItem.PopulateColumns(); foreach (LookUpColumnInfo col in repositoryItem.Columns) { if (col.FieldName == "Id" || col.FieldName == "GhiChu") { col.Visible = false; } } repositoryItem.DisplayMember = "TenHoatChatChinh"; repositoryItem.ValueMember = "Id"; return(repositoryItem); }