コード例 #1
0
ファイル: Form2.cs プロジェクト: daniftinca/mppcsharp
        public List <ScoreTotal> getNrTotalPuncte()
        {
            ScorRepository scorRepository = new ScorRepository();
            ScorService    scorService    = new ScorService(scorRepository);

            scorController = new ScorController(scorService);
            return(scorController.getNrTotalDePuncte());
        }
コード例 #2
0
ファイル: Form2.cs プロジェクト: daniftinca/mppcsharp
        /// <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
ファイル: Form2.cs プロジェクト: daniftinca/mppcsharp
        /// <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
ファイル: ScorService.cs プロジェクト: daniftinca/mppcsharp
 public ScorService(ScorRepository scorRepository)
 {
     this.scorRepository = scorRepository;
 }