<%@ Page Title="Saleman" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Saleman.aspx.cs" Inherits="ZFJINV.Definitions.Saleman" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


    <div class="row">

        <div class="col-md-12 mySpace">

            <div class="caption">
                <!-- <i class="icon-settings font-red"></i> -->
                <span class="caption-subject font-blue sbold" style="font-size: 150%;">Sales Man</span>


            </div>


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

                    <div class="portlet-body">

                        <div class="tabbable-line">
                            <ul class="nav nav-tabs ">
                                <li class="active">
                                    <a href="#tab_addSupplier" data-toggle="tab"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">Add Saleman </a>
                                </li>
                                <li>
                                    <a href="#tab_supplierList" data-toggle="tab"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">Salesman List </a>
                                </li>

                            </ul>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab_addSupplier">
                                    <div class="ui segment">
                                        <div class="ui stackable form">

                                            <div class="col-md-3">
                                                <label class="lbStyle">Saleman ID:</label>
                                                <asp:TextBox ID="txtSalesmanID" runat="server" title="Salesman ID" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle">Saleman Name:</label>
                                                <asp:DropDownList ID="txtSalesmanName" runat="server" class="select2 form-control "></asp:DropDownList>
                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle">Father Name:</label>
                                                <asp:TextBox ID="txtFatherName" runat="server" title="Father Name" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">DOB:</label>
                                                <asp:TextBox ID="txtDOB" runat="server" title="Date of Birth" class="mydatepickerclass myInput" required="required"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">CNIC:</label>
                                                <asp:TextBox ID="txtCNIC" runat="server" TextMode="Number" title="National Identity Card No" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Contact No:</label>
                                                <asp:TextBox ID="txtContactNo" runat="server" title="Contact No" TextMode="Number" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle">Joining Date:</label>
                                                <asp:TextBox ID="txtJoiningDate" runat="server" class="mydatepickerclass myInput" title="Joining Date" required="required"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Leaving Date:</label>
                                                <asp:TextBox ID="txtLeavingDate" runat="server" class="mydatepickerclass myInput" title="Leaving Date" required="required"></asp:TextBox>

                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Email:</label>
                                                <asp:TextBox ID="txtEmail" runat="server" title="Email" TextMode="Email" CssClass="myInput" required="required">
							
                                                </asp:TextBox>

                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Supervisor:</label>
                                                <asp:TextBox ID="txtSuperVisor" runat="server" title="Supervisor" CssClass="myInput" required="required"></asp:TextBox>

                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">Address:</label>
                                                <asp:TextBox ID="txtAddress" runat="server" title="Address" CssClass="myInput" required="required"></asp:TextBox>

                                            </div>

                                            <div class="col-md-3">
                                                <label class="lbStyle">Blood Group:</label>
                                                <asp:TextBox ID="txtBloodGroup" runat="server" title="Blood Group" CssClass="myInput" required="required"></asp:TextBox>

                                            </div>




                                            <div class="newButton">
                                                <img src="../assets/global/img/ripples.gif" style="display: none; padding: 0;" id="loaderButton" />
                                                <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_OnClick" CssClass="btn green-meadow" Text="Save" OnClientClick="showLoader('Button')" />
                                                <asp:Button ID="btnCancel" runat="server" formnovalidate="formnovalidate" CssClass="btn red-mint " Text="Cancel" OnClick="btnCancel_OnClick" />
                                            </div>


                                            <div class="row">
                                            </div>

                                        </div>
                                    </div>
                                    <div class="col-md-8 ">
                                        <div class="messagealert" id="alert_container">
                                        </div>
                                    </div>
                                </div>



                                <div class="tab-pane" id="tab_supplierList">
                                    <asp:TextBox ID="search_textbox" runat="server" CssClass="myInput" Font-Size="18px" onkeyup="Search_Gridview(this, 'gvTest')"></asp:TextBox><br />
                                    <div class="rounded-corners">
                                        <div style="width: 100%; overflow: auto;">

                                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                                GridLines="Horizontal" BorderColor="WhiteSmoke" AlternatingRowStyle-BackColor="#F2F3F4" RowStyle-Wrap="false"
                                                HeaderStyle-Wrap="false" RowStyle-BorderColor="#e8e8ec"
                                                PageSize="20"
                                                CssClass="gridviewdesign table-responsive" RowStyle-CssClass="GV"
                                                OnSelectedIndexChanged="GridView1_OnSelectedIndexChanged"
                                                OnRowCommand="GridView1_OnRowCommand"
                                                OnRowDeleting="GridView1_OnRowDeleting"
                                                OnPageIndexChanging="GridView1_OnPageIndexChanging"
                                                EmptyDataText="No salesman to display">
                                                <Columns>
                                                    <asp:CommandField
                                                        HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody"
                                                        ButtonType="Image"
                                                        HeaderText="Actions"
                                                        SelectImageUrl="~/assets/global/img/edit.png"
                                                        ShowHeader="True"
                                                        ShowSelectButton="True" />
                                                    <asp:BoundField DataField="Saleman ID" HeaderText="Saleman ID" SortExpression="Saleman ID" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Father Name" HeaderText="Father Name" SortExpression="Father Name" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="CNIC" HeaderText="CNIC" SortExpression="CNIC" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />

                                                    <asp:BoundField DataField="Contact No." HeaderText="Contact No." SortExpression="Contact No." HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Joining Date" HeaderText="Joining Date" SortExpression="Joining Date" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Leaving Date" HeaderText="Leaving Date" SortExpression="Leaving Date" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Supervisor" HeaderText="Supervisor" SortExpression="Supervisor" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Blood Group" HeaderText="Blood Group" SortExpression="Blood Group" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />

                                                </Columns>
                                                <PagerStyle CssClass="pagination-ys" />
                                            </asp:GridView>
                                        </div>

                                    </div>

                                    <br />



                                </div>



                            </div>

                        </div>

                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="GridView1" />
                </Triggers>
            </asp:UpdatePanel>
        </div>

    </div>
    <script type="text/javascript">
        function Search_Gridview(strKey, strGV) {
            var strGV = '<%= GridView1.ClientID %>';
            var strData = strKey.value.toLowerCase().split(" ");
            var tblData = document.getElementById(strGV);
            var rowData;
            for (var i = 1; i < tblData.rows.length; i++) {
                rowData = tblData.rows[i].innerHTML;
                var styleDisplay = 'me';
                for (var j = 0; j < strData.length; j++) {
                    if (rowData.toLowerCase().indexOf(strData[j].toLowerCase()) != -1)
                        styleDisplay = '';
                    else {
                        styleDisplay = 'none';
                        break;
                    }
                }
                tblData.rows[i].style.display = styleDisplay;
            }
        }
    </script>


</asp:Content>
