예제 #1
0
        public List <ScoreTotal> getNrTotalPuncte()
        {
            ScorRepository scorRepository = new ScorRepository();
            ScorService    scorService    = new ScorService(scorRepository);

            scorController = new ScorController(scorService);
            return(scorController.getNrTotalDePuncte());
        }
예제 #2
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;
        }
예제 #3
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();
        }
예제 #4
0
 public ScorController(ScorService scorService)
 {
     this.scorService = scorService;
 }