Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        private void InfoSpectacol_Click(object sender, MouseButtonEventArgs e)
        {
            Spectacol s = view.getSpectacol();

            if (s != null)
            {
                List <DistributieOp> l_distributie_op = spectacolRepo.getActoriOp(s);
                string str = s.ToString();

                if (l_distributie_op.Count != 0)
                {
                    str += "\n\nDistributie\n";

                    foreach (DistributieOp d in l_distributie_op)
                    {
                        str = str + "Actor: " + d.NumeActor + ", Rol: " + d.RolActor + "\n";
                    }
                    view.showMessage(str);
                }
                else
                {
                    List <DistributieBalet> l_distributie_balet = spectacolRepo.getActoriBalet(s);

                    str += "\n\nDistributie\n";

                    foreach (DistributieBalet d in l_distributie_balet)
                    {
                        str = str + d.NumeActor + "\n";
                    }
                    view.showMessage(str);
                }
            }
        }
Ejemplo n.º 3
0
        //--------------------------------------------actori----------------------------------------------
        private void cautare_Click(object sender, EventArgs e)
        {
            Spectacol s = view.getSpectacolByTitlu();

            if (s != null)
            {
                //view.showMessage(s.ToString());
                List <DistributieOp>    dist_Op    = spectacoleRepo.getActoriOp(s);
                List <DistributieBalet> dist_Balet = spectacoleRepo.getActoriBalet(s);
                view.populateTableDistributie(dist_Op, dist_Balet, ModificareActor_Click);
                view.showTextboxes();
            }
            else
            {
                view.showMessage("Nu ati selectat spectacolul");
            }
        }