private void LoadTeam() { var result = teamBL.GetAllTeams(txtSearch.Text); if (result.HasError) { MessageBox.Show(result.Messages[0]); return; } teams = result.Data; if (teams.Count > 0) { this.PopulateData(teams[0]); } else { this.New(); } this.RefreshDataGrid(); }