<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Customer.aspx.cs" Inherits="NikaiDSR.Admin.Customer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function refreshGrid() {
            $find("<%=Grid.ClientID%>").get_masterTableView().rebind();
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="content_holder">
        <div class="bg_shadow">
            <table border="2" cellspacing="0" cellpadding="0" width="100%">
                <tr>
                    <td width="350px" colspan="2">
                        <h1>
                            <asp:Literal ID="Literal1" runat="server" Text="Customer" /></h1>
                    <br /><br />
                    </td>
                    </tr>
                <tr>
                    <td width="95%">
                        <telerik:RadTextBox ID="txtCustomer" runat="server" MaxLength="25" />
                        <asp:Button ID="btnGo" runat="server" Text="Go" OnClick="btnGo_Click" />
                    </td>
                    <td width="5%" >
                        <asp:Button ID="btnAdd" runat="server" Text="Add New Customer" style="float:right"/>
                    </td>                    
                </tr>
        </table>
            </div>
        <table border="2" cellspacing="0" cellpadding="0" width="100%">
                <tr>
                    <td colspan="3">
                        <br />
                        <telerik:RadGrid ID="Grid" runat="server" OnNeedDataSource="Grid_NeedDataSource" OnItemDataBound="Grid_ItemDataBound">
                            <MasterTableView>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="Customer_Id" UniqueName="Customer_Id" Display="false" />
                                    <telerik:GridBoundColumn HeaderText="Customer Code" DataField="Customer_Code" UniqueName="Customer_Code" />
                                    <telerik:GridBoundColumn HeaderText="Customer Name" DataField="Customer_Name" UniqueName="Customer_Name" />
                                    <telerik:GridBoundColumn HeaderText="Customer Type" DataField="Customer_Type_Value" UniqueName="Customer_Type" />
                                    <telerik:GridBoundColumn HeaderText="Customer Group" DataField="Customer_Group_Value" UniqueName="Customer_Group" />
                                    <telerik:GridBoundColumn HeaderText="Business Type" DataField="Business_Type_Value" UniqueName="Business_Type" />
                                    <telerik:GridBoundColumn HeaderText="Location Name" DataField="Location_Name" UniqueName="Location_Name" />
                                    <telerik:GridBoundColumn HeaderText="Region Name" DataField="Region_Name" UniqueName="Region_Name" />
                                    <telerik:GridBoundColumn HeaderText="Country Name" DataField="Country_Name" UniqueName="Country_Name" />
                                    <telerik:GridBoundColumn HeaderText="Updated By" DataField="Updated_By_Value" UniqueName="Updated_By" />
                                    <telerik:GridBoundColumn HeaderText="Date" DataField="Updated_Date" UniqueName="Updated_Date" DataFormatString="{0:dddd MMM dd,yyyy}"/>
                                    <telerik:GridBoundColumn HeaderText="Status" DataField="Customer_Status" UniqueName="Customer_Status" />
                                    <telerik:GridTemplateColumn UniqueName="Edit">
                                        <ItemTemplate>
                                            <asp:Button ID="btnEditCustomer" runat="server" Text="Edit Customer" />
                                            <asp:Button ID="btnViewContacts" runat="server" Text="View Contacts" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </td>
                </tr>
            </table>
    </div>

</asp:Content>
