示例#1
0
 public void annulerSpectacle(Spectacle s)
 {
     foreach (Representation r in s.representations)
     {
     s.annulerRepresentation(r);
     }
 }
示例#2
0
        public void lireFichier(String nomFichier)
        {
            StreamReader sr = null;
            //vider la liste des spectacles
            _spectacles.Clear();
            try
            {
            if (File.Exists(nomFichier))
            {
                sr = File.OpenText(nomFichier);
                String ligne;
                while (!sr.EndOfStream)
                {
                    ligne = sr.ReadLine();
                    string[] data = ligne.Split(new Char[] { ';' });
                        Spectacle sp;
                        sp= new Spectacle();
                        sp.titre = data[0];
                        sp.duree = int.Parse(data[1]);
                        sp.producteur = data[2];
                        switch (data[3])
                        {
                            case "concert":
                                sp.type = typeSpectacle.concert;
                                break;
                            case "danse":
                                sp.type = typeSpectacle.danse;
                                break;
                            case "oneManShow":
                                sp.type = typeSpectacle.oneManShow;
                                break;
                            case "theatre" :
                                sp.type = typeSpectacle.theatre;
                                break;
                        }
                        ajouterSpectacle(sp);
                }

            }
            }
            catch (Exception e)
            {
            //En cas de problème d'accès au fichier
            Console.WriteLine(e.Message);
            Console.WriteLine("Problème de lecture du fichier.");
            Console.WriteLine("Appuyez sur une touche pour continuer...");
            Console.ReadKey();
            }
            finally
            {
            //Dans tous les cas
            if (sr != null)
                sr.Close();
            }
        }
示例#3
0
        public ActionResult SpectacleReadMore(Guid id)
        {
            Spectacle spectacle = repo.GetSpectacle(id);
            int       x         = repo.GetAllSales().Where(s => s.SpectacleID == id && s.State.Name == "Active").Sum(a => a.Amount);

            SpectacleReadModel srm = new SpectacleReadModel
            {
                Spectacle = spectacle,
                Image     = "~/Content/Images/scene2.jpg",
                Remain    = spectacle.TicketsCount - x
            };

            return(View(srm));
        }
示例#4
0
        // GET: Spectacles/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Spectacle spectacle = await db.Spectacles.FindAsync(id);

            if (spectacle == null)
            {
                return(HttpNotFound());
            }
            return(View(spectacle));
        }
        public static List <Spectacle> getAllSpectacles()
        {
            string           getSpectacle = "SELECT * FROM Spectacles";
            List <Spectacle> spectacles   = null;

            using (SqlConnection con = new SqlConnection(Constants.connectionString))
            {
                try
                {
                    con.Open();
                    spectacles = new List <Spectacle>();
                    SqlCommand    com    = new SqlCommand(getSpectacle, con);
                    SqlDataReader reader = com.ExecuteReader();

                    try
                    {
                        while (reader.Read())
                        {
                            int      premieraColIdx    = reader.GetOrdinal(Constants.premieraField);
                            int      nrOfTicketsColIdx = reader.GetOrdinal(Constants.nrOfTicketsField);
                            string   titluStr          = reader[Constants.titluField].ToString();
                            string   regiaStr          = reader[Constants.regiaField].ToString();
                            string   distributiaStr    = reader[Constants.distributiaField].ToString();
                            DateTime premiera          = reader.GetDateTime(premieraColIdx);
                            int      nrOfTickets       = reader.GetInt32(nrOfTicketsColIdx);

                            Spectacle spectacle = new Spectacle(premiera, titluStr, regiaStr, distributiaStr, nrOfTickets);
                            spectacles.Add(spectacle);
                        }
                    }
                    catch (InvalidOperationException)
                    {
                        return(null);
                    }
                    finally
                    {
                        reader.Close();
                    }
                }
                catch (SqlException ex)
                {
                    // Just return null and handle the this result in class that invokes this method
                    return(null);
                }
            }

            return(spectacles);
        }
示例#6
0
        public IActionResult CreatePerformance([FromBody] SpectacleDto spectacleDto)
        {
            var newId = spectacles.Count + 1;

            var spectacle = new Spectacle()
            {
                Id               = newId,
                Name             = spectacleDto.Name,
                AvailableTickets = spectacleDto.AvailableTickets,
                StartDateTime    = spectacleDto.StartDateTime,
                Duration         = TimeSpan.Parse(spectacleDto.Duration)
            };

            spectacles.Add(spectacle);

            return(CreatedAtAction(nameof(GetPerformance), new { id = newId }, spectacle));
        }
示例#7
0
        public List <Spectacle> GetCurrentSpectacle(DateTime date_sp)
        {
            Spectacle spectacle = new Spectacle(0, "", "", DateTime.Today, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

            Spectacle SendSpectacle;


            //AccountClient SendClient = new AccountClient("", "", "", "", "",false);

            SqlConnection connection           = new SqlConnection();
            SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();

            builder.DataSource         = @"SY\SQLEXPRESS";
            builder.IntegratedSecurity = true;
            builder.InitialCatalog     = "Theatre";

            connection.ConnectionString = builder.ConnectionString;

            connection.Open();

            SqlCommand command = new SqlCommand();

            command.Connection = connection;

            command.CommandText = "select Spectacle_id,Spectacle_name,Exposition_sp,Date_sp,Actor1,Actor2,Actor3,Actor4,Actor5,Actor6,Actor7,Actor8,Actor9,Actor10 from Spectacles";
            SqlDataReader reader2 = command.ExecuteReader();

            List <Spectacle> CurrentSpectacles = new List <Spectacle>();

            while (reader2.Read())
            {
                SendSpectacle = new Spectacle(Convert.ToInt16(reader2["Spectacle_id"].ToString()), reader2["Spectacle_name"].ToString(), reader2["Exposition_sp"].ToString(), Convert.ToDateTime(reader2["Date_sp"].ToString()), Convert.ToInt16(reader2["Actor1"].ToString()), Convert.ToInt16(reader2["Actor2"].ToString()), Convert.ToInt16(reader2["Actor3"].ToString()), Convert.ToInt16(reader2["Actor4"].ToString()), Convert.ToInt16(reader2["Actor5"].ToString()), Convert.ToInt16(reader2["Actor6"].ToString()), Convert.ToInt16(reader2["Actor7"].ToString()), Convert.ToInt16(reader2["Actor8"].ToString()), Convert.ToInt16(reader2["Actor9"].ToString()), Convert.ToInt16(reader2["Actor10"].ToString()));
                spectacleList.Add(SendSpectacle);
            }

            foreach (var spec in spectacleList)
            {
                CurrentSpectacles.Clear();
                if (String.Equals(spec.date_sp, date_sp.Date))
                {
                    CurrentSpectacles.Add(spec);
                }
            }
            return(CurrentSpectacles);
        }
示例#8
0
        public static void StartSpectacle(Spectacle spectacle)
        {
            Console.Clear();
            Console.WriteLine("#######################################################################################################################");
            Console.WriteLine("Madame et Messieurs, bienvenue dans notre tout nouveau spectacle");
            Console.WriteLine(_animalController.DescriptionSpectacle(spectacle));

            Console.WriteLine("Que le spectacle commence !!");
            for (int i = 0; i < 5; i++)
            {
                Console.WriteLine(_animalController.StartSpectacle(spectacle));
            }

            Console.WriteLine("Je vous prie d'applaudir nos animateurs et nos animaux");
            Console.WriteLine(_animalController.DescriptionAnimateur(spectacle));
            Console.WriteLine("#######################################################################################################################");
            retourHome();
        }
示例#9
0
        public IActionResult UpdatePerformance(int id, [FromBody] SpectacleDto spectacleDto)
        {
            Spectacle spectacle = null;

            try
            {
                spectacle = spectacles.Single(s => s.Id == id);
            }
            catch
            {
                return(NotFound());
            }

            spectacle.Name             = spectacleDto.Name;
            spectacle.AvailableTickets = spectacleDto.AvailableTickets;
            spectacle.StartDateTime    = spectacleDto.StartDateTime;
            spectacle.Duration         = TimeSpan.Parse(spectacleDto.Duration);

            return(NoContent());
        }
示例#10
0
 public string DescriptionAnimateur(Spectacle item)
 {
     return(_uow.SpectacleService().DescriptionAnimateur(item));
 }
示例#11
0
 public async Task DeleteAsync(Spectacle entity)
 {
     await _unitOfWork.SpectacleRepository.DeleteAsync(entity);
 }
示例#12
0
        private void EnvoiClick(object sender, RoutedEventArgs e)
        {
            bool flagID = true;

            for (int i = 0; i < Administration.listeAttractions.Count; i++)
            {
                if (id.Text == Convert.ToString(Administration.listeAttractions[i].Identifiant))
                {
                    flagID = false;
                }
            }

            if (flagID)
            {
                if (id.Text != null && nom.Text != null)
                {
                    if (ouvertOUI.IsChecked == true ^ ouvertNON.IsChecked == true)
                    {
                        if (exactitude.IsChecked == true)
                        {
                            if (maintenanceOUI.IsChecked == true ^ maintenanceNON.IsChecked == true)
                            {
                                if (maintenanceOUI.IsChecked == true)
                                {
                                    if (dureeMaintenance.Text != null && natureMaintenance.Text != null)
                                    {
                                        try
                                        {
                                            string stringBesoinSpecifique;
                                            if (besoinSpeOUI.IsChecked == true)
                                            {
                                                stringBesoinSpecifique = "1";
                                            }
                                            else
                                            {
                                                stringBesoinSpecifique = "0";
                                            }
                                            string stringDureeMaintenance = dureeMaintenance.Text;
                                            string stringID = id.Text;
                                            //string stringMaintenance;
                                            string stringNatureMaintenance = natureMaintenance.Text;
                                            string stringNbMinMonstre      = Convert.ToString(nbSlider.Value);
                                            string stringNom = nom.Text;
                                            string stringOuvert;
                                            if (ouvertOUI.IsChecked == true)
                                            {
                                                stringOuvert = "1";
                                            }
                                            else
                                            {
                                                stringOuvert = "0";
                                            }
                                            string          stringTypeDeBesoin = typeBesoin.Text;
                                            string          connectionString   = "SERVER=35.195.241.250; PORT=3306; DATABASE=zombillenium; UID=root; PASSWORD=abcd1234;";
                                            MySqlConnection connection         = new MySqlConnection(connectionString);
                                            connection.Open();
                                            MySqlCommand command = connection.CreateCommand();
                                            command.CommandText = "INSERT INTO zombillenium.attraction (besoinSpecifique, dureeMaintenance, ID, maintenance, natureMaintenance, nbMinMonstre, nom, ouvert, typeDeBesoin) VALUES ('" + stringBesoinSpecifique + "','" + stringDureeMaintenance + "','" + stringID + "','" + "0" + "','" + stringNatureMaintenance + "','" + stringNbMinMonstre + "','" + stringNom + "','" + stringOuvert + "','" + stringTypeDeBesoin + "');";

                                            MySqlDataReader reader;
                                            reader = command.ExecuteReader();



                                            bool boolBesoinSpecifique;
                                            if (besoinSpeOUI.IsChecked == true)
                                            {
                                                boolBesoinSpecifique = true;
                                            }
                                            else
                                            {
                                                boolBesoinSpecifique = false;
                                            }
                                            bool boolOuvert;
                                            if (ouvertOUI.IsChecked == true)
                                            {
                                                boolOuvert = true;
                                            }
                                            else
                                            {
                                                boolOuvert = false;
                                            }
                                            TimeSpan          dureeMaint      = TimeSpan.FromHours(Convert.ToInt32(dureeMaintenance.Text));
                                            List <Monstre>    temp            = new List <Monstre>();
                                            int               idClass         = Convert.ToInt32(id.Text);
                                            int               minMonstreClass = Convert.ToInt32(stringNbMinMonstre);
                                            List <Attraction> list1           = new List <Attraction>();
                                            TimeSpan          dureeClass      = TimeSpan.FromMinutes(Convert.ToInt32(duree.Text));
                                            bool              vehicule;
                                            if (vehiculeOUI.IsChecked == true)
                                            {
                                                vehicule = true;
                                            }
                                            else
                                            {
                                                vehicule = false;
                                            }
                                            TypeBoutique    typebouti  = (TypeBoutique)typeBout.SelectedItem;
                                            int             ageMini    = Convert.ToInt32(ageMin.Text);
                                            TypeCategorie   typeCat    = (TypeCategorie)catRoll.SelectedItem;
                                            float           tailleMini = float.Parse(tailleMin.Text);
                                            List <DateTime> horaires   = new List <DateTime>();
                                            int             places     = Convert.ToInt32(nbPlaces.Text);

                                            if (typeAttraction.Text == "DarkRide")
                                            {
                                                DarkRide attract1 = new DarkRide(dureeClass, vehicule, boolBesoinSpecifique, dureeMaint, temp, idClass, true, stringNatureMaintenance, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                                list1.Add(attract1);
                                                Console.WriteLine(attract1);
                                            }
                                            else if (typeAttraction.Text == "Boutique")
                                            {
                                                Boutique attract1 = new Boutique(typebouti, boolBesoinSpecifique, dureeMaint, temp, idClass, true, stringNatureMaintenance, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                                list1.Add(attract1);
                                            }
                                            else if (typeAttraction.Text == "RollerCoaster")
                                            {
                                                RollerCoaster attract1 = new RollerCoaster(ageMini, typeCat, tailleMini, boolBesoinSpecifique, temp, idClass, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                                list1.Add(attract1);
                                            }
                                            else
                                            {
                                                Spectacle attract1 = new Spectacle(horaires, places, nomSalle.Text, boolBesoinSpecifique, dureeMaint, temp, idClass, true, stringNatureMaintenance, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                                list1.Add(attract1);
                                            }

                                            //Attraction attract1 = new Attraction(boolBesoinSpecifique, dureeMaint, temp, idClass, true,
                                            //    stringNatureMaintenance, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                            Administration.listeAttractions.Add(list1[0]);
                                            //Administration.listeAttractions.ForEach(Console.WriteLine);

                                            if (reader.Read())
                                            {
                                                affichage.Text = reader.GetString(0);
                                            }
                                            else
                                            {
                                                affichage.Text = "Attraction ajoutée";
                                            }


                                            connection.Close();
                                        }
                                        catch
                                        {
                                            MessageBoxResult result = MessageBox.Show("Type de valeur d'entrée incorrect: vérifier le matricule (entier) et le sexe (M, F ou A)", "Erreur", MessageBoxButton.OK, MessageBoxImage.Error);
                                            //label1.Content = "Type de valeur d'entrée incorrect: vérifier le matricule (entier) et le sexe (M, F ou A)";
                                        }
                                    }
                                    else
                                    {
                                        affichage.Text = "Informations manquantes. Merci de remplir la durée de maintenance et sa nature.";
                                    }
                                }
                                else
                                {
                                    try
                                    {
                                        string stringBesoinSpecifique;
                                        if (besoinSpeOUI.IsChecked == true)
                                        {
                                            stringBesoinSpecifique = "1";
                                        }
                                        else
                                        {
                                            stringBesoinSpecifique = "0";
                                        }
                                        //string stringDureeMaintenance = dureeMaintenance.Text;
                                        string stringID = id.Text;
                                        //string stringMaintenance;
                                        //string stringNatureMaintenance = natureMaintenance.Text;
                                        string stringNbMinMonstre = Convert.ToString(nbSlider.Value);
                                        string stringNom          = nom.Text;
                                        string stringOuvert;
                                        if (ouvertOUI.IsChecked == true)
                                        {
                                            stringOuvert = "1";
                                        }
                                        else
                                        {
                                            stringOuvert = "0";
                                        }
                                        string stringTypeDeBesoin = typeBesoin.Text;

                                        try
                                        {
                                            string          connectionString = "SERVER=35.195.241.250; PORT=3306; DATABASE=zombillenium; UID=root; PASSWORD=abcd1234;";
                                            MySqlConnection connection       = new MySqlConnection(connectionString);
                                            connection.Open();
                                            MySqlCommand command = connection.CreateCommand();
                                            command.CommandText = "INSERT INTO zombillenium.attraction (besoinSpecifique, ID, maintenance, nbMinMonstre, nom, ouvert, typeDeBesoin) VALUES ('" + stringBesoinSpecifique + "','" + stringID + "','" + "0" + "','" + stringNbMinMonstre + "','" + stringNom + "','" + stringOuvert + "','" + stringTypeDeBesoin + "');";

                                            MySqlDataReader reader;
                                            reader = command.ExecuteReader();

                                            if (reader.Read())
                                            {
                                                affichage.Text = reader.GetString(0);
                                            }
                                            else
                                            {
                                                affichage.Text = "Attraction ajoutée";
                                            }


                                            connection.Close();
                                        }
                                        catch
                                        {
                                            affichage.Text = "Attraction non ajoutée à la base de données.";
                                        }


                                        bool boolBesoinSpecifique;
                                        if (besoinSpeOUI.IsChecked == true)
                                        {
                                            boolBesoinSpecifique = true;
                                        }
                                        else
                                        {
                                            boolBesoinSpecifique = false;
                                        }
                                        bool boolOuvert;
                                        if (ouvertOUI.IsChecked == true)
                                        {
                                            boolOuvert = true;
                                        }
                                        else
                                        {
                                            boolOuvert = false;
                                        }
                                        //TimeSpan dureeMaint = TimeSpan.FromHours(Convert.ToInt32(dureeMaintenance.Text));
                                        List <Monstre>    temp            = new List <Monstre>();
                                        int               idClass         = Convert.ToInt32(id.Text);
                                        int               minMonstreClass = Convert.ToInt32(stringNbMinMonstre);
                                        List <Attraction> list1           = new List <Attraction>();
                                        TimeSpan          dureeClass      = TimeSpan.FromMinutes(Convert.ToInt32(duree.Text));
                                        bool              vehicule;
                                        if (vehiculeOUI.IsChecked == true)
                                        {
                                            vehicule = true;
                                        }
                                        else
                                        {
                                            vehicule = false;
                                        }
                                        TypeBoutique    typebouti  = (TypeBoutique)typeBout.SelectedItem;
                                        int             ageMini    = Convert.ToInt32(ageMin.Text);
                                        TypeCategorie   typeCat    = (TypeCategorie)catRoll.SelectedItem;
                                        float           tailleMini = float.Parse(tailleMin.Text);
                                        List <DateTime> horaires   = new List <DateTime>();
                                        int             places     = Convert.ToInt32(nbPlaces.Text);

                                        if (typeAttraction.Text == "DarkRide")
                                        {
                                            DarkRide attract1 = new DarkRide(dureeClass, vehicule, boolBesoinSpecifique, temp, idClass, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                            list1.Add(attract1);
                                            Console.WriteLine(attract1);
                                        }
                                        else if (typeAttraction.Text == "Boutique")
                                        {
                                            Boutique attract1 = new Boutique(typebouti, boolBesoinSpecifique, temp, idClass, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                            list1.Add(attract1);
                                        }
                                        else if (typeAttraction.Text == "RollerCoaster")
                                        {
                                            RollerCoaster attract1 = new RollerCoaster(ageMini, typeCat, tailleMini, boolBesoinSpecifique, temp, idClass, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                            list1.Add(attract1);
                                        }
                                        else
                                        {
                                            Spectacle attract1 = new Spectacle(horaires, places, nomSalle.Text, boolBesoinSpecifique, temp, idClass, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                            list1.Add(attract1);
                                        }

                                        //Attraction attract1 = new Attraction(boolBesoinSpecifique, dureeMaint, temp, idClass, true,
                                        //    stringNatureMaintenance, minMonstreClass, stringNom, boolOuvert, stringTypeDeBesoin);
                                        Administration.listeAttractions.Add(list1[0]);

                                        if (affichage.Text != "Attraction non ajoutée à la base de données.")
                                        {
                                            affichage.Text = "Attraction ajoutée.";
                                        }
                                        else
                                        {
                                            affichage.Text = "Attraction ajoutée au programme, mais pas à la base de données MySQL.";
                                        }
                                    }
                                    catch
                                    {
                                        MessageBoxResult result = MessageBox.Show("Type de valeur d'entrée incorrect: vérifier le matricule (entier) et le sexe (M, F ou A)", "Erreur", MessageBoxButton.OK, MessageBoxImage.Error);
                                        //label1.Content = "Type de valeur d'entrée incorrect: vérifier le matricule (entier) et le sexe (M, F ou A)";
                                    }
                                }
                            }
                            else
                            {
                                affichage.Text = "Merci d'indiquer si l'attraction est en maintenance.";
                            }
                        }
                        else
                        {
                            affichage.Text = "Merci de confirmer l'exactitude des informations en cochant la case.";
                        }
                    }
                }
                else
                {
                }
            }
            else
            {
                affichage.Text = "Matricule déjà existant. Merci de le changer.";
            }
        }
示例#13
0
 public string StartSpectacle(Spectacle spectacle)
 {
     Thread.Sleep(1000);
     return(_uow.SpectacleService().DoTheSpectacle(spectacle));
 }
示例#14
0
        /// <summary>
        /// Ajouter une nouvelle représentation au spectacle
        /// </summary>
        /// <param name="s"></param>
        private static char enterRepresentation(Spectacle s)
        {
            char choix = '\u0000'; //unicode de null
            string _date;
            string _places;
            string _tarif;
            do
            {
                Console.Clear();
                Console.WriteLine("--- {0} ---", s.ToString());
                Console.WriteLine(Environment.NewLine);
                Console.WriteLine("--- Nouvelle représentation ---");
                Console.WriteLine(Environment.NewLine);
                /*
                 * saisir les informations
                 */
                Console.Write("Date représentation : ");
                _date = Console.ReadLine();
                Console.Write("Nb places disponibles : ");
                _places = Console.ReadLine();
                Console.Write("tarif : ");
                _tarif = Console.ReadLine();
                Console.WriteLine(Environment.NewLine);
                Console.WriteLine("V. valider - P. Retour menu principal");
                choix = Console.ReadKey().KeyChar;
                switch (choix)
                {
                    case 'v':
                    case 'V':
                        try
                        {
                            /*
                             * construire la représentation en mémoire
                             */
                            Representation rp = new Representation();
                            rp.placesDispo = int.Parse(_places);
                            rp.tarif = double.Parse(_tarif);
                            rp.date = DateTime.Parse(_date);
                            /*
                            * ajouter la représentation au spectacle
                            */
                            s.ajouterRepresentation(rp);
                        }
                        catch (Exception)
                        {
                            Console.WriteLine("Erreur lors de la création de la représentation.");
                        }

                        break;
                }
            } while (choix != 'p' && choix != 'P' && choix != 'v' && choix != 'V');
            return choix;
        }
示例#15
0
        /// <summary>
        /// Lister les représentations d'un spectacle
        /// </summary>
        /// <returns></returns>
        private static char MnuRepresentations(Spectacle spectacle)
        {
            char choix = '\u0000'; //unicode de null
            do
            {
                Console.Clear();
                Console.WriteLine("--- {0} ---", spectacle.ToString());
                Console.WriteLine(Environment.NewLine);
                Console.WriteLine("--- Liste des représentations ---");
                Console.WriteLine(Environment.NewLine);
                int num = 0;
                foreach (Representation rp in spectacle.representations)
                {
                    num++;
                    Console.WriteLine("{0} - date : {1} places libres : {2} tarif : {3}", num,rp.date, rp.placesDispo, rp.tarif);
                }
                Console.WriteLine(Environment.NewLine);
                Console.WriteLine("A. ajouter - S. supprimer - P. Retour menu principal");
                choix = Console.ReadKey().KeyChar;
                switch (choix)
                {
                    case 'a':
                    case 'A':
                        enterRepresentation(spectacle);

                        break;

                    case 's':
                    case 'S':
                        break;
                }
            } while (choix != 'p' && choix != 'P'); //unicode de P et p
            return choix;
        }
示例#16
0
 public SpectacleSaveCommand(Spectacle item)
 {
     Spectacle = item;
 }
示例#17
0
        public void EditSpectacle(Spectacle obj)
        {
            var x = SpectacleSaveCommandHandlerFactory.Build(new SpectacleSaveCommand(obj), db);

            x.Execute();
        }
示例#18
0
 public void ajouterSpectacle(Spectacle s)
 {
     _spectacles.Add(s);
 }
示例#19
0
 public Spectacle Create(Spectacle entity)
 {
     return(_unitOfWork.SpectacleRepository.Create(entity));
 }
示例#20
0
 public string DescriptionSpectacle(Spectacle item)
 {
     return(_uow.SpectacleService().Description(item));
 }
示例#21
0
 public void Delete(Spectacle entity)
 {
     _unitOfWork.SpectacleRepository.Delete(entity);
 }
示例#22
0
 public async Task <Spectacle> CreateAsync(Spectacle entity)
 {
     return(await _unitOfWork.SpectacleRepository.CreateAsync(entity));
 }