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)); }
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; }
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)); }
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)); }
public System.Threading.Tasks.Task <bool> removeStadeAsync(WCFJedi.StadeWS stade) { return(base.Channel.removeStadeAsync(stade)); }
public bool removeStade(WCFJedi.StadeWS stade) { return(base.Channel.removeStade(stade)); }
public bool updateStade(WCFJedi.StadeWS stade) { return(base.Channel.updateStade(stade)); }
public bool addStade(WCFJedi.StadeWS stade) { return(base.Channel.addStade(stade)); }
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(); }