Example #1
0
 public Form1(LoginController loginController, ParticipantController participantController, ProbaController probaController, ScorController scorController)
 {
     this.loginController       = loginController;
     this.participantController = participantController;
     this.probaController       = probaController;
     this.scorController        = scorController;
 }
Example #2
0
        public List <ScoreTotal> getNrTotalPuncte()
        {
            ScorRepository scorRepository = new ScorRepository();
            ScorService    scorService    = new ScorService(scorRepository);

            scorController = new ScorController(scorService);
            return(scorController.getNrTotalDePuncte());
        }
Example #3
0
        /// <summary>
        /// Afiseaza scorurile in tabel
        /// </summary>
        private void showScoruriForProba()
        {
            Proba          proba          = (Proba)comboBoxProbe.SelectedItem;
            ScorRepository scorRepository = new ScorRepository();
            ScorService    scorService    = new ScorService(scorRepository);

            scorController = new ScorController(scorService);
            List <Scor> listaScoruri = scorController.getScoruriFromProba(proba);
            var         bindingList  = new BindingList <Scor>(listaScoruri);
            var         source       = new BindingSource(bindingList, null);

            dataGridViewParticipantiScoruri.DataSource = source;
        }
Example #4
0
        /// <summary>
        /// Adauga nota pentru un participant
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonAddNota_Click(object sender, EventArgs e)
        {
            int         nota        = Convert.ToInt32(textBoxNota.Text);
            Participant participant = (Participant)comboBoxParticipanti.SelectedItem;

            Console.Write(participant);
            ScorRepository scorRepository = new ScorRepository();
            ScorService    scorService    = new ScorService(scorRepository);

            scorController = new ScorController(scorService);
            Proba proba = selectedProba;
            Scor  scor  = new Scor(participant, proba, nota);

            scorController.save(scor);
            showTableNrTotalPuncte();
        }