示例#1
0
        private void CreareMatriceLocuri_Click(object sender, EventArgs e)
        {
            int    index = -1;
            Button b     = (Button)sender;

            index = Convert.ToInt32(b.Name.Substring(9, b.Name.Length - 9));
            Spectacol s = spectacolRepo.getSpectacole()[index];

            view.setMatriceLocuri(index, spectacolRepo.getBileteBySpectacol(s), MoveMatrice_Event, MatriceLeave_Event, Matrice_Click);
        }
示例#2
0
        public void test9()
        {
            //insert bilet
            Spectacol s = new Spectacol();

            s.IdSpectacol  = 6;
            s.Titlu        = "Boema";
            s.Regia        = "Ina Hudea";
            s.Gen          = "Operă";
            s.DataPremiere = "2018-12-27 18:00:00";
            s.NumarBilete  = 125;//am schimbat numarul biletelor

            Bilet b = new Bilet();

            b.IdSpectacol = 6;
            b.Rand        = b.Coloana = 1;

            _spectacolRepo.insertBilet(b);

            List <Bilet> lb    = _spectacolRepo.getBileteBySpectacol(s);
            Bilet        btest = lb.Where(x => x.IdBilet == 28).SingleOrDefault();//28 = idBilet urmator in BD

            b.IdBilet = 28;

            Assert.IsTrue(btest.ToString() == b.ToString());
        }