Esempio n. 1
0
        public Meci(MeciDto meciDto)
        {
            Echipa1       = meciDto.Echipa1;
            Echipa2       = meciDto.Echipa2;
            Data          = meciDto.Data;
            GoluriEchipa1 = new Goluri();
            GoluriEchipa2 = new Goluri();

            PublicaEveniment(new EvenimentGeneric <MeciDto>(meciDto));
        }
Esempio n. 2
0
        public void Marcheaza(GolMarcatDto golMarcat)
        {
            golMarcat.Minut = (byte)Math.Ceiling((DateTime.Now - DataStart).TotalMinutes);
            if (Echipa1 == golMarcat.NumeEchipa)
            {
                GoluriEchipa1 = new Goluri(GoluriEchipa1.NumarGoluri + 1);
            }
            else if (Echipa2 == golMarcat.NumeEchipa)
            {
                GoluriEchipa2 = new Goluri(GoluriEchipa2.NumarGoluri + 1);
            }
            var eveniment = new EvenimentGeneric <GolMarcatDto>(golMarcat);

            PublicaEveniment(eveniment);
        }