Example #1
0
        public void test6()
        {
            //insert actor
            Spectacol s = new Spectacol();

            s.IdSpectacol  = 6;
            s.Titlu        = "Boema";
            s.Regia        = "Ina Hudea";
            s.Gen          = "Operă";
            s.DataPremiere = "27.12.2018 18:00:00";
            s.NumarBilete  = 125;

            DistributieOp d_op = new DistributieOp();

            d_op.IdSpectacol = 6;
            d_op.NumeActor   = "Teodora Gheorghiu";
            d_op.RolActor    = "MImi";

            _spectacolRepo.operatiiActorOp(d_op, 0);//insert

            List <DistributieOp> ld_op = _spectacolRepo.getActoriOp(s);
            DistributieOp        dtest = ld_op.Where(x => x.NumeActor == d_op.NumeActor).SingleOrDefault();

            Assert.IsTrue(d_op.IdSpectacol == dtest.IdSpectacol && d_op.NumeActor == dtest.NumeActor && d_op.RolActor == dtest.RolActor);
        }
Example #2
0
        private void InsertActor_Click(object sender, EventArgs e)
        {
            if (view.getGenSpectacol() == "Balet")
            {
                DistributieBalet db = view.getActorBalet();
                spectacoleRepo.operatiiActorBalet(db, 0);
            }
            else
            {
                DistributieOp d_op = view.getActorOp();
                spectacoleRepo.operatiiActorOp(d_op, 0);
            }

            view.showMessage("Actor adaugat cu succes");
            Spectacol               s          = view.getSpectacolSelectat();
            List <DistributieOp>    dist_Op    = spectacoleRepo.getActoriOp(s);
            List <DistributieBalet> dist_Balet = spectacoleRepo.getActoriBalet(s);

            view.populateTableDistributie(dist_Op, dist_Balet, ModificareActor_Click);
            view.showTextboxes();
        }