Example #1
0
		public StadeViewModel(ServiceReference.StadeWS stade) {
			this.Id = stade.Id;
			this.Planete = stade.Planete;
			this.NbPlaces = stade.NbPlaces;

			List<CaracteristiqueViewModel> tmpList = new List<CaracteristiqueViewModel>();
			foreach(var car in stade.Caracteristiques) {
				tmpList.Add(new CaracteristiqueViewModel(car));
			}
			this.Caracteristiques = new CaracteristiqueCollection(tmpList);
		}
Example #2
0
		public JediViewModel(ServiceReference.JediWS jedi) {
            if(jedi != null)
            {
			    this.Id = jedi.Id;
			    this.Nom = jedi.Nom;
			    this.IsSith = jedi.IsSith;

			    List<CaracteristiqueViewModel> tmpList = new List<CaracteristiqueViewModel>();
			    foreach(var car in jedi.Caracteristiques) {
				    tmpList.Add(new CaracteristiqueViewModel(car));
			    }
			    this.Caracteristiques = new CaracteristiqueCollection(tmpList);
            }
		}
Example #3
0
        public StadeViewModel(ServiceReference.StadeWS stade)
        {
            this.Id       = stade.Id;
            this.Planete  = stade.Planete;
            this.NbPlaces = stade.NbPlaces;

            List <CaracteristiqueViewModel> tmpList = new List <CaracteristiqueViewModel>();

            foreach (var car in stade.Caracteristiques)
            {
                tmpList.Add(new CaracteristiqueViewModel(car));
            }
            this.Caracteristiques = new CaracteristiqueCollection(tmpList);
        }
Example #4
0
        public JediViewModel(ServiceReference.JediWS jedi)
        {
            if (jedi != null)
            {
                this.Id     = jedi.Id;
                this.Nom    = jedi.Nom;
                this.IsSith = jedi.IsSith;

                List <CaracteristiqueViewModel> tmpList = new List <CaracteristiqueViewModel>();
                foreach (var car in jedi.Caracteristiques)
                {
                    tmpList.Add(new CaracteristiqueViewModel(car));
                }
                this.Caracteristiques = new CaracteristiqueCollection(tmpList);
            }
        }