Пример #1
0
        public formEquipas(Team team, Modelo_Container dbContainer)
        {
            InitializeComponent();
            teamEditar  = team;
            repoEquipas = new EquipasRepository(dbContainer);
            repoPlayers = new PlayerRepository(dbContainer);
            listPlayers = repoPlayers.GetPlayersListNotIn(team.Player.ToList());
            foreach (Player player in listPlayers)
            {
                lbSemEquipa.Items.Add(player.Name + "\t" + player.Nickname);
            }
            listPlayersInTeam = team.Player.ToList();
            foreach (Player player in team.Player)
            {
                lbJogadoresNaEquipa.Items.Add(player.Name + "\t" + player.Nickname);
            }
            tbNomeEquipa.Text = team.Name;
            if (team.Avatar != null)
            {
                pbAvatar.Load(team.Avatar);
            }

            textBox1.Text = "1";
            textBox1.Text = "";
            this.Text     = "Editar equipa";
            ativarBotaoGerir();
            novo = false;
        }
Пример #2
0
 public formGestaoEquipas(Modelo_Container dbContainer)
 {
     InitializeComponent();
     this.dbContainer = dbContainer;
     eqRepo           = new EquipasRepository(dbContainer);
     refreshList();
 }
Пример #3
0
 private void Init()
 {
     tourRepo    = new TournamentRepository(dbContainer);
     gameRepo    = new GameRepository(dbContainer);
     arbitroRepo = new ArbitroRepository(dbContainer);
     deckRepo    = new DeckRepository(dbContainer);
     playerRepo  = new PlayerRepository(dbContainer);
     equipaRepo  = new EquipasRepository(dbContainer);
     RefreshListTorneiosNormais();
     RefreshListTorneiosEquipas();
 }
Пример #4
0
 public formEquipas(Modelo_Container dbContainer)
 {
     InitializeComponent();
     repoEquipas = new EquipasRepository(dbContainer);
     repoPlayers = new PlayerRepository(dbContainer);
     listPlayers = repoPlayers.GetPlayersList();
     foreach (Player player in listPlayers)
     {
         lbSemEquipa.Items.Add(player.Name + "\t" + player.Nickname);
     }
     textBox1.Text = "1"; textBox1.Text = "";
     novo          = true;
 }