<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ArtistsBLL.aspx.cs" Inherits="MyTunes.WebForm3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
    <asp:Label ID="lblDebug" runat="server" 
            Text="Business Logic Layer (Object) Binding Example - Artists with Default Paging and Sorting" 
            Font-Bold="True" ForeColor="Red"></asp:Label>
    </div>
    <div class="pageSelect">
        <table style="width: 100%;">
            <tr>
                <td>
                    <asp:Label ID="lblArtistBLLFilter" runat="server" Text="Artist Quick Search"></asp:Label>
                    <asp:TextBox ID="txtArtistBLLFilter" runat="server" 
                        ontextchanged="txtArtistBLLFilter_TextChanged"></asp:TextBox>
                    <asp:ImageButton
                        ID="btnArtistBLLFilterGo" runat="server" 
                        ImageUrl="~/App_Themes/Default/Images/rarrow.gif" 
                        onclick="btnArtistBLLFilterGo_Click" />
                </td>
                <td align="center">
                    <asp:Label ID="lblBLLPageInfo" runat="server" Font-Italic="True"></asp:Label>
                </td>
                <td align="right">
                    <asp:Label ID="lblPageSelectBLL"
                        runat="server" Text="Jump to:"></asp:Label>
                    <asp:DropDownList ID="lstPageSelectBLL" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="lstPageSelectBLL_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="ArtistBLLGridView" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="artist_id" 
        DataSourceID="MyTunesBLL" PageSize="25" 
        ondatabound="ArtistBLLGridView_DataBound">
        <Columns>
            <asp:BoundField DataField="artist_id" HeaderText="Artist ID" ReadOnly="True" 
                SortExpression="artist_id" />
            <asp:BoundField DataField="artist" HeaderText="Artist" 
                SortExpression="artist" />
        </Columns>
        <PagerSettings Mode="NumericFirstLast" PageButtonCount="25" />
    </asp:GridView>
    <asp:ObjectDataSource ID="MyTunesBLL" runat="server" 
        DeleteMethod="DeleteArtist" InsertMethod="AddArtist" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetArtists" 
        TypeName="MyTunes.Common.BLL.ArtistBLL" UpdateMethod="UpdateArtist">
        <DeleteParameters>
            <asp:Parameter Name="artistID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="artistName" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="artistID" Type="Int32" />
            <asp:Parameter Name="artistName" Type="String" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>
