<%@ Page Title="Inventory View " Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="InventoryView.aspx.cs" Inherits="SUNWEB.InventoryView" %>
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="css/style.css" />
    
    <script type="text/javascript" language="javascript">
    function AllowOnlyNumeric() {
        // Get the ASCII value of the key that the user entered
        var key = window.event.keyCode;

        // Verify if the key entered was a numeric character (0-9) or a decimal (.)
        if ((key > 47 && key < 58) || key == 46)
        // If it was, then allow the entry to continue
            return;

        else
        // If it was not, then dispose the key and continue with entry
            window.event.returnValue = null;
            alert("Number Only Allowed")
        }



        function isNumberKey(evt, obj) {

            var charCode = (evt.which) ? evt.which : event.keyCode
            var value = obj.value;
            var dotcontains = value.indexOf(".") != -1;
            if (dotcontains)
                if (charCode == 46) return false;
            if (charCode == 46) return true;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }

</script>
    <style type="text/css">
        /*Popup Control*/.popupControl
        {
            background-color: White;
            position: absolute;
            visibility: hidden;
        }
        .closeLabel
        {
            background-color: #666666;
            color: #FFFFFF;
            text-align: center;
            font-weight: bold;
            text-decoration: none;
            border: outset thin #FFFFFF;
            padding: 5px;
            cursor: pointer;
        }
      </style>
    <script type="text/javascript" language="javascript">
     function ClosePopup() {
         var pce = $find("MPEInvAdjustView");
         pce.hidePopup();
     }
     function mouseover() {
         var pce = $find("PopupControlExtender2");
         pce.showPopup();
     }
     function pageLoad() {
         var pce = $find("PopupControlExtender2");
         pce.add_hidden(afterHidden);
         pce.add_shown(afterShown);
     }
     function afterHidden() {
         $get("Lable1").innerText = "Hidden";
     }
     function afterShown() {
         $get("Lable1").innerText = "Shown";
     }
    </script>
    <script type="text/javascript">
     // for check all checkbox  
     function CheckAll(Checkbox) {
         var GridVwHeaderCheckbox = document.getElementById("<%=grdCopyTax.ClientID %>");
         for (i = 1; i < GridVwHeaderCheckbox.rows.length; i++) {
             GridVwHeaderCheckbox.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = Checkbox.checked;
         }
     }  
    </script>  

<script language="javascript" type="text/javascript">
  function show()
  {
   document.write("<head></head>");
  }
</script>

    <script type="text/javascript">
        // for check all checkbox  
        function CheckAll(Checkbox) {
            var GridVwHeaderCheckbox = document.getElementById("<%=grdInventoryView.ClientID %>");
            for (i = 1; i < GridVwHeaderCheckbox.rows.length; i++) {
                GridVwHeaderCheckbox.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = Checkbox.checked;
            }
        }  
    </script>  
    <style type="text/css">
        body
        {
            font-family: Arial;
            font-size: 10pt;
        }
        .modalBackground
        {
            background-color:#F7F7F7;
            filter: alpha(opacity=90);
            opacity: 0.8;
        }   
        .modalPopup
        {
            background-color:white;
            border: 3px solid #ccc;
            padding: 10px;
            width: 720px;
            height:450px; 
        }
        
        
        
        .modalPopup1
        {
            background-color:white;
            border: 3px solid #ccc;
            padding: 10px;
            width: 960px;
            height:620px; 
        }
        .modalPopup2
        {
            background-color:white;
            border: 3px solid #ccc;
            padding: 10px;
            width: 690px;
            height:410px; 
        }
        
         .modalPopup3
        {
            background-color:white;
            border: 3px solid #ccc;
            padding: 10px;
            width: 600px;
            height:390px; 
        }
       
        
        
        .modalPopupsmall
        {
            background-color:white;
            border: 3px solid #ccc;
            padding: 10px;
            width: 550px;
            height:230px; 
        }
        
        
    </style>
    <script type="text/javascript">
    function sync() {
        var n1 = document.getElementById('txtInventoryName');
        var n2 = document.getElementById('txtDescription');
        n2.value = n1.value;
    }
</script>   
     
    <script language="javascript" type="text/javascript">

        function validate() {

            if (document.getElementById("<%=txtBarcode.ClientID %>").value == "") {
                alert("Enter the Barcode");
                document.getElementById("<%=txtBarcode.ClientID %>").focus();
                return false;
            }

            if (document.getElementById("<%=txtInventoryName.ClientID %>").value == "") {
                alert("Enter InventoryName");
                document.getElementById("<%=txtInventoryName.ClientID %>").focus();
                return false;
            }

            if (document.getElementById("<%=txtDescription.ClientID %>").value == "") {
                alert("Enter Description");
                document.getElementById("<%=txtDescription.ClientID %>").focus();
                return false;
            }


            if (document.getElementById("<%=txtPrice1.ClientID %>").value == "") {
                alert("Enter the Price1");
                document.getElementById("<%=txtPrice1.ClientID %>").focus();
                return false;
            }



            if (document.getElementById("<%=txtEffectiveDt.ClientID %>").value == "") {
                alert("Enter  Effective Date");
                document.getElementById("<%=txtEffectiveDt.ClientID %>").focus();
                return false;
            }

            
        }

        function Categoryvalidate() {

            if (document.getElementById("<%=txtCategoryName.ClientID %>").value == "") {
                alert("Enter the CategoryName");
                document.getElementById("<%=txtCategoryName.ClientID %>").focus();
                return false;
            }

            if (document.getElementById("<%=txtCategoryDescription.ClientID %>").value == "") {
                alert("Enter the Description");
                document.getElementById("<%=txtCategoryDescription.ClientID %>").focus();
                return false;
            }


        }

        function Barcodevalidate() {

            if (document.getElementById("<%=txtBarcodesearch.ClientID %>").value == "") {
                alert("Enter the Barcode");
                document.getElementById("<%=txtBarcodesearch.ClientID %>").focus();
                return false;
            }

        }
        function Groupvalidate1() {

            if (document.getElementById("<%=txtGroupName.ClientID %>").value == "") {
                alert("Enter the Group1");
                document.getElementById("<%=txtGroupName.ClientID %>").focus();
                return false;
            }
        }


        function Groupvalidate2() {

            if (document.getElementById("<%=txtGroupName1.ClientID %>").value == "") {
                alert("Enter the Group2");
                document.getElementById("<%=txtGroupName1.ClientID %>").focus();
                return false;
            }

        }
        function Groupvalidate3() {

            if (document.getElementById("<%=txtGroupName3.ClientID %>").value == "") {
                alert("Enter the Group3");
                document.getElementById("<%=txtGroupName3.ClientID %>").focus();
                return false;
            }

        }

        function Groupvalidate4() {
            if (document.getElementById("<%=txtGroupName4.ClientID %>").value == "") {
                alert("Enter the Group4");
                document.getElementById("<%=txtGroupName4.ClientID %>").focus();
                return false;
            }

        }
        function Groupvalidate5() {
            if (document.getElementById("<%=txtGroupName5.ClientID %>").value == "") {
                alert("Enter the Group5");
                document.getElementById("<%=txtGroupName5.ClientID %>").focus();
                return false;
            }


        }
   </script>
       
   </asp:Content>
   <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
       <div class="container-fluid  dashboard-content">
             <div class="row">
                          <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                           <div class="card">
                           <div class="card-header">
                           <h5 class="mb-0">
                           <p>
                              
                       
                            
                          
                           <%--<asp:Button ID="btnAdjustStockView" runat="server" Text="AdjustStockView" CssClass="btn btn-primary" AutoPostBack="true" onclick="btnAdjustStockView_Click" />--%>
                        
                           <div style="width:45px">
                           <table> 
                          <tr>
                          <td>
                             <asp:ImageButton ID="btnInventoryCreation"  runat="server" ToolTip="Add Inventory " PostBackUrl="~/InventoryMaster.aspx"  ImageUrl="~/IMG/Plus/Plus1.png" Width="65px" Height="45px" />
                             <asp:ImageButton ID="btnNewInventory" runat="server" ToolTip="Add Inventory " PostBackUrl="~/InventoryMaster.aspx"  ImageUrl="~/IMG/Plus/Plus1.png" Width="65px" Height="45px" />
                          </td>
                          <td>
                               InventoryID <asp:TextBox ID="txtInventoryid" runat="server"  Width="65px"
                                   ontextchanged="txtInventoryid_TextChanged" AutoPostBack="true"></asp:TextBox>

                          </td>
                          <td>
                                Inventory Name 
                           <asp:TextBox ID="txtInventoryNameSearch" runat="server" AutoPostBack="true" 
                            ontextchanged="txtInventoryNameSearch_TextChanged"></asp:TextBox>
                       
                          </td>
                             <td>
                                 &nbsp;&nbsp;&nbsp;  Barcode &nbsp;&nbsp;&nbsp; <asp:TextBox ID="txtBarcodesearch" runat="server"></asp:TextBox>     
                          
                                
                                </td>
                                <td>
                                 <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="btn btn-primary" OnClientClick="return Barcodevalidate()" onclick="btnSearch_Click" />
                                </td>
                                <td>
                                 <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btn btn-primary" AutoPostBack="true" onclick="btnSave_Click" />
                                </td>
                                <td>
                                   <asp:Button ID="btnAdjustStock" runat="server" Text="View Adjustments" CssClass="btn btn-primary" AutoPostBack="true" onclick="btnAdjustStock_Click" />
                                </td>



                           <td>
                           <div style="margin-left:750px;">
                                   
                              <%-- <asp:Button ID="btnExcel" runat="server" Text="Excel"    
                                  ToolTip="To Export the Report Click Here"  CssClass="btn btn-success active" 
                                  onclick="btnExcel_Click"/>--%>
                               </div>
 
                                 </td>
                                </tr>
                                <tr>
                             
                                </tr>

                                </table>
                           </div>
                      
                           

                         </p>  
                        </h5>
                </div>

                  <div class="card-body">
                  <div class="table-responsive">
                  <table id="example4" class="table table-striped table-bordered" style="width:100%">
                                    
                  <asp:GridView ID="grdInventoryView" runat="server" AutoGenerateColumns="False"  EmptyDataRowStyle-CssClass="alert-dark"
                    Font-Size="Small" HeaderStyle-BackColor="RoyalBlue" EmptyDataText="No Such Record Found ! " 
                    DataKeyNames="InventoryID" FooterStyle-BackColor="Green" FooterStyle-ForeColor="white" 
                    Width="900px"  AllowPaging="true" PageSize="17"
                    BackColor="White" AllowSorting="true" OnSorting="OnSorting"
                    BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                                         onpageindexchanging="grdInventoryView_PageIndexChanging">
                    <Columns>
                      
                        <%--<asp:TemplateField HeaderText="SNo">
                        <ItemTemplate>
                        <%#Container.DataItemIndex+1 %>
                        </ItemTemplate>
                        </asp:TemplateField>--%>


                          <asp:TemplateField>  
                           <HeaderTemplate>   
                           <asp:CheckBox ID="chkAllSelect" runat="server" onclick="CheckAll(this);"  />  
                           </HeaderTemplate>  
                           <ItemTemplate>  
                           <asp:CheckBox ID="chkSelect" runat="server" />  
                           </ItemTemplate>  
                          </asp:TemplateField>  

                     <asp:TemplateField HeaderText="InventoryID" SortExpression="InventoryId">
                      <ItemTemplate>
                      <asp:Label ID="lblInventoryID"  runat="server" Text='<%#Eval("InventoryID") %>'></asp:Label>
                      </ItemTemplate>
                       </asp:TemplateField>
            
                 <asp:TemplateField HeaderText="Barcode" ItemStyle-Width="80px" SortExpression="BarCode">
                   <ItemTemplate>
                   <asp:Label ID="lblBarCode" runat="server" Text='<%#Eval("BarCode") %>'></asp:Label>
                   </ItemTemplate>
         
                   </asp:TemplateField>     
      
                   <%--<asp:TemplateField HeaderText="Tot.Amt" ItemStyle-Width="80px">
                   <ItemTemplate>
                   <asp:Label ID="lblRTotamt" runat="server"   Text='<%#Eval("TotalSoldAmt" ,"{0:F2}") %>'></asp:Label>
                   </ItemTemplate>
                     </asp:TemplateField>     
                   --%>
                  <asp:TemplateField HeaderText="Inv.Name" ItemStyle-Width="80px" SortExpression="InventoryName">
                   <ItemTemplate>
                   <asp:Label ID="lblInventoryName" runat="server"  Text='<%#Eval("InventoryName") %>' ></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>     
                   <asp:TemplateField HeaderText="Description" ItemStyle-Width="180px" SortExpression="Description">
                   <ItemTemplate>
                   <asp:Label ID="lblDescription" runat="server"  Text='<%#Eval("Description") %>' ></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>     
                   <asp:TemplateField HeaderText="CategoryName" ItemStyle-Width="80px" SortExpression="CategoryName">
                   <ItemTemplate>
                   <asp:Label ID="lblCategoryName" runat="server"  Text='<%#Eval("CategoryName") %>' ></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>     
                   <asp:TemplateField HeaderText="Price" ItemStyle-Width="80px" SortExpression="Price">
                   <ItemTemplate>
                   <asp:Label ID="lblPrice" runat="server"   Text='<%#Eval("Price" ,"{0:F2}") %>'></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>     
                   <asp:TemplateField HeaderText="Price2" ItemStyle-Width="80px" SortExpression="Price2">
                   <ItemTemplate>
                   <asp:Label ID="lblPrice2" runat="server"   Text='<%#Eval("Price2" ,"{0:F2}") %>'></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField> 
                       
                  <asp:TemplateField HeaderText="Price3" ItemStyle-Width="80px" SortExpression="Price3">
                   <ItemTemplate>
                   <asp:Label ID="lblPrice3" runat="server"   Text='<%#Eval("Price3" ,"{0:F2}") %>'></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>    
                    
                  <asp:TemplateField HeaderText="Price4" ItemStyle-Width="80px" SortExpression="Price4">
                   <ItemTemplate>
                   <asp:Label ID="lblPrice4" runat="server"   Text='<%#Eval("Price4" ,"{0:F2}") %>'></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>   

                   <asp:TemplateField HeaderText="OnHand" ItemStyle-Width="80px" SortExpression="Onhand">
                   <ItemTemplate>
                   <asp:Label ID="lblOnHand" runat="server"  Text='<%#Eval("OnHandICA") %>' ></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>     
                   <asp:TemplateField HeaderText="Adjust">
                   <ItemTemplate>
                                         
                    <%--<asp:TextBox ID="txtAdjust" runat="server" CssClass="textbox"  MaxLength="8"
                    onkeypress="javascript:AllowOnlyNumeric()" Width="80px"></asp:TextBox>--%>

                    <asp:TextBox ID="txtAdjust" runat="server" CssClass="textbox"  MaxLength="8" 
                    Width="80px"  ></asp:TextBox>
                    <%--<asp:Label ID="lblAdjust" runat="server" Text='<%#Eval("AdjustQty") %>'></asp:Label>--%>

                   </ItemTemplate>
                  </asp:TemplateField>


                </Columns>
                <pagerstyle cssclass="gridview">
                </pagerstyle>
                <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White"></HeaderStyle>
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#007DBB" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#00547E" />
                     </asp:GridView>
      
                     </table>
                     </div>
                     </div>
                     </div>
                     </div>
                     </div>

             <%--<Triggers >
        <asp:PostBackTrigger  ControlID="btnUpload"  />
        </Triggers>

        <asp:UpdateProgress ID="UpdateProgress" runat="server" AssociatedUpdatePanelID="updatepanel1">
        <ProgressTemplate>
        <div class="overlay">
        <div style=" z-index: 1000; margin-left: 350px;margin-top:300px;opacity: 1;-moz-opacity: 1;">
        <img alt="" src="IMG/MarriedMarvelousHawaiianmonkseal-small.gif" width="90px" height="75px"/>
        </div>
        </div>
        </ProgressTemplate>

        </asp:UpdateProgress>--%>

             <asp:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panel1" TargetControlID="btnInventoryCreation"
             BackgroundCssClass="modalBackground" DropShadow="true" CancelControlID="btCloset" >
             </asp:ModalPopupExtender>

             <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup1" align="center" Style="display: none">
              <div align="right">
               <asp:Label  ID="btCloset" runat="server" onclick="ClosePopup()" Text="X" ToolTip="Close"
                            CssClass="closeLabel" />
              
            </div>
                            
                            <div style="height:150px;">
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                <br /><br /><br /><br />
                                 <table>
                                           <tr>
                                         <td>
                                             INVENTORY MASTER 
                                             <br /><br />
                                             <asp:Label ID="LblInvIDCaption" runat="server" AutoPostBack="true" 
                                                 text="InventoryID: " forecolor="DarkGoldenrod"  visible="false" Width="100px">
                                             </asp:Label>
                                             <asp:Label ID="lblInventoryID"  forecolor="DarkGoldenrod" visible="false"  runat="server" 
                                                 AutoPostBack="true" Width="100px"> </asp:Label>
  
                                          </td>
                                               <tr>
                                                   <td>
                                                   </td>
                                                   <td>
                                                   </td>
                                                   <td>
                                                   </td>
                                                   <td align="right">
                                                       <%-- &nbsp;&nbsp;&nbsp;<asp:Button ID="btnClose" runat="server" Text="Close" /> --%>
                                                   </td>
                                               </tr>
                                         </tr>
                                         </table>
                                         <br />
                                    <table cellpadding="3">
                                       
                             
                                            <tr >
                                                <td>
                                                    Barcode
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtBarcode" runat="server" placeholder="Barcode" Width="180px" > </asp:TextBox>
                                                    <%--<asp:Button ID="ButtonSB" runat="server" width="50px" CssClass="btn btn-primary" onclick="btnSearchBarcode_Click" Imageurl="IMG/Search-26.png" />--%>
                                                    <asp:ImageButton ID="ButtonSB" runat="server" ImageAlign="right" ImageUrl="IMG/Search-26.png" OnClick="btnSearchBarcode_Click"/>
                                                </td>
                                                
                                                <td>
                                                    Inventory
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtInventoryName" runat="server" AutoPostBack="true" 
                                                        onkeyup="sync()" ontextchanged="txtInventoryName_TextChanged" 
                                                        placeholder="Inventory Name " Width="180px"></asp:TextBox>
                                                </td>
                                                <td>
                                                Class 
                                                </td>
                                                <td>
                                                <asp:DropDownList ID="cmbClass" class="dropdown" runat="server"  Width="180px" Height="33px">
                                                 <asp:ListItem Text="Product" Value="0"></asp:ListItem>
                                                 <asp:ListItem Text="Voucher" Value="1"></asp:ListItem>
                                                 <asp:ListItem Text="ZeroPrice" Value="2"></asp:ListItem>
                                                </asp:DropDownList>

                                                </td>
                                                

                                            </tr>
                                            <tr>
                                             <td colspan="4"> Description&nbsp;&nbsp;<asp:TextBox ID="txtDescription" runat="server"  Width="480px"    placeholder="Description"></asp:TextBox></td>

                                             <td>
                                                Units
                                                </td>
                                                <td>
                                                <asp:DropDownList ID="cmbUnits" class="dropdown" runat="server"  Width="180px" Height="33px">
                                                <asp:ListItem Text="PCS" Value="0"></asp:ListItem>
                                                </asp:DropDownList>
                                            </tr>


                                            <tr style="padding:15px">
                                                <td>
                                                    Price 1
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtPrice1" runat="server"  placeholder="0" 
                                                         Width="180px" onkeypress="return isNumberKey(event,this)"></asp:TextBox>
                                                </td>
                                                <td>
                                                    Price 2
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtPrice2" runat="server" onkeypress="return isNumberKey(event,this)" placeholder="0" 
                                                        Width="180px"></asp:TextBox>
                                                </td>

                                                <td>
                                                    Reorder
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtReorder" runat="server" onkeypress="return isNumberKey(event,this)" placeholder="0" 
                                                        Width="180px"></asp:TextBox>
                                                </td>


                                            </tr>
                                            <tr>
                                              <td>
                                               Price 3
                                              </td>
                                            <td>
                                               <asp:TextBox ID="txtPrice3" runat="server" onkeypress="return isNumberKey(event,this)" placeholder="0" 
                                               Width="180px"></asp:TextBox>
                                                                  
                                            </td>
                                            <td>
                                            
                                            Price 4
                                            </td>
                                            <td>
                                            <asp:TextBox ID="txtPrice4" runat="server" onkeypress="return isNumberKey(event,this)" placeholder="0" 
                                                    Width="180px"></asp:TextBox>
                                            </td>

                                               <td>
                                                Safty
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtSafty" runat="server" onkeypress="return isNumberKey(event,this)" placeholder="0" 
                                                        Width="180px"></asp:TextBox>
                                                </td>



                                            </tr>

                                            <tr>
                                            <td>Category</td>
                                            <td>
                                            <asp:DropDownList ID="cmbCategoryName" Width="180px" Height="33px" class="dropdown"  runat="server" >
                                                </asp:DropDownList>
                                                <asp:ImageButton ID="btnCategoryAdd" runat="server" ImageUrl="~/IMG/Plus/Plus1.png" 
                                                Width="35px" Height="25px" />
                                                </td>
                                          
                                            <td>
                                            Group 1
                                            </td>
                                            <td>
                                             <asp:DropDownList ID="cmbGroup1" Width="180px" Height="33px" class="dropdown"  runat="server" >
                                                </asp:DropDownList>
                                               <asp:ImageButton ID="btnGroup1" runat="server" ImageUrl="~/IMG/Plus/Plus1.png" 
                                                Width="35px" Height="25px" />
                                            </td>

                                            <td>
                                                    Maximum
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtMaximum" runat="server" onkeypress="return isNumberKey(event,this)" placeholder="0" 
                                                        Width="180px"></asp:TextBox>
                                                </td>


                                            </tr>

                                            <tr>
                                            <td>Group 2</td>
                                            <td> 
                                             <asp:DropDownList ID="cmbGroup2" Width="180px" Height="33px" class="dropdown"  runat="server" >
                                                </asp:DropDownList>
                                               <asp:ImageButton ID="btnGroup22" runat="server" ImageUrl="~/IMG/Plus/Plus1.png" 
                                                    Width="35px" Height="25px"  />
                                            
                                            </td>
                                            <td>Group 3 </td>
                                            <td> 
                                            <asp:DropDownList ID="cmbGroup3" Width="180px" Height="33px" class="dropdown"  runat="server" >
                                                </asp:DropDownList>
                                                <asp:ImageButton ID="btnGroup3" runat="server" ImageUrl="~/IMG/Plus/Plus1.png" 
                                                 Width="35px" Height="25px"  />
                                            </td>


                                                <td>
                                                    Stock Code 
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtStockCode" runat="server" onkeypress="return isNumberKey(event,this)" placeholder="0" 
                                                        Width="180px"></asp:TextBox>
                                                </td>



                                       </tr>
                                       <tr>
                                         <td>
                                         Group 4 
                                         </td>
                                         <td>
                                           <asp:DropDownList ID="cmbGroup4" Width="180px" Height="33px" class="dropdown"  runat="server" >
                                                </asp:DropDownList>
                                               <asp:ImageButton ID="btnGroup4" runat="server" ImageUrl="~/IMG/Plus/Plus1.png" 
                                                    Width="35px" Height="25px" />
                                              
                                         </td>
                                         <td>Group 5 </td>
                                         <td>
                                           <asp:DropDownList ID="cmbGroup5" Width="180px" Height="33px" class="dropdown"  runat="server" >
                                              </asp:DropDownList>
                                               <asp:ImageButton ID="btnGroup5" runat="server" ImageUrl="~/IMG/Plus/Plus1.png" 
                                               Width="35px" Height="25px"/>
                                         
                                         </td>
                                       
                                       </tr>
                                       <tr>

                                       <td>EffectiveDT</td>
                                       <td>
                                      <asp:TextBox ID="txtEffectiveDt" runat="server" Width="180px"></asp:TextBox>
                                  <%--  <asp:CalendarExtender ID="calFirstDueDate"   Format="yyyy-MM-dd" runat="server"  TargetControlID="txtEffectiveDt"  PopupPosition="BottomLeft" FirstDayOfWeek="Sunday">
                                       </asp:CalendarExtender>  --%>
                                    
                                     </td>
                                     <td></td>
                                     <td>
                                       <table border="1px;" style="width:180px;padding-bottom:7px; padding-top:5px">
                                       <tr>
                                       <td align="center">
                                       <asp:ImageButton ID="ImgTaxsetting1" Width="40px" Height="35px" ToolTip="Click for Tax Settings" runat="server" ImageUrl="~/IMG/TAX/taxes.png" />
                                      </td>
                                      <td align="center">
                                      <asp:ImageButton ID="ImgInvenPrintsetting" Width="40px" Height="35px" ToolTip="Click for Printer Settings" runat="server" ImageUrl="~/IMG/Printer setting/Psetting.png" />
                                      </td>
          
                                  </table>
                                  <td align="right">
                                  <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
                                   class="btn btn-space btn-secondary" onclick="btnSubmit_Click" OnClientClick="return validate()" />
                                  </td>
                                
                                <td align="left">
                                 <asp:Button ID="btnUpdateInv" runat="server" Text="Update" 
                                  class="btn btn-space btn-secondary" onclick="btnUpdateInv_Click" OnClientClick="return validate()" />
                              </td>
                                </td> 
                                
                                </tr>
                           

                                  
                       </caption>
                      </div>
                     </div>
                     </div>
                           
                  </table>

                           <%--Model Popup Extendor for Tax setting in Inventory  Page  --%>
                            <asp:ModalPopupExtender ID="MPE21" runat="server" PopupControlID="PNL21" TargetControlID="ImgTaxsetting1"
                            CancelControlID="btnClosenew21" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                            <asp:Panel ID="PNL21" runat="server" CssClass="modalPopup" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="UpdatePanel9" runat="server">
                                <ContentTemplate>
                                <div align="right">
                                          <asp:Button ID="btnClosenew21" runat="server" Text="Close" />
                                    </div>
                                    <h3> TAX SETTING  </h3> 
                                    <br />
                                    <table cellpadding="3">
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2InventoryCate" runat="server"/> 1: Inventory Flag ; 0:Category Flag
                                    </td>
                                    </tr>

                                   <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2Always" runat="server"/> Always : 0
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2TaxRate6" runat="server"/> Tax Rate 6
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2TaxRate5" runat="server"/> Tax Rate 5
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2TaxRate4" runat="server"/> Tax Rate 4
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2TaxRate3" runat="server"/> Tax Rate 3
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2scvc" runat="server"/> Scv.C
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chk2GST" runat="server"/> GST
                                    </td>
                                    </tr>
                                    <tr>
                                    
                                    <td>
                                    <asp:Button ID="btnSaveTax2"   runat="server" class="btn btn-space btn-secondary" Text="OK" OnClick="btnSaveTax2_Click" />
                                     <asp:HiddenField ID="hidenInventoryTax" runat="server" />
                                      
                                    </td>
                                    <td>
                                     
                                    </td>
                                    </tr>
                                   </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                               </div>
                          </asp:Panel>

                             <asp:ModalPopupExtender ID="MPEPrintset" runat="server" PopupControlID="PLPInvenSet" TargetControlID="ImgInvenPrintsetting"
                            CancelControlID="btnClse" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                            <asp:Panel ID="PLPInvenSet" runat="server" CssClass="modalPopup2" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="UPanelNew" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClse" runat="server" Text="Close" />
                                    </div>
                                    <h3> PRINTER SETTING  </h3> 
                                    
                                    <table cellpadding="4">
                                    <tr>
                                    <td>
                                     <asp:CheckBox ID="chk2Invoice2" runat="server"/> 1: Inventory Flag ; 0:Category Flag
                                    </td>
                                    <td>
                                   <asp:CheckBox ID="chk2RP10" runat="server"/> Print on Remote Printer 10
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chk2RP19" runat="server"/> Print on Remote Printer 19
                                     
                                    </td>
                                    <td>
                                   <asp:CheckBox ID="chk2RP9" runat="server"/> Print on Remote Printer 9
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                     <asp:CheckBox ID="chk2RP18" runat="server"/> Print on Remote Printer 18
                                    
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chk2RP8" runat="server"/> Print on Remote Printer 8
                                    </td>
                                    </tr>
                                    
                                    <tr>
                                    <td>
                                     <asp:CheckBox ID="chk2RP17" runat="server"/> Print on Remote Printer 17
                                    
                                    </td>
                                    <td>
                                 <asp:CheckBox ID="chk2RP7" runat="server"/> Print on Remote Printer 7
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chk2RP16" runat="server"/> Print on Remote Printer 16
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chk2RP6" runat="server"/> Print on Remote Printer 6
                                    </td>
                                    </tr>

                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chk2RP15" runat="server"/> Print on Remote Printer 15
                                    
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chk2RP5" runat="server"/> Print on Remote Printer 5
                                    </td>
                                    </tr>

                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chk2RP14" runat="server"/> Print on Remote Printer 14
                                    </td>
                                    <td>
                                     <asp:CheckBox ID="chk2RP4" runat="server"/> Print on Remote Printer 4
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                       <asp:CheckBox ID="chk2RP13" runat="server"/> Print on Remote Printer 13
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chk2RP3" runat="server"/> Print on Remote Printer 3
                                    </td>
                                    </tr>

                                    <tr>
                                    <td>
                                   <asp:CheckBox ID="chk2RP12" runat="server"/> Print on Remote Printer 12
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chk2RP2" runat="server"/> Print on Remote Printer 2
                                    </td>
                                    </tr>

                                  <tr>
                                    <td>
                                    <asp:CheckBox ID="chk2RP11" runat="server"/> Print on Remote Printer 11
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chk2RP1" runat="server"/> Print on Remote Printer 1
                                    </td>
                                    </tr>

                                     <tr>
                                     <td></td>
                                    <td align="right">
                                    <asp:Button ID="btnSavePrinter2" OnClick="btnSavePrinter2_Click"   runat="server" class="btn btn-space btn-secondary" Text="OK" />
                                       <asp:HiddenField ID="HideInvenPrinter" runat="server" />

                                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                                    </td>
                                    <td>
                                     
                                    </td>
                                    </tr>
                                    </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                               </div>
                              </asp:Panel>
                   
                           <asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" PopupControlID="Panel3" TargetControlID="btnGroup1"
                          CancelControlID="btnClose1" BackgroundCssClass="modalBackground" DropShadow="true">
                          </asp:ModalPopupExtender>
               
                             <asp:Panel ID="Panel3" runat="server" CssClass="modalPopupsmall" align="center" Style="display: none">
                            <div style="height:150px;">
                                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClose1" runat="server" Text="Close" />
                                    </div>

                                          <h3> Add New Group  </h3> 
                                          <br /><br />
                                       <table>
                                         <div>
                                       
                                         <asp:TextBox ID="txtGroupName" class="form-control" placeholder="Enter Group Name" Width="230px" runat="server"></asp:TextBox><br />
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:Button ID="btnSave1"  OnClick="btnSave1_Click" OnClientClick="return Groupvalidate1()"   runat="server" class="btn btn-space btn-secondary" Text="Save" />
                                       
                                      
                                       </table>
                                       
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                          
                        </asp:Panel>
                            <asp:ModalPopupExtender ID="mp3" runat="server" PopupControlID="Panel4" TargetControlID="btnGroup22"
                              CancelControlID="btnClose2" BackgroundCssClass="modalBackground" DropShadow="true">
                              </asp:ModalPopupExtender>
                             <asp:Panel ID="Panel4" runat="server" CssClass="modalPopupsmall" align="center" Style="display: none">
                             <div style="height:150px;">
                               <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClose2" runat="server" Text="Close" />
                                    </div>

                                          <h3> Add New Group  </h3> 
                                          <br /><br />
                                       <table>
                                           
                                       <asp:TextBox ID="txtGroupName1" class="form-control" placeholder="Enter Group Name" Width="230px" runat="server"></asp:TextBox><br /> 
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          
                                       <asp:Button ID="btnSave2" OnClick="btnSave2_Click" OnClientClick="return Groupvalidate2()" runat="server" class="btn btn-space btn-secondary" Text="Save" />
                                       
                                      </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                             </div>
                         </asp:Panel>
                              
                            <asp:ModalPopupExtender ID="ModalPopupExtender3" runat="server" PopupControlID="Panel5" TargetControlID="btnGroup3"
                            CancelControlID="btnClose3" BackgroundCssClass="modalBackground" DropShadow="true">
                            </asp:ModalPopupExtender>
                            <asp:Panel ID="Panel5" runat="server" CssClass="modalPopupsmall" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClose3" runat="server" Text="Close" />
                                    </div>
                                    <h3> Add New Group  </h3> 
                                    <br /><br />
                                    <table>
                                          <div>
                                      <asp:TextBox ID="txtGroupName3" class="form-control" Width="230px" runat="server"></asp:TextBox> <br />
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                       <asp:Button ID="btnSave3" OnClick="btnSave3_Click" OnClientClick="return Groupvalidate3()" runat="server" class="btn btn-space btn-secondary" Text="Save" />
                                 
                                       </div>
                                      </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                                     </div>
                         </asp:Panel>

                            <asp:ModalPopupExtender ID="ModalPopupExtender4" runat="server" PopupControlID="Panel6" TargetControlID="btnGroup4"
                            CancelControlID="btnClose4" BackgroundCssClass="modalBackground" DropShadow="true">
                        </asp:ModalPopupExtender>
                            <asp:Panel ID="Panel6" runat="server" CssClass="modalPopupsmall" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="UpdatePanel6" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClose4" runat="server" Text="Close"/>
                                    </div>
                                    <h3> Add New Group  </h3> 
                                    <br /><br />
                                    <table>
     
                                       <asp:TextBox ID="txtGroupName4" class="form-control" Width="230px" runat="server"></asp:TextBox> <br />
                                           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:Button ID="btnSave4" OnClick="btnSave4_Click" OnClientClick="return Groupvalidate4()" runat="server" class="btn btn-space btn-secondary" Text="Save" />

                                      </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                                     </div>
                         </asp:Panel>

                            <asp:ModalPopupExtender ID="ModalPopupExtender5" runat="server" PopupControlID="Panel7" TargetControlID="btnGroup5"
                            CancelControlID="btnClose5" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                            <asp:Panel ID="Panel7" runat="server" CssClass="modalPopupsmall" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClose5" runat="server" Text="Close" />
                                    </div>
                                    <h3> Add New Group  </h3> 
                                    <br /><br />
                                    <table>
                                      <div>
                                       <asp:TextBox ID="txtGroupName5" class="form-control" Width="230px" runat="server"></asp:TextBox><br /> 
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                         <asp:Button ID="btnSave5" OnClick="btnSave5_Click" OnClientClick="return Groupvalidate5()"   runat="server" class="btn btn-space btn-secondary" Text="Save" />
                                      </div>
                                      </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                               </div>
                          </asp:Panel>
                           <%--Newly Added : 06-07-19 --%>
                          <asp:ConfirmButtonExtender ID="cbeConfirmName" TargetControlID="btnCategoryAdd" runat="server"
                             DisplayModalPopupID="ModalPopupExtender1" />

                          <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel2" TargetControlID="btnCategoryAdd"
                            CancelControlID="btnClose11" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                          <asp:Panel ID="Panel2" runat="server" CssClass="modalPopup" align="center" Style="display: none">

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

                            <div style="height:120px;">
                             <div align="right">
                                    <asp:Button ID="btnClose11" runat="server" Text="Close" />
                                    </div>
                                     <br />
                                     <table>
                                   <tr>
                                       <td align="left">
                                       <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                        <ContentTemplate>
                                   
                                        <h3> ADD NEW CATEGORY  </h3>
                                        <br /><br /><br />
                                        <table align="center">
                                             <tr>
                                               <td>
                                         CategoryNo <asp:TextBox ID="txtCategoryNos" runat="server"  Width="70px" AutoPostBack="true"  OnTextChanged="txtCategoryNos_TextChanged"></asp:TextBox>                                   
                                               </td>
                                             </tr>
                                        </table>
                                        <br />
                                        <table cellpadding="3">
                                         <tr>
                                          <td align="left">
                                          <table cellpadding="3">
                                         <tr>
                                         <td align="right">
                                           Category Name    
                                                                                    
                                         </td>
                                         <td>
                                         <asp:TextBox ID="txtCategoryName"  Width="230px" runat="server"  placeholder="Enter Category Name"></asp:TextBox>      
                                         </td>
                                       </tr>
                                       <tr>
                                       <td align="right">
                                          Description  
                                       </td>
                                       <td>
                                       <asp:TextBox ID="txtCategoryDescription"  Width="230px" runat="server"  placeholder="Description"></asp:TextBox> 
                                       </td>
                                       </tr>
                                       <tr>
                                       <td align="right"> </td>
                                       <td> 
                                       <asp:CheckBox ID="chkActiveStatus" Checked="true" runat="server" />&nbsp;&nbsp;&nbsp;Active
                                       </td>
                                       </tr>
                                       <tr>
                                       <td align="right">
                                     
                                       </td>    
                                       <td align="right">
                                      <table border="1" style="width:230px; height:55px">
                                        <tr>
                                        <td align="center">
                                        <asp:CheckBox ID="chkT" runat="server"  AutoPostBack="true"/>
                                        <asp:ImageButton ID="imgTaxSetting" Width="50px" Height="35px" ToolTip="Click for Tax Settings" runat="server"  ImageUrl="~/IMG/TAX/taxes.png" />
                                         <asp:ImageButton ID="imgCopy2AllTax" Width="30px" Height="25px" ToolTip="Click for Copy to  All" runat="server"  ImageUrl="~/IMG/TAX/Copy1.png" />
                                        </td>
                                        <td align="center">
                                        <asp:CheckBox ID="chkP" runat="server" AutoPostBack="true" />
                                         <asp:ImageButton ID="ImgPrintsetting" Width="50px" Height="35px"  runat="server" ToolTip="Click for  Printer Settings"   ImageUrl="~/IMG/Printer setting/Psetting.png" />
                                         <asp:ImageButton ID="imgCopy2AllPSetting" Width="30px" Height="25px" ToolTip="Click for Copy to All" runat="server"  ImageUrl="~/IMG/TAX/Copy1.png" />
                                        </td>
                                        </tr>
                                      
                                      </table>
                                        

                                       </td>

                                       </tr>
                               
                                       <tr>
                                       <td></td>
                                       <td align="right"> 
                                       <asp:Button ID="btnSaveCategory"   OnClick="btnSaveCategory_Click" OnClientClick="return Categoryvalidate()" runat="server" class="btn btn-space btn-secondary" Text="Save" />
                                       <asp:Button ID="btnUpdate"   OnClick="btnUpdate_Click" OnClientClick="return Categoryvalidate()" runat="server" class="btn btn-space btn-secondary" Text="Update" />
                                       </td>
                                       
                                      
                                       </tr>
                                        </table>
                                        </td>
                                          <td align="right">
                                             <table>
                                    
                                                <tr>
                                                <td>
                                                  <asp:HiddenField ID="hideCategoryTax" runat="server" />
                                                  <asp:HiddenField ID="hidecategoryPrinter" runat="server" />
                                                </td>
                                                
                                                </tr>
                                               </table>                                          
                                          
                                          </td>
                                         </tr>
                                        
                             </table>
                              <%--Category Tax Setting --%>
                            <asp:ModalPopupExtender ID="MPE1" runat="server" PopupControlID="PNL1" TargetControlID="imgTaxSetting"
                            CancelControlID="btnClosenew1" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                            <asp:Panel ID="PNL1" runat="server" CssClass="modalPopup2" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="Upanelnew1" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClosenew1" runat="server" Text="Close"  />
                                    </div>
                                    <h3> TAX SETTING  </h3> 
                                    <br />
                                    <table cellpadding="3">
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chkInvandCate" runat="server"/> 1: Inventory Flag ; 0:Category Flag
                                    </td>
                                    </tr>

                                   <tr>
                                    <td>
                                      <asp:CheckBox ID="chkAlways" runat="server"/> Always : 0
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chkTaxRate6" runat="server"/> Tax Rate 6
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chkTaxRate5" runat="server"/> Tax Rate 5
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chkTax4" runat="server"/> Tax Rate 4
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chkTax3" runat="server"/> Tax Rate 3
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chkScvc" runat="server"/> Scv.C
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                      <asp:CheckBox ID="chkGstt" runat="server"/> GST
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                    <asp:Button ID="btnSaveTax"   runat="server" class="btn btn-space btn-secondary" Text="OK" OnClick="btnSaveTax_Click" />
                               
                                    </td>
                                    <td>
                                     
                                    </td>
                                    </tr>


                                      </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                               </div>
                          </asp:Panel>

                            <asp:ModalPopupExtender ID="MPE2" runat="server" PopupControlID="PNL2" TargetControlID="ImgPrintsetting"
                            CancelControlID="btnClosenew2" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                            <asp:Panel ID="PNL2" runat="server" CssClass="modalPopup2" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="UpdatePanel8" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="btnClosenew2" runat="server" Text="Close" />
                                    </div>
                                    <h3> PRINTER SETTING  </h3> 
                                    
                                    <table cellpadding="4">
                                    <tr>
                                    <td>
                                     <asp:CheckBox ID="chkPrinterInven" runat="server"/> 1: Inventory Flag ; 0:Category Flag
                                    </td>
                                    <td>
                                   <asp:CheckBox ID="chkRP10" runat="server"/> Print on Remote Printer 10
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chkRP19" runat="server"/> Print on Remote Printer 19
                                     
                                    </td>
                                    <td>
                                   <asp:CheckBox ID="chkRP9" runat="server"/> Print on Remote Printer 9
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                     <asp:CheckBox ID="chkRP18" runat="server"/> Print on Remote Printer 18
                                    
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chkRP8" runat="server"/> Print on Remote Printer 8
                                    </td>
                                    </tr>
                                    
                                    <tr>
                                    <td>
                                     <asp:CheckBox ID="chkRP17" runat="server"/> Print on Remote Printer 17
                                    
                                    </td>
                                    <td>
                                 <asp:CheckBox ID="chkRP7" runat="server"/> Print on Remote Printer 7
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chkRP16" runat="server"/> Print on Remote Printer 16
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chkRP6" runat="server"/> Print on Remote Printer 6
                                    </td>
                                    </tr>

                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chkRP15" runat="server"/> Print on Remote Printer 15
                                    
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chkRP5" runat="server"/> Print on Remote Printer 5
                                    </td>
                                    </tr>

                                    <tr>
                                    <td>
                                    <asp:CheckBox ID="chkRP14" runat="server"/> Print on Remote Printer 14
                                    </td>
                                    <td>
                                     <asp:CheckBox ID="chkRP4" runat="server"/> Print on Remote Printer 4
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>
                                       <asp:CheckBox ID="chkRP13" runat="server"/> Print on Remote Printer 13
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chkRP3" runat="server"/> Print on Remote Printer 3
                                    </td>
                                    </tr>

                                    <tr>
                                    <td>
                                   <asp:CheckBox ID="chkRP12" runat="server"/> Print on Remote Printer 12
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chkRP2" runat="server"/> Print on Remote Printer 2
                                    </td>
                                    </tr>

                                  <tr>
                                    <td>
                                    <asp:CheckBox ID="chkRP11" runat="server"/> Print on Remote Printer 11
                                    </td>
                                    <td>
                                    <asp:CheckBox ID="chkRP1" runat="server"/> Print on Remote Printer 1
                                    </td>
                                    </tr>

                                     <tr>
                                     <td></td>
                                    <td align="right">
                                    <asp:Button ID="btnSavePrinter" OnClick="btnSavePrinter_Click"   runat="server" class="btn btn-space btn-secondary" Text="OK" />
                                    </td>
                                    <td>
                                    </td>
                                    </tr>
                                    </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                               </div>
                              </asp:Panel>
                               <%--   Copy to All -Tax Section--%>
                            <asp:ModalPopupExtender ID="MPECopy2AllTax" runat="server" PopupControlID="PNLCopy2AllTax" TargetControlID="imgCopy2AllTax"
                            CancelControlID="CpyTaxClose" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                            <asp:Panel ID="PNLCopy2AllTax" runat="server" CssClass="modalPopup3" align="center" Style="display: none" >
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="UpdatePanel10" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                          <asp:Button ID="CpyTaxClose" runat="server" Text="Close" />
                                    </div>
                                    <h3> Copyto all Category </h3> 
                                    
                                    <table cellpadding="4">
                                      <tr>
                                      
                                      <td>
                                       <asp:DropDownList ID="cmbCopytoallTax" AutoPostBack="true" OnSelectedIndexChanged="cmbCopytoallTax_SelectedIndexChanged" CssClass="custom-select" runat="server" Width="150px" Height="40px">
                                        <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="AllCategory" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="Custom" Value="2"></asp:ListItem>
                                       </asp:DropDownList>
                                      </td>
                                      <td>
                                       <asp:Button ID="btnCopy2Tax" class="btn btn-space btn-secondary" runat="server" Text="Apply" OnClick="btnCopy2Tax_Click"   />
                                      </td>

                                      </tr>
                                     <tr>
                                     <td>
                                        <br /><br />
                                         <asp:Panel ID="Panel9"  runat="server" BackColor="white" Height="200px" 
                                         ScrollBars="Auto" Width="320px">
                                        <asp:GridView ID="grdCopyTax" Width="300px" Font-Size="Small" Height="320px" runat="server" AutoGenerateColumns="False"   
                                          BackColor="White" DataKeyNames="CategoryID" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                                          CellPadding="3">
                                        <Columns>
                                          <asp:TemplateField HeaderText="SNo">
                                            <ItemTemplate>
                                            <%#Container.DataItemIndex + 1%>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                         <asp:TemplateField>  
                                            <HeaderTemplate>   
                                            <asp:CheckBox ID="chkAllSelect" runat="server" onclick="CheckAll(this);" />  
                                            </HeaderTemplate>  
                                            <ItemTemplate>  
                                            <asp:CheckBox ID="chkSelect" runat="server" />  
                                            </ItemTemplate>  
                                        </asp:TemplateField>  
                                          <asp:TemplateField HeaderText="CategoryNo" Visible="false">
                                           <ItemTemplate>
                                           <asp:Label ID="lblCategoryNo1" runat="server"  Text='<%#Eval("CategoryID") %>' ></asp:Label>
                                           </ItemTemplate>
                                           </asp:TemplateField>   

                                           <asp:TemplateField HeaderText="CategoryName" ItemStyle-Width="80px">
                                           <ItemTemplate>
                                           <asp:Label ID="lblCategoryName" runat="server"  Text='<%#Eval("CategoryName") %>' ></asp:Label>
                                           </ItemTemplate>
                                           </asp:TemplateField>   

                                           
                                        </Columns>
                                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                                <RowStyle ForeColor="#000066" />
                                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                                <SortedDescendingHeaderStyle BackColor="#00547E" />
                                     </asp:GridView>
                                     </asp:Panel>
                                   </td>
                                     
                                     </tr>


                                    </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                               </div>
                              </asp:Panel>
                                 <%--   Copy to All -Printer  Section--%>
                                
                            <asp:ModalPopupExtender ID="MPECopy2AllPrinter" runat="server" PopupControlID="PNLCopy2AllPrinter" TargetControlID="imgCopy2AllPSetting"
                            CancelControlID="CpyPrinterClose" BackgroundCssClass="modalBackground" DropShadow="true">
                           </asp:ModalPopupExtender>
                            <asp:Panel ID="PNLCopy2AllPrinter" runat="server" CssClass="modalPopup3" align="center" Style="display: none">
                            <div style="height:150px;">
                               <asp:UpdatePanel ID="PNLCopyPrinter" runat="server">
                                <ContentTemplate>
                                    <div align="right">
                                   <asp:Button ID="CpyPrinterClose" runat="server" Text="Close" />
                                    </div>
                                    <h3> Copyto All Printer </h3> 
                                    
                                   <table cellpadding="4">
                                      <tr>
                                      <td>
                                       <asp:DropDownList ID="cmbCopytoPrinter" AutoPostBack="true" OnSelectedIndexChanged="cmbCopytoPrinter_SelectedIndexChanged" CssClass="custom-select" runat="server" Width="150px" Height="40px">
                                        <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="AllCategory" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="Custom" Value="2"></asp:ListItem>
                                       </asp:DropDownList>
                                      </td>
                                      <td>
                                       <asp:Button ID="btnCopy2Printer" class="btn btn-space btn-secondary" runat="server" Text="Apply" OnClick="btnCopy2Printer_Click"   />
                                      </td>

                                      </tr>

                                      <tr>
                                     <td>
                                        <br /><br />
                                         <asp:Panel ID="Panel10"  runat="server" BackColor="white" Height="200px" 
                                         ScrollBars="Auto" Width="320px">
                                        <asp:GridView ID="grdPrinter" Width="300px" Font-Size="Small" Height="320px" runat="server" AutoGenerateColumns="False" 
                                          BackColor="White" DataKeyNames="CategoryID" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                                          CellPadding="3">
                                        <Columns>
                                          <asp:TemplateField HeaderText="SNo">
                                            <ItemTemplate>
                                            <%#Container.DataItemIndex + 1%>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                         <asp:TemplateField>  
                                            <HeaderTemplate>   
                                            <asp:CheckBox ID="chkAllSelect" runat="server" onclick="CheckAll(this);" />  
                                            </HeaderTemplate>  
                                            <ItemTemplate>  
                                            <asp:CheckBox ID="chkSelect" runat="server" />  
                                            </ItemTemplate>  
                                        </asp:TemplateField>  
                                          <asp:TemplateField HeaderText="CategoryNo" Visible="false">
                                           <ItemTemplate>
                                           <asp:Label ID="lblCategoryNo1" runat="server"  Text='<%#Eval("CategoryID") %>' ></asp:Label>
                                           </ItemTemplate>
                                           </asp:TemplateField>   

                                           <asp:TemplateField HeaderText="CategoryName" ItemStyle-Width="80px">
                                           <ItemTemplate>
                                           <asp:Label ID="lblCategoryName" runat="server"  Text='<%#Eval("CategoryName") %>' ></asp:Label>
                                           </ItemTemplate>
                                           </asp:TemplateField>   

                                         
                                        </Columns>
                                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                                <RowStyle ForeColor="#000066" />
                                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                                <SortedDescendingHeaderStyle BackColor="#00547E" />
                                     </asp:GridView>
                                     </asp:Panel>
                                   </td>
                                     
                                     </tr>

                                    </table>
                                  </ContentTemplate>
                                </asp:UpdatePanel>
                               </div>
                              </asp:Panel>

                      
                       
                           </td>
                                    <td align="right">
                                                    <asp:TextBox ID="txtCateSearch" runat="server" Width="220px"></asp:TextBox>
                                                      &nbsp;&nbsp;
                                                     
                                                    <asp:Button ID="btnCateSearch" runat="server" 
                                                          class="btn btn-space btn-secondary" OnClick="btnCateSearch_Click" 
                                                          Text="Search" />
                                                    <br />
                                                    <br />
                                               
                                                      <asp:Panel ID="Panel8" runat="server" BackColor="white" Height="300px" 
                                                          ScrollBars="Auto" Width="300px">
                                                        
                                                      <asp:GridView ID="grdCategory" runat="server" AutoGenerateColumns="False" 
                                                              BackColor="White"  BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                                                              CellPadding="3" DataKeyNames="CategoryID" Font-Size="Small" Height="270px" 
                                                              onselectedindexchanged="grdCategory_SelectedIndexChanged"  Width="300px">
                                                              <Columns>
                                                                  <asp:TemplateField HeaderText="SNo">
                                                                      <ItemTemplate>
                                                                          <%#Container.DataItemIndex + 1%>
                                                                      </ItemTemplate>
                                                                  </asp:TemplateField>
                                                                  <asp:TemplateField HeaderText="CategoryNo" Visible="false">
                                                                      <ItemTemplate>
                                                                          <asp:Label ID="lblCategoryNo1" runat="server" Text='<%#Eval("CategoryID") %>'></asp:Label>
                                                                      </ItemTemplate>
                                                                  </asp:TemplateField>
                                                                  <asp:TemplateField HeaderText="CategoryName" ItemStyle-Width="80px">
                                                                      <ItemTemplate>
                                                                          <asp:Label ID="lblCategoryName" runat="server" 
                                                                              Text='<%#Eval("CategoryName") %>'></asp:Label>
                                                                      </ItemTemplate>
                                                                  </asp:TemplateField>
                                                                  <asp:ButtonField CommandName="Select" ItemStyle-BackColor="Purple" 
                                                                      ItemStyle-ForeColor="White" Text="View" />
                                                              </Columns>
                                                              <FooterStyle BackColor="White" ForeColor="#000066" />
                                                              <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                                              <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                                              <RowStyle ForeColor="#000066" />
                                                              <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                                              <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                                              <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                                              <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                                              <SortedDescendingHeaderStyle BackColor="#00547E" />
                                                          </asp:GridView>
                                                        
                                                      </asp:Panel>
                                                 
                                                      </td>
                                                        </ContentTemplate>
                                                        </asp:UpdatePanel>

                                    </tr>
                                    </table>
                                    </div>
                                   
                            </ContentTemplate>
                           </asp:UpdatePanel>

                         </asp:Panel> 

                                       
                            <%--Model Popup Extendor for InventoryAdjustView  --%>

                                </tr>
  
                            </table>
          
                        </div>
                  
                    </ContentTemplate>
               </asp:UpdatePanel>
                         
                </div>
                  
             </asp:Panel>
                       
            <asp:ModalPopupExtender ID="MPEInvAdjustView" runat="server" PopupControlID="PaneInvAdjView" TargetControlID="btnAdjustStock"
                CancelControlID="btnCloseInvAdjView"  BackgroundCssClass="modalBackground" DropShadow="true">
                </asp:ModalPopupExtender>
            <asp:Panel ID="PaneInvAdjView" runat="server" CssClass="modalPopup" align="center" Style="display: none">
                <div>

                <div align="right">
                        <asp:Button ID="btnCloseInvAdjView" runat="server" Text="Close" />
                        </div>
                    <asp:UpdatePanel ID="UpdatePanelInvAdjView1" runat="server">
                    <ContentTemplate>
                    
                        <h3> Inventory Adjust View  </h3> 
                        <br />
                        <table >
                        <tr>
                        <td>
                        <asp:Panel ID="Panelnew1"  runat="server" BackColor="white" Height="320px" 
                            ScrollBars="Auto" Width="400px">
                            
                            <%--<div id="Div1" runat="server" style="max-height: 20px; overflow: auto;">--%>
                                <asp:GridView ID="GrdInvAdjView"
                                runat="server" showfooter="false"  BorderColor="Transparent" 
                                DataKeyNames="InventoryID" AutoGenerateColumns="false"
                                Height="50px" Width= "380px" onrowdeleting="GrdInvAdjView_RowDeleting" >
                                  <HeaderStyle CssClass="dataTable" />
                                  <HeaderStyle BackColor = "Black" ForeColor="White" />
                                
                                  <AlternatingRowStyle CssClass="dataTableAlt" />
                                  <RowStyle CssClass="dataTable" />

                                    <Columns>
                                        <asp:TemplateField HeaderText="SNo" HeaderStyle-HorizontalAlign="Left"  ItemStyle-HorizontalAlign="left" ItemStyle-Width="31%">
                                        <ItemTemplate> 
                                        <%--<%#Container.DataItemIndex+1 %>--%>
                                        <asp:Label ID="lblSNo" runat="server" Text='<%#Eval("SNo")%>'></asp:Label>
                                        </ItemTemplate>
                                        </asp:TemplateField>

                                        <%--<asp:BoundField DataField="InventoryID" HeaderText="InvID"  HeaderStyle-HorizontalAlign="Left"  HtmlEncode="False" ItemStyle-HorizontalAlign="left" ItemStyle-Width="31%"  />--%>
                                        <asp:TemplateField HeaderText="InventoryID" HeaderStyle-HorizontalAlign="Left"  ItemStyle-HorizontalAlign="left" ItemStyle-Width="31%" >
                                        <ItemTemplate> <asp:Label ID="lblInvID" runat="server" Text='<%#Eval("InventoryID")%>'></asp:Label></ItemTemplate>
                                        </asp:TemplateField>
                                         
                                        <%--<asp:BoundField DataField="Barcode" HeaderText="Barcode"  HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left" HtmlEncode="False" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="29%" />--%>
                                        <asp:TemplateField HeaderText="Barcode" HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="29%" >
                                        <ItemTemplate> <asp:Label ID="lblBarcode" runat="server" Text='<%#Eval("Barcode")%>'></asp:Label></ItemTemplate>
                                        </asp:TemplateField>

                                        <%--<asp:BoundField DataField="Qty" HeaderText="Qty" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" ItemStyle-Width="42%" />--%>
                                        <asp:TemplateField HeaderText="Qty" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" ItemStyle-Width="42%" >
                                        <ItemTemplate> <asp:Label ID="lblQty" runat="server" Text='<%#Eval("Qty")%>'></asp:Label></ItemTemplate>
                                        </asp:TemplateField>
                                        
                                        
                                        <asp:CommandField ShowDeleteButton="True"  />
                                        

                                    </Columns>
                                </asp:GridView>
                                
                            <%--</div> --%>
                        
                            </asp:Panel>
                        </td>
                        </tr>
                        <tr>
                       <td>
                       <asp:Button ID="btnAdjustStockSubmit" runat="server" Text="Submit" CssClass="btn btn-primary" AutoPostBack="true" onclick="btnAdjustStockSubmit_Click" />
                       </td>
                        </tr>

                      
                        </table>

                    
                    </ContentTemplate>
                    </asp:UpdatePanel>
                 
                       
                 


                </div>
                </asp:Panel>
 

    </div>
    
</asp:Content>
