<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Supplier.aspx.cs" Inherits="HRMS.Supplier" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main-panel">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        Supplier
                          <div class="pull-right">
                            <asp:button text="Save" CssClass="btn btn-info" ID="btn_save"   ValidationGroup="save"
                                runat="server" onclick="btn_save_Click"/>
                            <asp:button text="Back" CssClass="btn btn-info" ID="btn_cancel" runat="server" onclick="btn_cancel_Click"/>
                        </div>
                    </header>

                    <div class="panel-body">
                         <div class="span6">
                                <div id="divmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" ID="lbl_msg" CssClass="msg" runat="server"></asp:label>
                                </div>
                            </div>

                            <div class="span6">
                                <div id="diverrmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" id="lbl_err_msg" CssClass="msg" runat="server"></asp:label>
                                </div>
                            </div>

                        <div class="row">
                             <asp:HiddenField ID="hid_supp" runat="server" />
                                  <label class="control-label col-md-2">Supplier Name</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_supp" runat="server" CssClass="form-control"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="Reqadd" ControlToValidate="txt_supp" ErrorMessage="Supplier name is required." setfocusonerror="true" ValidationGroup="save"></asp:RequiredFieldValidator>
                            </div>


                                  <label class="control-label col-md-2">Tax Country</label>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddl_country" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                </div>
                        </div>



                            <div class="row" style="padding-top:05px">
                                  <label class="control-label col-md-2">Alias</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_alias" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>


                                  <label class="control-label col-md-2">Tax Registration Number</label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_tax_reg_no" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                        </div>


                        
                            <div class="row" style="padding-top:05px">
                                  <label class="control-label col-md-2">Name Pronunciation</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_name_pro" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>


                                  <label class="control-label col-md-2">Taxpayer ID</label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_taxpayer_id" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                        </div>

                         <div class="row" style="padding-top:05px">
                                  <label class="control-label col-md-2">D-U-N-S Number</label>
                            <div class="col-md-3">
                                <asp:TextBox ID="txt_d_num" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>


                                  <label class="control-label col-md-2">Context</label>
                                <div class="col-md-3">
                                    <asp:TextBox ID="txt_context" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                        </div>

                         <div class="pull-right">
                            <asp:button text="Add Detail" CssClass="btn btn-info" ID="btn_dtl" Visible="false"
                                runat="server" onclick="btn_dtl_Click"/>
                        </div>
                        

                              <asp:GridView ID="grd" runat="server" AutoGenerateColumns="False" 
                      cellpadding="0" border="0" class="display" 
                      onrowcommand="grd_RowCommand">
            <Columns>
                <asp:BoundField HeaderText="ID" DataField="VENDOR_SITE_ID" />
                <asp:BoundField HeaderText="Address Line 1" DataField="ADDRESS_LINE1" />
                <asp:BoundField HeaderText="Country" DataField="COUNTRY_NAME" />
                <asp:BoundField HeaderText="State" DataField="STATE_NAME" />
                <asp:BoundField HeaderText="City" DataField="CITY_NAME" />
                <asp:TemplateField ItemStyle-Width="6%" HeaderText="Action">
                    <ItemTemplate>
                        <%--   <%#Container.DataItemIndex+1 %>
                        <asp:CheckBox ID="chk" runat="server" />--%>
                        <asp:LinkButton ID="lnkEdit" runat="server" CommandName="gEdit"><i class="fa fa-pencil" style="font-size:20px !important"></i></asp:LinkButton>
                        &nbsp<asp:LinkButton ID="lnkDelete" Visible="false" runat="server" CommandName="gDelete" OnClientClick="return confirm('Are you sure to delete?')"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>
                     </ItemTemplate>

<ItemStyle Width="6%"></ItemStyle>
                </asp:TemplateField>
            </Columns>
            <%-- Mandatory--%>
            <RowStyle CssClass="rowStyle"/>
           <%-- Mandatory--%>
            <HeaderStyle CssClass="headerStyle" />
           <%-- optional--%>
           <FooterStyle  CssClass="footerStyle"  />
        </asp:GridView>
            <script src="/ThemeScrips/Datatables/media/js/jquery.js" type="text/javascript"></script>
            <script src="/ThemeScrips/Datatables/media/js/jquery.dataTables.min.js" type="text/javascript"></script>
            <script src="/ThemeScrips/Datatables/media/js/jquery.dataTables.js" type="text/javascript"></script>
            <script src="/ThemeScrips/Datatables/media/js/GridviewFix.js" type="text/javascript"></script>
            <script type="text/javascript">
                //without passing class names.
                $("#ContentPlaceHolder1_grd").GridviewFix().dataTable();
                //Passing class names
            </script>


                    </div>
                </section>
            </div>
        </div>
    </div>


    <script src="../../ThemeScrips/jquery.min.js"></script>
    <link href="../../ThemeScrips/select2.min.css"
        rel="stylesheet" />
    <script src="../../ThemeScrips/select2.min.js"></script>
    <%--<script src="/ThemeScrips/select2.min.js"></script>--%>
    <script>
        $('.select2').select2();
    </script>
</asp:Content>
