private void LoadComboBoxClub() { List <Club> listClub = new List <Club>(); DataTable data = ClubDAO.GetAllListClub(); foreach (DataRow row in data.Rows) { Club club = new Club(row); listClub.Add(club); } cboClubName.ItemsSource = listClub; cboClubName.DisplayMemberPath = "ClubName"; }
private void LoadListClub() { dgClub.ItemsSource = ClubDAO.GetAllListClub().DefaultView; dgClub.SelectedIndex = 0; }