<%@ Page Title="WebStock Settting" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="WebStockSetting.aspx.cs" Inherits="SUNWEB.WebStockSetting" %>
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" language="javascript">
        function validate() {
            var presetValue = document.getElementById("<%=txtWebpresetvalue.ClientID %>");
       var presetTime = document.getElementById("<%=txtWebPresetTime.ClientID %>");

       // If both are empty
       if (presetValue.value.trim() === "" && presetTime.value.trim() === "") {
           alert("Enter either WebPreset value and WebPreset Time");
           presetValue.focus(); // focus first field
           return false;
       }

       return true;
   }


    </script>


    <script type="text/javascript">

        //Search Condiment
        function CloseModalInventoryList() {
            var modal = document.getElementById("ModaInventoruList");
            modal.style.display = "none";
        }


        function ShowModalInventoryList() {
            var modal = document.getElementById("ModaInventoruList");
            modal.style.display = "block";
        }

        function CloseModal() {
            var modal = document.getElementById("ModaInventoruList");
            modal.style.display = "none";
        }
    </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>
    <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: 1000px;
            height: 850px;
            bottom: 20px;
        }

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

    <style>
        @media only screen and (min-device-width : 320px) and (max-device-width : 428px) {

            .ButtonExcel {
                font-size: 13px;
                border: medium;
                font-family: Circular Std Book;
                border: none;
                color: white;
                background-color: Green;
                text-align: center;
                border-radius: 0px;
            }

            .ButtonSearch {
                font-size: 18px;
                border: medium;
                font-family: Circular Std Book;
                border: none;
                color: white;
                background-color: #1874CD;
                text-align: center;
                border-radius: 0px;
                border: 3px solid black;
                width: 35%;
                height: 55%;
                margin-bottom: 7px;
            }

            .LableTitle {
                font-size: 20px;
                font-weight: 500;
            }

            .modalCss {
                display: none; /* Hidden by default */
                position: fixed; /* Stay in place */
                z-index: 1; /* Sit on top */
                padding-top: 80px; /* Location of the box */
                left: 0;
                top: 0;
                width: 80%; /* Full width */
                height: 80%; /* Full height */
                overflow: auto; /* Enable scroll if needed */
                background-color: rgb(0,0,0); /* Fallback color */
                background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
            }



            .modal-dialogCss {
            }

            /* Modal Content */
            .modal-contentCss {
                background-color: #fefefe;
                margin: auto;
                /*padding: 20px;*/
                /*border: 1px solid #888;*/
                width: 500px;
                height: 6+0px;
                border-radius: 3px;
            }


            /* Create two equal columns that floats next to each other */
            .column {
                float: left;
                width: 40%;
                padding: 1px;
                height: auto; /* Should be removed. Only for demonstration */
            }

            /* Clear floats after the columns */
            .row:after {
                content: "";
                display: table;
                clear: both;
            }
        }

        @media screen and (min-width: 1200px) {

            .ButtonExcel {
                font-size: 14px;
                border: medium;
                font-family: Circular Std Book;
                border: none;
                color: white;
                font-weight: lighter;
                background-color: Green;
                text-align: center;
                border-radius: 2px;
            }

            .ButtonSearch {
                background: #ffc108;
                margin: 0;
                font-family: Circular Std Book;
                font-size: 14px;
                line-height: inherit;
                border-width: thin;
                border-color: #212529;
                border-radius: 5px;
                height:30px;
                color: #212529;
            }

            .LableTitle {
                font-size: 28px;
                font-weight: 500;
            }



            .modalCss {
                display: none; /* Hidden by default */
                position: fixed; /* Stay in place */
                z-index: 1; /* Sit on top */
                padding-top: 80px; /* Location of the box */
                left: 0;
                top: 0;
                width: 100%; /* Full width */
                height: 100%; /* Full height */
                overflow: auto; /* Enable scroll if needed */
                background-color: rgb(0,0,0); /* Fallback color */
                background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
            }



            .modal-dialogCss {
            }

            /* Modal Content */
            .modal-contentCss {
                background-color: #fefefe;
                margin: auto;
                /*padding: 20px;*/
                /*border: 1px solid #888;*/
                width: 1200px;
                height: 850px;
                border-radius: 3px;
            }


            /* Create two equal columns that floats next to each other */
            .column {
                float: left;
                width: 40%;
                padding: 1px;
                height: auto; /* Should be removed. Only for demonstration */
            }

            /* Clear floats after the columns */
            .row:after {
                content: "";
                display: table;
                clear: both;
            }
        }
    </style>


    <style type="text/css">
        .modalCss {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 1; /* Sit on top */
            padding-top: 80px; /* Location of the box */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
        }



        .modal-dialogCss {
        }

        /* Modal Content */
        .modal-contentCss {
            background-color: #fefefe;
            margin: auto;
            /*padding: 20px;*/
            /*border: 1px solid #888;*/
            width: 1200px;
            height: 820px;
            border-radius: 3px;
        }


        /* Create two equal columns that floats next to each other */
        .column {
            float: left;
            width: 40%;
            padding: 2px;
            margin-left: 7px;
            height: auto; /* Should be removed. Only for demonstration */
        }

        /* Clear floats after the columns */
        .row:after {
            content: "";
            display: table;
            clear: both;
        }

        .ButtonSearch {
            background: #ffc108;
            margin: 0;
            font-family: Circular Std Book;
            font-size: 14px;
            line-height: inherit;
            border-width: thin;
            border-color: #212529;
            border-radius: 2px;
            color: #212529;
        }

        /*Model Css for Import And Export  */


        .modalCss1 {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 1; /* Sit on top */
            padding-top: 80px; /* Location of the box */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
        }



        .modal-dialogCss1 {
        }

        /* Modal Content */
        .modal-contentCss1 {
            background-color: #fefefe;
            margin: auto;
            /*padding: 20px;*/
            /*border: 1px solid #888;*/
            width: 800px;
            height: 300px;
            border-radius: 3px;
        }


        /* Create two equal columns that floats next to each other */
        .column1 {
            float: left;
            width: 40%;
            padding: 2px;
            margin-left: 7px;
            height: auto; /* Should be removed. Only for demonstration */
        }

        /* Clear floats after the columns */
        .row:after {
            content: "";
            display: table;
            clear: both;
        }

        .ButtonSearch {
            background: #ffc108;
            margin: 0;
            font-family: Circular Std Book;
            font-size: 14px;
            line-height: inherit;
            border-width: thin;
            border-color: #212529;
            border-radius: 2px;
            color: #212529;
        }

        .Excelcss {
            background: green;
            margin: 0;
            font-family: Circular Std Book;
            font-size: 12px;
            line-height: inherit;
            border-width: thin;
            border-color: #212529;
            border-radius: 2px;
            color: white;
            height: 28px;
            display:inline-block;
        }

        .Heading {
            /*
          font-family: Circular Std Book;
          font-size: 25px;
          color:Black;
          padding:20px;
          padding-bottom:10px;
          */
            font-family: arial;
            font-size: 20px;
            font-weight: 600;
            color: Black;
            padding: 20px;
            padding-bottom: 10px;
        }

        .Para {
            /*
          font-family: Circular Std Book;
          font-size: 12px;
          color:Black;
          padding:20px;
          padding-bottom:0px;
          */
            font-family: arial;
            color: Black;
            padding: 20px;
            padding-bottom: 10px;
            line-height: 1.2;
        }

        .Para5 {
            font-family: arial;
            color: red;
            padding: 20px;
            padding-bottom: 10px;
            line-height: 0.5;
        }

        .Parax {
            font-family: arial;
            color: darkred;
            padding: 20px;
            padding-bottom: 5px;
            line-height: 1.2;
            width: 100%;
        }


        .Para2 {
            /*
          font-family: Circular Std Book;
          font-size: 12px;
          color:Black;
          padding:20px;
          padding-bottom:0px;
          */
            font-family: arial;
            color: Black;
            padding: 20px;
            padding-bottom: 0px;
            line-height: 1.2;
        }


        .ExcelContend {
            font-family: Circular Std Book;
            padding: 15px;
            margin-top: -22px;
        }

        .UploadFileBTN {
            background: red;
            font-family: Circular Std Book;
            font-size: 12px;
            color: white;
            height: 28px;
        }

        .UploadFile {
            padding: 20px;
        }


        .Continue {
            background: #CD3700;
            margin: 0;
            font-family: Circular Std Book;
            font-size: 13px;
            line-height: inherit;
            border-width: thin;
            border-color: #212529;
            border-radius: 5px;
            color: white;
            height: 35px;
            width: 10%;
        }
    </style>





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

    
<asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
  <ContentTemplate>
 
      
      
    <div class="d-flex justify-content-end align-items-center mb-3">
    <!-- Label -->
    <label for="cmbBranches" class="form-label mb-0 me-2">Branch</label>

    <!-- Optional alias label -->
    <asp:Label ID="lblBranchAliasName" runat="server" CssClass="text-muted me-2" />

    <!-- Dropdown with auto width -->
    <asp:DropDownList ID="cmbBranches" runat="server"
        CssClass="form-select "
        AutoPostBack="true"
        Style="width: 250px;"
        OnSelectedIndexChanged="cmbBranches_SelectedIndexChanged" />
    </div>



     <div class="simple-card">
        <div class="row">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
        <div class="card">
        <h5 class="card-header" style="background-color: #4c4c4c; color: White;"> 
        <span style="font-size:14px;color:#F8F9FA">MODIFY WEBSTOCK SETTING </span>&nbsp;&nbsp;
                
        </button>
        </h5> 
        <div class="card-body">
        <div class="form-row">
        <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
        <label for="validationCustom04">
         WebStock PresetValue
        </label>
        <asp:TextBox ID="txtWebpresetvalue" runat="server" class="form-control" onkeypress="return onlyNumbers(event)"></asp:TextBox>
        <br />
        </div>
        <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
         <label for="validationCustom04">
          WebStock PresetTime
        </label>
       <asp:TextBox ID="txtWebPresetTime" runat="server" CssClass="form-control"  Text="23:59:59" ></asp:TextBox>

        <asp:MaskedEditExtender ID="MaskedEditExtender5" runat="server"
            TargetControlID="txtWebPresetTime"
            Mask="99:99:99" 
            MessageValidatorTip="true" 
            MaskType="Time" 
            InputDirection="RightToLeft"
            ErrorTooltipEnabled="True" />

        <asp:MaskedEditValidator ID="MaskedEditValidator5" runat="server"
            ControlExtender="MaskedEditExtender5"
            ControlToValidate="txtWebPresetTime"
            IsValidEmpty="false"
            MaximumValue="23:59:59"
            MinimumValue="00:00:00"
            EmptyValueMessage="Enter Time"
            MaximumValueMessage="23:59:59"
            InvalidValueBlurredMessage="Time is Invalid"
            MinimumValueMessage="Time must be greater than 00:00:00"
            EmptyValueBlurredText="Null Time"
            ToolTip="Enter time between 00:00:00 to 23:59:59">
            </asp:MaskedEditValidator>
            </div>
            </div>
            <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClientClick="return  validate()" OnClick="btnUpdate_Click" CssClass="btn btn-primary" />
            </div>
            </div>
            </div>
            </div>
           </div>





      <div class="row">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="card">
                <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">
                 WEBSTOCK SETTINGS
                <button type="button" onclick="ShowModalInventoryList()"  class="btn btn-warning">
                Search
               </button>

                </h5>
                <div class="card-body">
                    <div class="table-responsive">
                        <table id="example" class="table table-striped table-bordered second" style="width: 100%">
                            <tbody>
                                <caption>
                                    <asp:Panel ID="Panel8" runat="server" BackColor="white" Height="660px" ScrollBars="Auto"
                                        Width="1500px">
                                        <asp:GridView ID="grdWebStockSetting" runat="server" AutoGenerateColumns="False" EmptyDataRowStyle-CssClass="alert-dark"
                                            Font-Size="15px" HeaderStyle-BackColor="RoyalBlue" EmptyDataText="No Record Found ! "
                                            OnRowCommand="grdWebStockSetting_RowCommand" DataKeyNames="WebSTID" FooterStyle-BackColor="Green"
                                            FooterStyle-ForeColor="white" Width="1000px" AllowPaging="true" PageSize="15000000"
                                            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" Height="500px" OnRowUpdating="grdWebStockSetting_RowUpdating"
                                            BorderWidth="1px" CellPadding="3" OnRowDataBound="grdWebStockSetting_RowDataBound">
                                            <Columns>
                                            <asp:TemplateField HeaderText="SNo" ItemStyle-Width="50px">
                                            <ItemTemplate>
                                             <%#Container.DataItemIndex+1 %>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Inventoryid" ItemStyle-Width="180px">
                                            <ItemTemplate>
                                            <asp:Label ID="lblInventoryid" runat="server" Text='<%#Eval("Inventoryid") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                              
                                            <asp:TemplateField HeaderText="Barcode" ItemStyle-Width="180px">
                                            <ItemTemplate>
                                            <asp:Label ID="lblBarcode" runat="server" Text='<%#Eval("Barcode") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                                      
                                            <asp:TemplateField ItemStyle-Width="50px" HeaderText="Preset value">
                                            <ItemTemplate>
                                            <asp:TextBox ID="txtWebPresetValue" Width="80px" runat="server" MaxLength="8" Text='<%#Eval("PreSetValue") %>'></asp:TextBox>
                                            </ItemTemplate>
                                            </asp:TemplateField>

                                           <asp:TemplateField ItemStyle-Width="50px" HeaderText="Preset Time">
                                           <ItemTemplate>
                                           <asp:TextBox ID="txtPresetTime" Enabled="false" Width="80px" runat="server" MaxLength="8" Text='<%#Eval("PresetTime") %>'></asp:TextBox>
                                           <asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtPresetTime"
                                           Mask="99:99:99" MessageValidatorTip="true" MaskType="Time" InputDirection="RightToLeft"
                                           ErrorTooltipEnabled="True" />
                                           <asp:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1"
                                           ControlToValidate="txtPresetTime" IsValidEmpty="false" MaximumValue="23:59:59" MinimumValue="00:00:00"
                                           EmptyValueMessage="Enter Time" MaximumValueMessage="23:59:59" InvalidValueBlurredMessage="Time is Invalid"
                                           MinimumValueMessage="Time must be grater than 00:00:00" EmptyValueBlurredText="Null Time"
                                           ToolTip="Enter time between 00:00:00 to 23:59:59"></asp:MaskedEditValidator>
                                           </ItemTemplate>
                                           </asp:TemplateField>

                                         

                                        <asp:TemplateField HeaderText=" Last Trigger">
                                             <ItemTemplate>
                                                     <asp:Label ID="Date" runat="server"  Text='<%# Eval("TriggerDate","{0:dd-MMM-yyyy hh:mm tt}") %>'></asp:Label>
                                             </ItemTemplate>
                                             <ControlStyle BorderWidth="0px" />
                                             <HeaderStyle BorderWidth="1px" HorizontalAlign="Center" />
                                             <ItemStyle Width="180px" BorderWidth="1px" />
                                         </asp:TemplateField>

                                         <asp:TemplateField ItemStyle-Width="50px" HeaderText="">
                                         <ItemTemplate>
                                         <asp:Button ID="btnSave" runat="server"   Text="Update" CssClass="btn btn-primary" CommandName="Update" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"  />
                                         </ItemTemplate>
                                         </asp:TemplateField>

                                            </Columns>
                                            <PagerStyle CssClass="gridview"></PagerStyle>
                                            <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                                            <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black"></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>
                                        <%--Newly Added Grid--%>
                                        <asp:GridView ID="GridView1" runat="server" AllowPaging="true" Visible="false">
                                        </asp:GridView>
                                    </asp:Panel>
                                </caption>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="modalCss" id="ModaInventoruList">
    <div class="modal-dialogCss">
        <div class="modal-contentCss" style="width:90%;">
            <%--    <div class="modal-header">
            </div>--%>
            <div class="modal-body" style="padding: 0px;">


                <div class="card" >
                    <h8 class="card-header" style="background-color: #4c4c4c; color: White;">SEARCH INVENTORY  
                        <button type="button" class="close" style="color: White; opacity: 1;" onclick="CloseModal()" data-dismiss="modal">
                         &times;</button></h8>
                    <div class="card-body">
                        <div class="row">
                            <div class="column">
                                <label for="validationCustom03">
                                    Search Type
                                </label>
                                <asp:DropDownList ID="cmbSearch"  CssClass="form-select" Width="300px"  OnSelectedIndexChanged="cmbSearch_SelectedIndexChanged"
                                    runat="server" AutoPostBack="true">
                                    <asp:ListItem Value="0" Text="Select"></asp:ListItem>
                                    <asp:ListItem Value="1" Text="Inventory Id"></asp:ListItem>
                                    <asp:ListItem Value="2" Text="Barcode"></asp:ListItem>
                                    <asp:ListItem Value="3" Text="Inventory Name"></asp:ListItem>
                                    <asp:ListItem Value="4" Text="Description"></asp:ListItem>
                                    <asp:ListItem Value="5" Text="Price"></asp:ListItem>
                                    <asp:ListItem Value="6" Text="Category Type"></asp:ListItem>
                                    <asp:ListItem Value="7" Text="Master Barcode"></asp:ListItem>   
                                    <asp:ListItem Value="8" Text="Group1"></asp:ListItem>
                                    <asp:ListItem Value="9" Text="Group2"></asp:ListItem>
                                    <asp:ListItem Value="10" Text="Group3"></asp:ListItem>
                                    <asp:ListItem Value="11" Text="Group4"></asp:ListItem>
                                    <asp:ListItem Value="12" Text="Group5"></asp:ListItem>
                                    <asp:ListItem Value="13" Text="Promo Items"></asp:ListItem>
                                    <asp:ListItem Value="14" Text="TakeAway"></asp:ListItem>
                                    <asp:ListItem Value="15" Text="StockCode"></asp:ListItem>
                                </asp:DropDownList>

                            </div>

                            <div class="column">
                                <label for="validationCustom03">
                                    Enter Description
                                </label>
                                <asp:TextBox ID="txtSearchVal" class="form-control" runat="server" OnTextChanged="txtSearchVal_TextChanged" Width="300px"></asp:TextBox>


                            </div>


                        </div>
                        <div class="row">
                            <div class="column">
                                <asp:CheckBox ID="chkActiveonly" runat="server" Checked="true" />
                                <span>Active Only</span>
                            </div>

                        </div>


                        <div class="row">
                            <div class="column">
                                <asp:Button ID="btnSearch" runat="server" Text="Apply" CssClass="btn btn-primary" OnClick="btnSearch_Click" />
                            </div>
                        </div>
                    </div>


                </div>
                <div>
                    <div class="table-responsive" style="padding: 0px 20px 0px 20px;">
                        <%--<label for="validationCustom03">--%>
                            Search Result:
                        </label>
                     <table id="Table3" class="table table-striped table-bordered second">
                            <tbody>
                                <caption>

                                    <asp:Panel ID="Panel1" runat="server" BackColor="white" Height="480px" ScrollBars="Auto"
                                        Width="1650px">
                                        <asp:GridView ID="grdInventoryView" runat="server" AutoGenerateColumns="False" EmptyDataRowStyle-CssClass="alert-dark"
                                            Font-Size="11px" HeaderStyle-BackColor="RoyalBlue" EmptyDataText="No Record Found ! "
                                            DataKeyNames="InventoryID" FooterStyle-BackColor="Green" FooterStyle-ForeColor="white"
                                            Width="1500px" AllowPaging="true" PageSize="20"
                                            BackColor="White" AllowSorting="false" OnSorting="OnSorting" BorderColor="#CCCCCC"
                                            BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                                            OnSelectedIndexChanged="OnSelectedIndexChanged" OnPageIndexChanging="grdInventoryView_PageIndexChanging">
                                            <Columns>
                                            <%--<asp:TemplateField HeaderText="SNo">
                                            <ItemTemplate>
                                            <%#Container.DataItemIndex+1 %>
                                            </ItemTemplate>
                                            </asp:TemplateField>--%>
                                            
                                            <asp:TemplateField>
                                            <ItemTemplate>
                                            <asp:LinkButton ID="imgbtn1" runat="server" Font-Underline="true" ForeColor="Blue"
                                            CommandName="Select" CommandArgument="<%# Container.DataItemIndex %>" CausesValidation="false">Edit</asp:LinkButton>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="InvenID" SortExpression="InventoryId" ItemStyle-HorizontalAlign="Center">
                                            <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="Inv.Name" ItemStyle-Width="180px" SortExpression="InventoryName"
                                            ItemStyle-HorizontalAlign="Left">
                                            <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="180px" SortExpression="CategoryName">
                                            <ItemTemplate>
                                            <asp:Label ID="lblCategoryName" runat="server" Text='<%#Eval("CategoryName") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Price" SortExpression="Price" HeaderStyle-HorizontalAlign="Right"
                                            ItemStyle-HorizontalAlign="Right">
                                            <ItemTemplate>
                                            <asp:Label ID="lblPrice" runat="server" Text='<%#Eval("Price" ,"{0:F2}") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Price2" SortExpression="Price2" HeaderStyle-HorizontalAlign="Right"
                                            ItemStyle-HorizontalAlign="Right">
                                            <ItemTemplate>
                                            <asp:Label ID="lblPrice2" runat="server" Text='<%#Eval("Price2" ,"{0:F2}") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Price3" SortExpression="Price3" HeaderStyle-HorizontalAlign="Right"
                                            ItemStyle-HorizontalAlign="Right">
                                            <ItemTemplate>
                                            <asp:Label ID="lblPrice3" runat="server" Text='<%#Eval("Price3" ,"{0:F2}") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Price4" SortExpression="Price4" HeaderStyle-HorizontalAlign="Right"
                                            ItemStyle-HorizontalAlign="Right">
                                            <ItemTemplate>
                                            <asp:Label ID="lblPrice4" runat="server" Text='<%#Eval("Price4" ,"{0:F2}") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="StockCode" ItemStyle-Width="180px">
                                            <ItemTemplate>
                                            <asp:Label ID="lblGStockCodes" runat="server" Text='<%#Eval("Stockcode") %>'></asp:Label>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                                                
                                            <asp:ButtonField Text="Select" CommandName="Select" ItemStyle-Width="150" Visible="false" />
                                            </Columns>
                                            <PagerStyle CssClass="gridview5" ></PagerStyle>
                                            <PagerStyle HorizontalAlign="Left" CssClass="GridPager" />
                                            <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                                            <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black"></HeaderStyle>
                                            
                                            <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>
                                        <%--Newly Added Grid--%>
                                        <asp:GridView ID="GridView2" runat="server" AllowPaging="true" Visible="false">
                                        </asp:GridView>
                                    </asp:Panel>

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

          
   <div>
       <h4>&nbsp;<asp:Label ID="lblGreeting" runat="server"></asp:Label></h4>
           <%--<asp:Button ID="btnPdf" runat="server" Text="PDF" 
            ToolTip="To Export  the Report Click Here"  CssClass="btn btn-secondary" 
            onclick="btnPdf_Click"/>--%>   
     </div>
     </ContentTemplate>

      <Triggers>
          <asp:PostBackTrigger ControlID="btnUpdate" />
        </Triggers>

     </asp:UpdatePanel>

     <asp:UpdateProgress ID="UpdateProgress" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
     <ProgressTemplate>
         <div class="overlay">
             <%--  <div style="z-index: 1000; margin-left: 450px; margin-top: 0; opacity: 1; -moz-opacity: 1;">--%>
             <div class="LoadingDivCss">
                 <img alt="" src="IMG/Spinner.gif" class="LoadingImgCss" />
             </div>
         </div>
     </ProgressTemplate>
 </asp:UpdateProgress>




    <style type="text/css">
    .overlay {
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 0;
        height: 100%;
        width: 100%;
        top: 0;
        background-color: White;
        filter: alpha(opacity=60);
        opacity: 0.9;
        _smoz-opacity: 1;
    }

    .LoadingDivCss {
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-right: -50%;
        transform: translate(-50%, -50%);
    }

    .LoadingImgCss {
        height: 100px;
        width: 100px;
    }

    .label5{
          display: inline-block;
          vertical-align: middle;
          margin: 10px 0;
         }
</style>


    <script type="text/javascript" >
        function onlyNumbers(evt) {
            var charCode = evt.which ? evt.which : evt.keyCode;
            // Allow only digits (0-9)
            if (charCode < 48 || charCode > 57) {
                return false;
            }
            return true;
        }
    </script>
   


 <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css?v=1.1" rel="stylesheet" />

    <!-- Bootstrap 5 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />

<!-- Optional Bootstrap Icons -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet" />

</asp:Content>
