コード例 #1
0
        private void SaveTeamData()
        {
            var newTeams = (
                from DataGridViewRow row
                in teamData.Rows
                where !row.IsNewRow
                select row.Cells[0].Value.ToString()
                into teamName
                select new Team {
                teamName = teamName
            }).ToList();

            ApplicationData.Teams.Clear();

            foreach (var i in newTeams)
            {
                ApplicationData.AddTeam(i);
            }
        }