Exemplo n.º 1
0
 protected void listeEvenements_SelectedIndexChanged(object sender, EventArgs e)
 {
     ServiceReference.ServiceAgendaClient servAgenda = new ServiceReference.ServiceAgendaClient();
     evenements.DataSource = servAgenda.GetEventsByArtist(listeArtistes.SelectedItem.ToString()).Select(a => a.Titre);
     evenements.DataBind();
     //listeLieux_SelectedIndexChanged(sender, e);
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                artiste = Request.Form[0];
                evenement = Request.Form[1];
                lieu = Request.Form[2];

                ServiceReference.ServiceAgendaClient servAgenda = new ServiceReference.ServiceAgendaClient();

                ServiceReference.EvenementWS even = servAgenda.GetEventsByArtist(artiste).Where(a => a.Titre.Equals(evenement)).First();

                tarif.Text = even.Tarif.ToString();
                description.Text = even.Description;
                titre.Text = even.Titre;

                artistes.DataSource = even.Artistes.Select(a => a.Nom);
                artistes.DataBind();

                ServiceReference.ArtisteWS artist = servAgenda.GetAllArtists().Where(a => a.Nom.Equals(artistes.SelectedValue)).First();
                if (artist.DateNaissance != null)
                    dateDN.Text = artist.DateNaissance.ToString();

                ServiceReference.LieuWS place = servAgenda.GetPlacesByEvent(even).Where(a => a.Nom.Equals(lieu)).First();
                nom.Text = place.Nom;
                adresse.Text = place.Adresse;
                nbPlace.Text = place.NombrePlacesTotal.ToString();
                tel.Text = place.Telephone;

                ServiceReference.PlanningElementWS pe = servAgenda.GetPlanningElementsByEvent(even).First(); ;
                if (pe.DateDebut != null)
                    dates.Text = pe.DateDebut.ToString();
                places.Text = (place.NombrePlacesTotal - pe.NombrePlacesReservees).ToString();
            }
        }
Exemplo n.º 3
0
        protected void listeArtistes_SelectedIndexChanged(object sender, EventArgs e)
        {
            ServiceReference.ServiceAgendaClient servAgenda = new ServiceReference.ServiceAgendaClient();
            string even = evenements.SelectedValue;
            IEnumerable<ServiceReference.EvenementWS> events = servAgenda.GetEventsByArtist(listeArtistes.SelectedItem.ToString());

            lieux.DataSource = servAgenda.GetPlacesByEvent(events.First()).Select(a => a.Nom);
            lieux.DataBind();
            listeEvenements_SelectedIndexChanged(sender, e);
        }