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); } } }
//--------------------------------------------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"); } }