Exemplo n.º 1
0
		public WcfTeam GetTeam()
		{
			WcfTeam team = new WcfTeam();
			team.Id = this.Id;
			team.Name = this.Name;
			return team;
		}
Exemplo n.º 2
0
		public TeamHelper(WcfRelation relation)
		{
			WcfTeam team = WcfHelper.client.GetTeamById(relation.TeamId);
			this.Id = team.Id;
			this.Name = team.Name;
			this.Relation = relation;
		}
Exemplo n.º 3
0
        public List <WcfRelation> GetRelationsByTeam(WcfTeam team)
        {
            List <WcfRelation> relations = new List <WcfRelation>();

            foreach (SeasonsToTeamsRelation relation in Database.GetSeasonsToTeamsRelationsByTeamId(team.Id))
            {
                relations.Add(new WcfRelation(relation));
            }
            return(relations);
        }
Exemplo n.º 4
0
        public WcfTeam EditTeam(WcfTeam newTeam)
        {
            mView = new WindowTeam();
            var viewModel = new WindowTeamViewModel
            {
                team          = newTeam,
                OkCommand     = new RelayCommand(ExecuteOkCommand),
                CancelCommand = new RelayCommand(ExecuteCancelCommand)
            };

            mView.Title       = newTeam.Name;
            mView.DataContext = viewModel;
            return(mView.ShowDialog() == true ? viewModel.team : null);
        }
Exemplo n.º 5
0
 public void DeleteTeam(WcfTeam team)
 {
     Database.DeleteTeam(Database.GetTeamById(team.Id));
 }
Exemplo n.º 6
0
 public void EditTeam(WcfTeam team)
 {
     Database.EditTeam(Database.GetTeamById(team.Id), team.Name);
 }
Exemplo n.º 7
0
 public void AddTeam(WcfTeam team)
 {
     Database.AddTeam(team.Name);
 }
Exemplo n.º 8
0
 public void DeleteTeamFromSeason(WcfTeam team, WcfSeason season)
 {
     Database.DeleteMatches(season.Id, Database.GetTeamById(team.Id));
     Database.AddSeasonsToTeamsRelation(Database.GetTeamById(team.Id), Database.GetSeasonById(season.Id));
 }
Exemplo n.º 9
0
 public void AddTeamToSeason(WcfTeam team, WcfSeason season)
 {
     Database.AddSeasonsToTeamsRelation(Database.GetTeamById(team.Id), Database.GetSeasonById(season.Id));
 }