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

<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">

                <span class="caption-subject font-blue sbold" style="font-size: 150%;">Point of Sale</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_addProduct" data-toggle="tab"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">Add POS</a>
                                </li>
                                <li>
                                    <a href="#tab_productList" onclick="" data-toggle="tab"
                                        style="font-size: 13px; color: #2E4053; font-weight: 700;">POS List </a>
                                </li>

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



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


                                             <%-- <div class="col-md-3">
                                                <label class="lbStyle">POS Name:</label>
                                                <asp:DropDownList ID="txtPosName" runat="server" class="select2 form-control "></asp:DropDownList>
                                            </div>--%>
                                            <div class="col-md-3">
                                                <label class="lbStyle">POS Name:</label>
                                                <asp:TextBox ID="txtPosName" runat="server" title="POS Name" CssClass="myInput" required="required"></asp:TextBox>
                                            </div>
                                            <div class="col-md-3">
                                                <label class="lbStyle">POS Country:</label>
                                                <asp:DropDownList ID="txtPosCountry" AutoPostBack="True" runat="server" class="select2 form-control " 
                                                 required="required" AppendDataBoundItems="true" 
                                                    OnSelectedIndexChanged="txtPosCountry_OnSelectedIndexChanged" onchange="showLoader('City')"></asp:DropDownList>
                                             
                                                 </div>
                                            <div class="col-md-3">
                                                
                                                <label class="lbStyle">POS City:</label>
                                                <asp:DropDownList ID="txtPosCity" runat="server" class="select2 form-control "  required="required"></asp:DropDownList>
                                               
                                            </div>

                                            <%-- <div class="col-md-3">
                                                
                                                <label class="lbStyle">POS Saleman:</label>
                                                <asp:DropDownList ID="txtSalemanID" runat="server" class="select2 form-control "  required="required"></asp:DropDownList>
                                               
                                            </div>
                                               <div class="col-md-3">
                                                
                                                <label class="lbStyle">POS WareHouse:</label>
                                                <asp:DropDownList ID="txtWHID" runat="server" class="select2 form-control "  required="required"></asp:DropDownList>
                                               
                                            </div>--%>
                                             <img src="../assets/global/img/default.gif" style="display: none" id="loaderCity"  />

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

                                            <div class="col-md-6">
                                                <label class="lbStyle"></label>

                                            </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_Click" />
                                            </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_productList">
                                  <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" AllowSorting="False"
                                                AutoGenerateColumns="False" 
                                                DataKeyNames="POS ID"
                                                GridLines="Horizontal"
                                                PageSize="20"
                                                BorderColor="#ECF0F1"
                                                BorderRadius="15px"
                                                AlternatingRowStyle-BackColor="#F2F3F4"
                                                RowStyle-Wrap="false"
                                                HeaderStyle-Wrap="false"
                                                RowStyle-BorderColor="#e8e8ec"
                                                CssClass="gridviewdesign "
                                                RowStyle-CssClass="GV"
                                                OnSelectedIndexChanged="GridView1_OnSelectedIndexChanged"
                                                OnRowCommand="GridView1_OnRowCommand"
                                                OnRowDeleting="GridView1_OnRowDeleting"
                                                OnPageIndexChanging="GridView1_OnPageIndexChanging"
                                               
                                                EmptyDataText="No point of sales to display">
                                                <Columns>
                                                  <%--  <asp:CommandField
                                                        HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody"
                                                        ButtonType="Image"
                                                        HeaderText="Actions"
                                                        DeleteImageUrl="~/assets/global/img/deletee.png"
                                                        SelectImageUrl="~/assets/global/img/edit.png"
                                                        ShowDeleteButton="True"
                                                        ShowHeader="True"
                                                        ShowSelectButton="True" />--%>
                                                   <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="POS ID" HtmlEncode="False" HeaderText="POS ID" ReadOnly="True" SortExpression="POS ID" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Name" HtmlEncode="False" HeaderText="Name" SortExpression="Name" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Country" HtmlEncode="False" HeaderText="Country" SortExpression="Country" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="City" HtmlEncode="False" HeaderText="City" SortExpression="City" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Address" HtmlEncode="False" HeaderText="Address" SortExpression="Address" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" />
                                                    <asp:BoundField DataField="Saleman" HtmlEncode="False" HeaderText="Saleman" SortExpression="Saleman" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" Visible="false" />
                                                     <asp:BoundField DataField="Warehouse" HtmlEncode="False" HeaderText="Warehouse" SortExpression="Warehouse" HeaderStyle-CssClass="gridView1" ItemStyle-CssClass="gridviewBody" Visible="false" />
                                                </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>
  <%--  <script type="text/javascript">
        $(function () {
            $('.search_textbox').each(function (i) {
                $(this).quicksearch("[id*=GridView1] tr:not(:has(th))", {
                    'testQuery': function (query, txt, row) {
                        return $(row).children(":eq(" + i + ")").text().toLowerCase().indexOf(query[0].toLowerCase()) != -1;
                    }
                });
            });
        });
</script>--%>
</asp:Content>

