コード例 #1
0
    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);
    }
コード例 #2
0
    private void FillGenres()
    {
        ArtistTrackingServiceClient atsc = new ArtistTrackingServiceClient();
        int          key    = (int)Session["FanKey"];
        List <Genre> genres = atsc.GetGenres().ToList();

        DataList2.DataSource = genres;
        DataList2.DataBind();
    }
コード例 #3
0
    private void FillArtists()
    {
        ArtistTrackingServiceClient atsc = new ArtistTrackingServiceClient();
        int           key     = (int)Session["FanKey"];
        List <Artist> artists = atsc.GetArtists().ToList();

        DataList1.DataSource = artists;
        DataList1.DataBind();
    }
コード例 #4
0
    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);
    }
コード例 #5
0
    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();
    }
コード例 #6
0
    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();
    }
コード例 #7
0
    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
         */
    }