<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" CodeBehind="Shipping.aspx.cs" Inherits="PirTickets.Shipping" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
    </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Shipping Maintenance</h2>
    <p>
        <asp:Button ID="btAdd" runat="server" onclick="btAdd_Click" 
            Text="Add New Shipping Method" />
    </p>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    

    <p>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" AutoGenerateEditButton="True" DataKeyNames="ID" 
            DataSourceID="SqlDataShipping" AutoGenerateDeleteButton="True" 
            CellPadding="4" ForeColor="#333333" ShowFooter="True">
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="ShipMethod" HeaderText="ShipMethod" 
                    SortExpression="ShipMethod" >
                <ItemStyle Width="200px" />
                </asp:BoundField>
                <asp:BoundField DataField="ShippingCost" HeaderText="ShippingCost" 
                    SortExpression="ShippingCost" >
                <ItemStyle Width="100px" />
                </asp:BoundField>
            </Columns>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataShipping" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PirTickets %>" 
            SelectCommand="SELECT [ID], [ShipMethod], [ShippingCost],[flag] FROM [shipvia]" UpdateCommand="UPDATE [shipvia] set ShipMethod = @ShipMethod, ShippingCost =@ShippingCost WHERE [ID] =@ID"
            DeleteCommand="delete from shipvia where id = @id">
        </asp:SqlDataSource>
    </p>
          </ContentTemplate>
    </asp:UpdatePanel>
 
</asp:Content>
