Exemplo n.º 1
0
 public void TeamPlayerSave(TeamPlayer teamPlayer,
                            ref string message)
 {
     if (!teamPlayer.CaptainInd || (_checkCaptainLogic.CheckCaptain(teamPlayer.TeamID, teamPlayer.PlayerID) && teamPlayer.CaptainInd))
     {
         if (teamPlayer.TeamPlayerID > 0)
         {
             _teamPlayersUpdate.TeamPlayersUpdateTransaction(teamPlayer);
         }
         else
         {
             _teamPlayersInsert.TeamPlayerInsert(teamPlayer);
         }
     }
     else
     {
         message = "<script>alert('Captain has already been assigned. Only one captain per team.');</script>";
     }
 }
Exemplo n.º 2
0
 public void PlayerModelDelete(int playerID,
                               int teamID,
                               ref string message)
 {
     if (CheckGamePlayerList(playerID, teamID))
     {
         if (!_checkCaptainLogic.CheckCaptain(teamID, playerID))
         {
             _teamPlayersDelete.TeamPlayersRemove(playerID, teamID);
         }
         else
         {
             message = "Cannot delete player because player is captain of the team.";
         }
     }
     else
     {
         message = "Cannot delete player because player has game player fixtures.";
     }
 }