public void SetSponsorPicks(AwaySponsorPick awaySponsorPick, HomeSponsorPick homeSponsorPicks) { StringBuilder str = new StringBuilder(); str.Append(awaySponsorPick.TeamLogo); str.Append("~"); str.Append(awaySponsorPick.CityName); str.Append("~"); str.Append(awaySponsorPick.TeamName); str.Append("~"); str.Append(awaySponsorPick.Record); str.Append("|"); str.Append(homeSponsorPicks.TeamLogo); str.Append("~"); str.Append(homeSponsorPicks.CityName); str.Append("~"); str.Append(homeSponsorPicks.TeamName); str.Append("~"); str.Append(homeSponsorPicks.Record); Console.WriteLine(str); }
public HomeSponsorPick LoadHomeTeam(string name) { HomeSponsorPick homeSponsorPick = new HomeSponsorPick(); try { using (DtvRedZoneEntities db = new DtvRedZoneEntities()) { var team = db.Teams.Where(t => t.TeamName == name); foreach (var t in team) { homeSponsorPick.CityName = t.City; homeSponsorPick.TeamLogo = t.DtvTricode; homeSponsorPick.TeamName = t.TeamName; } } } catch (Exception e) { Console.WriteLine(e); } return(homeSponsorPick); }