public HttpResponseMessage GetTeamSubscritionLicense(int teamId)
        {
            TeamBO teamBOLogic = new TeamBO();
            var    data        = teamBOLogic.GetTeamLicenseProductByTeamId(teamId);

            return(Request.CreateResponse(HttpStatusCode.OK, data));
        }
Exemplo n.º 2
0
    static void Main(string[] args)
    {
        Console.WriteLine("Enter the team count");
        int    k    = int.Parse(Console.ReadLine());
        TeamBO team = new TeamBO();

        Team[]   ti  = new Team[k];
        PlayerBo pbo = new PlayerBo();

        for (int i = 0; i < k; i++)
        {
            Console.WriteLine("Enter team {0} details", (i + 1));
            string teams = Console.ReadLine();
            ti[i] = team.CreateTeam(teams);
        }
        Console.WriteLine("Enter the player count");
        int w = int.Parse(Console.ReadLine());

        Player[] player = new Player[w];
        Team[]   tk     = new Team[w];
        for (int i = 0; i < w; i++)
        {
            Console.WriteLine("Enter player {0} details", (i + 1));
            string playerss = Console.ReadLine();

            player[i] = pbo.CreatePlayer(playerss, ti);
        }

        Console.WriteLine("Enter the player name for which you need to find the team name");
        string   playname = Console.ReadLine();
        PlayerBo pb       = new PlayerBo();
        string   teamname = pb.FindTeamName(player, playname);

        Console.WriteLine("{0} belongs to {1}", playname, teamname);


        Console.WriteLine("Enter 2 player names");
        string name1 = Console.ReadLine();
        string name2 = Console.ReadLine();

        bool qw = pb.FindWhetherPlayersAreInSameTeam(player, name1, name2);

        if (qw)
        {
            Console.WriteLine("The 2 player are in the same team");
        }
        else
        {
            Console.WriteLine("The 2 player are in the different teams");
        }



        Console.ReadLine();
    }
        public HttpResponseMessage DeleteTeamLicenses(DeleteTeamDetails data)
        {
            TeamBO teamBOLogic = new TeamBO();
            var    status      = teamBOLogic.DeleteTeamLicense(data);

            if (status)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "Success"));
            }
            return(Request.CreateErrorResponse(HttpStatusCode.ExpectationFailed, teamBOLogic.ErrorMessage));
        }
        public static ITeamBO MapTeamDOtoBO(ITeamDO teamDO)
        {
            ITeamBO oTeam = new TeamBO();

            oTeam.TeamID       = teamDO.TeamID;
            oTeam.Name         = teamDO.Name;
            oTeam.Comment      = teamDO.Comment;
            oTeam.Active       = teamDO.Active;
            oTeam.RunningTotal = teamDO.RunningTotal;

            return(oTeam);
        }
        public static TeamPO MapTeamBOtoPO(TeamBO teamBO)
        {
            var oTeam = new TeamPO();

            oTeam.TeamID       = teamBO.TeamID;
            oTeam.Name         = teamBO.Name;
            oTeam.Comment      = teamBO.Comment;
            oTeam.Active       = teamBO.Active;
            oTeam.RunningTotal = teamBO.RunningTotal;

            return(oTeam);
        }
Exemplo n.º 6
0
 public TeamController()
 {
     teamBoLogic      = new TeamBO();
     teamLogic        = new TeamLogic();
     teamLicenseLogic = new TeamLicenseLogic();
 }
Exemplo n.º 7
0
 public TeamMemberController()
 {
     logic        = new TeamMemberLogic();
     teamBoObject = new TeamBO();
 }