<%@ Page Title="Suppliers" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Suppliers.aspx.cs" Inherits="SMTBETECH_V3.Suppliers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">


<style type="text/css">
   
    .GridPager a, .GridPager span {
        display: block;
        height: 28px;
        width: 24px;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
    }

    .GridPager a {
        background-color: #f5f5f5;
        color: #969696;
        border: 1px solid #969696;
    }

    .GridPager span {
        /*background-color: #A1DCF2;*/
        background-color: steelblue;
        color: whitesmoke;
        border: 1px solid #3AC0F2;
    }
</style>


    
    
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>

    <asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="true" AssociatedUpdatePanelID="UpdatePanel1" >

   <ProgressTemplate>
      Loading...
   </ProgressTemplate>
   
    </asp:UpdateProgress>

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

            <h2 id="title"><%: Title %></h2>

           
            <asp:Panel runat="server" DefaultButton="btnSearch">

            <div class="row" style="width:100%">

                <div class="col-2" style="text-align:left">
                    <asp:Button CssClass="btn btn-primary btn-sm" ID="btnNewSupplier" runat="server"
                        Text="New" OnClick="btnNewSupplier_Click"/>
                </div>
                <div class="col-4">
                    <asp:TextBox CssClass="form-control" placeholder="Search Supplier"  runat="server"
                        ID="txtSearchSupplier" AutoPostBack="false" onFocus="this.select()"/>
                </div>
                <div class="col-6" style="text-align:left">
                    <asp:Button CssClass="btn btn-primary btn-sm" ID="btnSearch" runat="server" 
                        Text="Search" OnClick="btnSearch_Click"/>
                    <asp:Button CssClass="btn btn-primary btn-sm" ID="btnClearSearch" runat="server"
                        Text="Clear" OnClick="btnClearSearch_Click"/>
                </div>

            </div>
            <p></p>
            </asp:Panel>

        <div style="overflow-x:scroll">
            <asp:GridView CssClass="table table-bordered table-striped table-sm"
                ID="GVSuppliers"
                runat="server"
                AutoGenerateColumns="False"
                AllowPaging="True"
                AllowSorting="False"
                OnRowCommand="GVSuppliers_RowCommand" OnPageIndexChanging="GVSuppliers_PageIndexChanging" PageSize="10">
            <HeaderStyle CssClass="table-primary" />
                <Columns>
                    <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" InsertVisible="False" SortExpression="Id"></asp:BoundField>

                    <asp:ButtonField HeaderStyle-Wrap="false" HeaderStyle-Width="300px" ItemStyle-Wrap="false" SortExpression="SupplierName" 
                        CommandName="EditSupplier" DataTextField="SupplierName" HeaderText="Supplier Name" />
            
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" DataField="SupplierAbbrevation" HeaderText="Customer Abbrevation" SortExpression="SupplierAbbrevation"></asp:BoundField>
                    <asp:BoundField DataField="TaxId" HeaderText="Tax Id" SortExpression="TaxId"></asp:BoundField>
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" ItemStyle-Wrap="false"  DataField="Street" HeaderText="Street" SortExpression="Street"></asp:BoundField>
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" ItemStyle-Wrap="false"  DataField="Suburb" HeaderText="Suburb" SortExpression="Suburb"></asp:BoundField>
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" ItemStyle-Wrap="false" DataField="Municipality" HeaderText="Municipality" SortExpression="Municipality"></asp:BoundField>
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" ItemStyle-Wrap="false" DataField="ZipCode" HeaderText="Zip Code" SortExpression="ZipCode"></asp:BoundField>
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" ItemStyle-Wrap="false" DataField="State" HeaderText="State" SortExpression="State"></asp:BoundField>
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" ItemStyle-Wrap="false" DataField="Country" HeaderText="Country" SortExpression="Country"></asp:BoundField>
                    <asp:BoundField HeaderStyle-Wrap="false" HeaderStyle-Width="200px" ItemStyle-Wrap="false" DataField="TermsPayment" HeaderText="Terms of Payment" SortExpression="TermsPayment"></asp:BoundField>
                    <asp:BoundField DataField="Currency" HeaderText="Currency" SortExpression="Currency"></asp:BoundField>
                    <asp:BoundField ItemStyle-Wrap="false" ItemStyle-Width="200px" DataField="CreationDate" HeaderText="Creation Date" SortExpression="CreationDate"></asp:BoundField>
                    <asp:BoundField ItemStyle-Wrap="false" ItemStyle-Width="200px" DataField="ModifiedDate" HeaderText="Modified Date" SortExpression="ModifiedDate"></asp:BoundField>
                </Columns>
                    <PagerStyle CssClass="GridPager" />
        
        </asp:GridView>
    </div>
            <p></p>
            <div>
                Total:
                <asp:Label runat="server" ID="lblCount"></asp:Label>
            </div>
    

        </ContentTemplate>
    </asp:UpdatePanel>
        
    
   


</asp:Content>
