protected void DropDownListGenre_SelectedIndexChanged(object sender, EventArgs e) { ArtistTrackingServiceClient ast = new ArtistTrackingServiceClient(); int fan = (int)Session["FanKey"]; int genre = int.Parse(DropDownListArtist.SelectedValue.ToString()); ast.FollowGenre(genre, fan); }
private void FillGenres() { ArtistTrackingServiceClient atsc = new ArtistTrackingServiceClient(); int key = (int)Session["FanKey"]; List <Genre> genres = atsc.GetGenres().ToList(); DataList2.DataSource = genres; DataList2.DataBind(); }
private void FillArtists() { ArtistTrackingServiceClient atsc = new ArtistTrackingServiceClient(); int key = (int)Session["FanKey"]; List <Artist> artists = atsc.GetArtists().ToList(); DataList1.DataSource = artists; DataList1.DataBind(); }
protected void DropDownListArtist_SelectedIndexChanged(object sender, EventArgs e) { prefs.Text = DropDownListArtist.SelectedItem.ToString(); ArtistTrackingServiceClient ast = new ArtistTrackingServiceClient(); int fan = (int)Session["FanKey"]; int artist = int.Parse(DropDownListArtist.SelectedValue.ToString()); ast.FollowArtist(artist, fan); }
private void FillDropDownListGenre() { ArtistTrackingServiceClient asc = new ArtistTrackingServiceClient(); int key = (int)Session["FanKey"]; List <Genre> genres = asc.GetGenres().ToList(); DropDownListGenre.DataSource = genres; DropDownListGenre.DataTextField = "GenreName"; DropDownListGenre.DataValueField = "GenreKey"; DropDownListGenre.DataBind(); }
private void FillDropDownListArtist() { ArtistTrackingServiceClient asc = new ArtistTrackingServiceClient(); int key = (int)Session["FanKey"]; List <Artist> artists = asc.GetArtists().ToList(); DropDownListArtist.DataSource = artists; DropDownListArtist.DataTextField = "ArtistName"; DropDownListArtist.DataValueField = "ArtistKey"; DropDownListArtist.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (Session["FanKey"] == null) { Response.Redirect("Login.aspx"); } ArtistTrackingServiceClient asc = new ArtistTrackingServiceClient(); int key = (int)Session["FanKey"]; List <Artist> arts = asc.GetArtists().ToList(); //did not get method working to display if preferences already chosen /*string aprf = asc.GetPrefs(key).ToString();*/ FillArtists(); FillGenres(); FillDropDownListArtist(); FillDropDownListGenre(); /*FillPreferences(aprf); * did not get method working to display if preferences already chosen */ }