コード例 #1
0
ファイル: TeamsOperations.cs プロジェクト: rutukulkarni/PMD
 public bool AddTeams(Team[] teamsToAdd, int[] deletedTeams)
 {
     StoredProcedureDataContext dbmlObject = new StoredProcedureDataContext();
     for (int i = 0; i < deletedTeams.Length; i++)
     {
         dbmlObject.DeleteTeam(deletedTeams[i]);
     }
     for (int i = 0; i < teamsToAdd.Length; i++)
     {
         dbmlObject.AddTeams(teamsToAdd[i].TeamName, teamsToAdd[i].CompanyID);
     }
     dbmlObject.SubmitChanges();
     return true;
 }
コード例 #2
0
        public bool AddTeams(Team[] teamsToAdd, int[] deletedTeams)
        {
            StoredProcedureDataContext dbmlObject = new StoredProcedureDataContext();

            for (int i = 0; i < deletedTeams.Length; i++)
            {
                dbmlObject.DeleteTeam(deletedTeams[i]);
            }
            for (int i = 0; i < teamsToAdd.Length; i++)
            {
                dbmlObject.AddTeams(teamsToAdd[i].TeamName, teamsToAdd[i].CompanyID);
            }
            dbmlObject.SubmitChanges();
            return(true);
        }