示例#1
0
        public bool removeStade(StadeWS stade)
        {
            List <Stade> liste = businessManager.getStades();
            Stade        paria = liste.First(x => x.Id == stade.Id);

            liste.Remove(paria);
            return(0 == businessManager.updateStades(liste));
        }
示例#2
0
 public MatchWS(int pId, JediWS pJedi1, JediWS pJedi2, JediWS pJediV, StadeWS pStade, EPhaseTournoi pPhase)
 {
     this.Id = pId;
     this.Jedi1 = pJedi1;
     this.Jedi2 = pJedi2;
     this.JediVainqueur = pJediV;
     this.Stade = pStade;
     this.Phase = (EPhaseTournoiWS)pPhase;
 }
示例#3
0
 public MatchWS(int pId, JediWS pJedi1, JediWS pJedi2, JediWS pJediV, StadeWS pStade, EPhaseTournoi pPhase)
 {
     this.Id            = pId;
     this.Jedi1         = pJedi1;
     this.Jedi2         = pJedi2;
     this.JediVainqueur = pJediV;
     this.Stade         = pStade;
     this.Phase         = (EPhaseTournoiWS)pPhase;
 }
示例#4
0
        public bool addStade(StadeWS stade)
        {
            List <Stade>           listeS = businessManager.getStades();
            List <Caracteristique> listeC = businessManager.getCaracteristiques();
            List <Caracteristique> caracs = new List <Caracteristique>();

            stade.Caracteristiques.ForEach(x => caracs.Add(listeC.Find(c => c.Nom.Equals(x.Nom))));
            Stade newStade = new Stade(0, stade.NbPlaces, stade.Planete, caracs);

            listeS.Add(newStade);
            return(0 == businessManager.updateStades(listeS));
        }
示例#5
0
        public bool updateStade(StadeWS stade)
        {
            List <Stade>           listeS = businessManager.getStades();
            List <Caracteristique> listeC = businessManager.getCaracteristiques();
            List <Caracteristique> caracs = new List <Caracteristique>();

            stade.Caracteristiques.ForEach(x => caracs.Add(listeC.Find(c => c.Nom.Equals(x.Nom))));
            Stade newStade = listeS.First(x => x.Id == stade.Id);

            newStade.Planete          = stade.Planete;
            newStade.NbPlaces         = stade.NbPlaces;
            newStade.Caracteristiques = caracs;
            return(0 == businessManager.updateStades(listeS));
        }
示例#6
0
 public System.Threading.Tasks.Task <bool> removeStadeAsync(WCFJedi.StadeWS stade)
 {
     return(base.Channel.removeStadeAsync(stade));
 }
示例#7
0
 public bool removeStade(WCFJedi.StadeWS stade)
 {
     return(base.Channel.removeStade(stade));
 }
示例#8
0
 public bool updateStade(WCFJedi.StadeWS stade)
 {
     return(base.Channel.updateStade(stade));
 }
示例#9
0
 public bool addStade(WCFJedi.StadeWS stade)
 {
     return(base.Channel.addStade(stade));
 }
示例#10
0
        public void TestServiceARStades()
        {
            ServiceReference.ServiceClient client = new ServiceReference.ServiceClient();

            List<StadeWS> stades = client.getStades();
            int size = stades.Count;
            Assert.IsNotNull(stades);
            /* AJOUT */
            StadeWS zone = new StadeWS(0, "Zone TEST", 11, new List<CaracteristiqueWS>());

            client.addStade(zone);
            Assert.AreEqual(size + 1, client.getStades().Count);
            /* SUPPRESSION */
            zone = client.getStades().Find(x => x.Planete.Equals("Zone TEST"));
            client.removeStade(zone);
            Assert.AreEqual(size, client.getStades().Count);

            client.Close();
        }