Example #1
0
 protected void AlbumFetch_Click(object sender, EventArgs e)
 {
     //code to go here
     TracksBy.Text    = "Album";
     SearchArgID.Text = AlbumDDL.SelectedValue;
     TracksSelectionList.DataBind();
 }
 protected void ArtistFetch_Click(object sender, EventArgs e)
 {
     //code to go here
     TracksBy.Text  = "Artist";
     SearchArg.Text = ArtistName.Text;
     TracksSelectionList.DataBind();
 }
 protected void GenreFetch_Click(object sender, EventArgs e)
 {
     //code to go here
     TracksBy.Text  = "Genre";
     SearchArg.Text = GenreDDL.SelectedValue;
     TracksSelectionList.DataBind();
 }
Example #4
0
 protected void MediaTypeFetch_Click(object sender, EventArgs e)
 {
     //code to go here
     TracksBy.Text    = "MediaType";
     SearchArgID.Text = MediaTypeDDL.SelectedValue;
     TracksSelectionList.DataBind();
 }
Example #5
0
 protected void GenreFetch_Click(object sender, EventArgs e)
 {
     TracksBy.Text  = "Genre";
     SearchArg.Text = GenreDDL.SelectedValue;
     //selected value returns contents as a string
     //no need for valdation
     TracksSelectionList.DataBind();
 }
 protected void GenreFetch_Click(object sender, EventArgs e)
 {
     //code to go here
     TracksBy.Text    = "Genre";
     SearchArgID.Text = GenreDDL.SelectedValue;
     //refresh the track list display
     TracksSelectionList.DataBind();
 }
 protected void GenreFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         SearchArg.Text = GenreDDL.SelectedValue;
         TracksBy.Text  = "Genre";
         TracksSelectionList.DataBind(); //executes ods
     }, "Track Search", "Select songs to add to playlist.");
 }
Example #8
0
 protected void GenreFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         SearchArg.Text = GenreDDL.SelectedValue;
         TracksBy.Text  = "Genre";
         TracksSelectionList.DataBind(); //causes the ODS to execute
     }, "Track Search", "Select from the following list to add to your playlist");
 }
 protected void MediaTypeFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         SearchArg.Text = MediaTypeDDL.SelectedValue;
         TracksBy.Text  = "MediaType";
         TracksSelectionList.DataBind();
     }, "Track Search", "Select from the following list to add to your playlist");
 }
Example #10
0
 protected void MediaTypeFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         TracksBy.Text    = "MediaType";
         SearchArgId.Text = MediaTypeDDL.SelectedValue;
         TracksSelectionList.DataBind(); //Will force the ODS to execute
     });
 }
 protected void AlbumFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         TracksBy.Text    = "Album";
         SearchArgID.Text = AlbumDDL.SelectedValue;
         TracksSelectionList.DataBind();//will force the ODS to execute
     });
 }
 protected void AlbumFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         TracksBy.Text    = "Album";
         SearchArgID.Text = AlbumDDL.SelectedValue;
         TracksSelectionList.DataBind();
     }, "Album by Genre", "Add an Album Track to your playlist by clicking on the + (plus sign).");
 }
 protected void MediaTypeFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         TracksBy.Text    = "Mediatype";
         SearchArgID.Text = MediaTypeDDL.SelectedValue;
         TracksSelectionList.DataBind();
     }, "Tracks by Mediatype", "Add an Mediatype Track to your playlist by clicking on the + (plus sign).");
 }
Example #14
0
 protected void GenreFetch_Click(object sender, EventArgs e)
 {
     //code to go here
     MessageUserControl.TryRun(() =>
     {
         TracksBy.Text    = "Genre";
         SearchArgID.Text = GenreDDL.SelectedValue;
         TracksSelectionList.DataBind();
     }, "Tracks by Genre", "Add an track to your playlist by clicking on the + (plus sign).");
 }
 protected void ArtistFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         //code to go here
         SearchArg.Text = ArtistName.Text;
         TracksBy.Text  = "Artist";
         TracksSelectionList.DataBind(); //causes the ODS to execute
     }, "Track Search", "Please select from the following list to add to your playlist.");
 }
 protected void AlbumFetch_Click(object sender, EventArgs e)
 {
     MessageUserControl.TryRun(() =>
     {
         //code to go here
         int id           = int.Parse(AlbumDDL.SelectedValue);
         SearchArgID.Text = id.ToString();
         TracksBy.Text    = "Album";
         TracksSelectionList.DataBind(); //causes the ODS to execute!!!!!!!!!!!!
     }, "Track Search", "Please select from the following list to add to your playlist.");
 }
 protected void MediaTypeFetch_Click(object sender, EventArgs e)
 {
     //we don't need to test to see if ther eis something that is needed becaus eit is a drop down list.
     //if you put a prompt line, you would have to check for it, but he didn't add one so no check is necessary
     MessageUserControl.TryRun(() =>
     {
         SearchArg.Text = MediaTypeDDL.SelectedValue;
         TracksBy.Text  = "MediaType";
         TracksSelectionList.DataBind(); //this line causes the ODS to execute. So if I need to do it again, then I can just do a data bind.
     }, "Track Search", "Select from the following list to add to your playlist.");
 }
Example #18
0
 protected void ArtistFetch_Click(object sender, EventArgs e)
 {
     //This Message user control for error handling in place of using "Try Catch"
     MessageUserControl.TryRun(() =>
     {
         //code to go here
         int id           = int.Parse(ArtistDDL.SelectedValue);
         SearchArgID.Text = id.ToString();
         TracksBy.Text    = "Artist";
         TracksSelectionList.DataBind(); //This statement causes the ODS to execute
     }, "Track Search", "Please select from the following list to add to your playlist.");
 }
        protected void ArtistFetch_Click(object sender, EventArgs e)
        {
            MessageUserControl.TryRun(() =>
            {
                TracksBy.Text    = "Artist";
                SearchArgID.Text = ArtistDDL.SelectedValue;

                TracksSelectionList.DataBind();
            },
                                      "Tracks by Artist",
                                      "Add a track to your playlist by clicking (+)");
        }
Example #20
0
 protected void ArtistFetch_Click(object sender, EventArgs e)
 {
     //validate that data exists if not put out a message
     if (string.IsNullOrEmpty(ArtistName.Text))
     {
         MessageUserControl.ShowInfo("Search entry error", "Enter a artist name or partial artist name, then press your button.");
         SearchArg.Text = "dddfgg";
     }
     TracksBy.Text  = "Artist";
     SearchArg.Text = ArtistName.Text;
     //to force the listview to rebind to execute again
     TracksSelectionList.DataBind();
 }
Example #21
0
 protected void MediaTypeDDL_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (MediaTypeDDL.SelectedIndex == 0)
     {
         //message to the user
         MessageUserControl.ShowInfo("Selection Error", "Enter a media type");
     }
     else
     {
         TracksBy.Text  = "MediaType";
         SearchArg.Text = MediaTypeDDL.SelectedValue;
         TracksSelectionList.DataBind();
     }
 }
Example #22
0
        protected void ArtistFetch_Click(object sender, EventArgs e)
        {
            TracksBy.Text = "Artist";
            if (string.IsNullOrEmpty(ArtistName.Text))
            {
                MessageUserControl.ShowInfo("Artist Search", "No artist name was supplied");
            }

            //HiddentField, though text fields, are accessed by the property Value, NOT Text
            SearchArg.Value = ArtistName.Text;

            //to cause an ODS to re-execute, you only need to do a .DataBind() against the display control
            TracksSelectionList.DataBind();
        }
Example #23
0
        protected void GenreFetch_Click(object sender, EventArgs e)
        {
            TracksBy.Text = "Genre";
            //there is no prompt test needed for this event BECAUSE the dropdownlist
            //    does not have a prompt
            //by default there will always be a value to use

            //HiddentField, though text fields, are accessed by the property Value, NOT Text
            SearchArg.Value = GenreDDL.SelectedValue.ToString(); //as an integer
            //SearchArg.Value = GenreDDL.SelectedItem.Text; //as a string

            //to cause an ODS to re-execute, you only need to do a .DataBind() against the display control
            TracksSelectionList.DataBind();
        }
        protected void MediaTypeFetch_Click(object sender, EventArgs e)
        {
            TracksBy.Text = "MediaType";
            //the ddl does not have a prompt line, therefore
            //    to selection test is requried
            //remember: SelectedValue returns contents as a string
            SearchArg.Text = MediaTypeDDL.SelectedValue;

            //to force the listview to rebind (to execute again)
            //NOTE there is NO DataSource assignment as that is
            //     accomplished using the ODS and a DataSourceID parameter
            //     on the ListView control
            TracksSelectionList.DataBind();
        }
Example #25
0
 protected void ArtistFetch_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(ArtistName.Text))
     {
         //message to the user
         MessageUserControl.ShowInfo("Entry Error", "Select an artist name or part of.");
     }
     else
     {
         TracksBy.Text  = "Artist";
         SearchArg.Text = ArtistName.Text;
         TracksSelectionList.DataBind();
     }
 }
Example #26
0
 protected void AlbumFetch_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(AlbumTitle.Text))
     {
         //message to the user
         MessageUserControl.ShowInfo("Entry Error", "Enter an album title or part of.");
     }
     else
     {
         TracksBy.Text  = "Album";
         SearchArg.Text = AlbumTitle.Text;
         TracksSelectionList.DataBind();
     }
 }
 protected void Page_PreRenderComplete(object sender, EventArgs e)
 {
     //PreRenderComplete occurs just after databinding page events
     //load a pointer to point to your DataPager control
     DataPager thePager = TracksSelectionList.FindControl("DataPager1") as DataPager;
     if (thePager != null)
     {
         //this code will check the StartRowIndex to see if it is greater than the
         //total count of the collection
         if (thePager.StartRowIndex > thePager.TotalRowCount)
         {
             thePager.SetPageProperties(0, thePager.MaximumRows, true);
         }
     }
 }
Example #28
0
 protected void AlbumFetch_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(AlbumTitle.Text))
     {
         MessageUserControl.ShowInfo("Select Error", "You must enter an album title or part of");
         TracksBy.Text  = "";
         SearchArg.Text = "";
     }
     else
     {
         TracksBy.Text  = "Album";
         SearchArg.Text = AlbumTitle.Text;
         TracksSelectionList.DataBind();  //force an ODS to re-execute
     }
 }
Example #29
0
 protected void MediaTypeDDL_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (MediaTypeDDL.SelectedIndex == 0)
     {
         MessageUserControl.ShowInfo("Select Error", "You must select a media type");
         TracksBy.Text  = "";
         SearchArg.Text = "";
     }
     else
     {
         TracksBy.Text  = "MediaType";
         SearchArg.Text = MediaTypeDDL.SelectedValue;
         TracksSelectionList.DataBind();  //force an ODS to re-execute
     }
 }
Example #30
0
        protected void GenreFetch_Click(object sender, EventArgs e)
        {
            TracksBy.Text = "Genre";
            //the DDL does not have a prompt line therefore
            //  no selection test required
            //REMEMBER: SelectedValue returns contents as a string
            SearchArg.Text = GenreDDL.SelectedValue;


            //to force the listview to rebind (to execute again)
            //NOTE there is NO DataSource assignment as that is
            //     accomplished using the ODS and a DataSourceID parameter
            //     on the ListView control
            TracksSelectionList.DataBind();
        }