<%@ Page Title="Iorderla Setting" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="Iorderlasetting.aspx.cs" Inherits="SUNWEB.Iorderlasetting" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
       
        <link type="text/css" rel="Stylesheet" href="css/style.css" />
        <link href="css/Gridstyle.css" rel="Stylesheet" type="text/css" />
   
    <style type="text/css">
    @media only screen and (max-width: 600px) {
    table, th, td {
    font-size: 10px;
    font-weight:bold;
        
    }
    
     .Labels{font-size:10px; }
     .alnright { text-align: right; }
       
             }
    
    
    
    </style>
        <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;
            -moz-opacity: 1;
        }
        
        .LoadingDivCss
        {
            margin: 0;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-right: -50%;
            transform: translate(-50%, -50%);
        }
        
        .LoadingImgCss
        {
            height: 100px;
            width: 100px;
        }
    </style>


    <style type="text/css">
         
            .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: 2px;
                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:800px;
            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>

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



</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
  <ContentTemplate>
    
      <table style="width:100%;padding-bottom:2px;">
       <tr>
       <td>
       <h7>IORDERLA TIMING SETTING PAGE </h7> 
       <asp:HiddenField ID="hidvalue" runat="server" />
       </td>

       

       <td align="right" style="padding-bottom:7px;">
           <label for="validationCustom03">
           <asp:Label ID="lblBranchAliasName"  ForeColor="Gray" runat="server" Text="Branch Name"></asp:Label></label>
           <asp:DropDownList ID="cmbBranches" CssClass="custom-select"  Width="210px" 
           runat="server" AutoPostBack="true" 
           onselectedindexchanged="cmbBranches_SelectedIndexChanged"></asp:DropDownList>
                                
       </td>
       </tr>
       
       </table>


           <div class="row">

           <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
           <div class="simple-card">
            <ul class="nav nav-tabs" id="myTab5" role="tablist">
            <li class="nav-item">
            <a class="nav-link active border-left-0" id="home-tab-simple" data-toggle="tab" href="#home-simple" role="tab" aria-controls="home" aria-selected="true"> SCHEDULE BY PRODUCT</a>
            </li>
            <%--<li class="nav-item">
            <a class="nav-link" id="Stock-tab-simple" data-toggle="tab" href="#Stock-simple" role="tab" aria-controls="Stock" aria-selected="false">Time </a>
            </li>
            --%>
           <li class="nav-item">
            <a class="nav-link" id="contact-tab-simple" data-toggle="tab" href="#contact-simple" role="tab" aria-controls="contact" aria-selected="false">BASIC SCHEDULE</a>
            </li>
            
            </ul>
            <div class="tab-content" id="myTabContent5">
            <div class="tab-pane fade show active" id="home-simple" role="tabpanel" aria-labelledby="home-tab-simple">
            <div class="card">
            <div>
                
              <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">
               PRODUCTS SCHEDULE INFORMATION &nbsp;&nbsp;
              <button type="button"  onclick="ShowModalInventoryList()" class="btn btn-warning p-1">
               Search
              </button>

              </h5>
              <table style="padding:10px">
              <tbody>
              <tr>
              <td  style=" width:0.1%"></td>
              <td  style=" width:0.1%"></td>
              
             </tr>
             </tbody>

               <tr>
               <td>
               <asp:Label ID="lblSInvetoryName" runat="server" Text="InventoryName :"></asp:Label> 
               <asp:Label ID="lblRInventoryName" runat="server"></asp:Label>
               </td>
               
               <td>
               <asp:Label ID="lblSInvetoryDesc" runat="server" Text="Invenory Description :"></asp:Label>  
                <asp:Label ID="lblRInventoryDescription" runat="server"></asp:Label>
               </td>
              </tr>
              <tr>
              <td>

              <asp:CheckBox ID="chkNotAvilable" runat="server" OnCheckedChanged="chkNotAvilable_CheckedChanged" AutoPostBack="true" /> <asp:Label ID="lblNotAvilable" runat="server" Text="Not Available(WEB ORDERING)"></asp:Label>&nbsp;&nbsp;&nbsp;
                  <asp:CheckBox ID="chkOutofStock" runat="server"  OnCheckedChanged="chkOutofStock_CheckedChanged" AutoPostBack="true" /> <asp:Label ID="lblOutofStock" runat="server" Text="Not Available(POS/KIOSK)"></asp:Label>  
                  
              <asp:Button ID="btnNotAvailable" runat="server" Text="Not Available" OnClick="btnNotAvailable_Click" CssClass="btn btn-dark"  Visible="false"/>&nbsp;&nbsp;&nbsp;
              <asp:Button ID="btnAvailable" runat="server" Text="Available" OnClick="btnAvailable_Click" CssClass="btn btn-facebook" Visible="false" />
              </td>
             <td>
               <asp:CheckBox ID="chkCommonUpdate" runat="server" OnCheckedChanged="chkCommonUpdate_CheckedChanged" AutoPostBack="true" /> <asp:Label ID="lblCommonUpateText" runat="server" Text="Exclude CommonUpdate"></asp:Label>  
             </td>
            
             </tr>
              <tr>
              <td>
             
             </td>

              </tr>
              
              </table>
              

                <div class="card-body">
                    <div class="table-responsive">
                        <div align="center" style="overflow-x: scroll; width: 100%">
                            <table id="Table1" class="table table-striped table-bordered" style="width: 100%">
                                <tbody>
                                    <caption>
                                        <asp:GridView ID="grdTimingbyid" runat="server" ShowFooter="true" BorderColor="Transparent"
                                            DataKeyNames="id" AutoGenerateColumns="false" Font-Size="14px"
                                            Width="100%" AllowPaging="True" PageSize="20" EmptyDataText="No Records! Select InventoryName To Fetch The Data ">
                                            <HeaderStyle CssClass="dataTable" />
                                            <HeaderStyle BackColor="White" ForeColor="Black" />
                                            <FooterStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                                            <RowStyle CssClass="dataTable" />
                                            <Columns>
                                             
                                           <asp:TemplateField>  
                                           <HeaderTemplate>   
                                           <asp:CheckBox ID="chkAllSelect" runat="server" onclick="CheckAll(this);" Visible="false"/>  
                                           </HeaderTemplate>  
                                           <ItemTemplate>  
                                           <asp:CheckBox ID="chkSelect" runat="server" Checked="true" Visible="false" />  
                                           </ItemTemplate>  
                                           </asp:TemplateField>  

                                         <asp:TemplateField HeaderText="SNo">
                                         <ItemTemplate>
                                         <%#Container.DataItemIndex+1 %>
                                         </ItemTemplate>
                                         </asp:TemplateField>
                                         
                                          <asp:TemplateField HeaderText="Id" Visible="false">
                                          <ItemTemplate>
                                          <asp:Label ID="lblid" runat="server" Text='<%#Eval("id") %>'></asp:Label>
                                          </ItemTemplate>
                                          </asp:TemplateField>

                                          <asp:TemplateField HeaderText="Days" >
                                          <ItemTemplate>
                                          <asp:Label ID="lblDays" runat="server" Text='<%#Eval("Days") %>'></asp:Label>
                                          </ItemTemplate>
                                          </asp:TemplateField>

                                          <asp:TemplateField HeaderText="Days" Visible="false">
                                          <ItemTemplate>
                                          <asp:Label ID="lblDays_Visiblity" runat="server" Text='<%#Eval("Days_Visibility") %>'></asp:Label>
                                          </ItemTemplate>
                                          </asp:TemplateField>

                                          <asp:TemplateField HeaderText="Start Time" >
                                          <ItemTemplate>
                                          <%--<asp:TextBox ID="txtT1_StTm" runat="server" CssClass="textbox" Text='<%#Eval("T1_StTm","{0:HH:mm:ss}") %>'   Width="70px"></asp:TextBox>--%>

                                          <asp:TextBox ID="txtT1_StTm" runat="server" CssClass="textbox" Text='<%#Eval("T1_StTm","{0:HH:mm:ss}") %>'   Width="70px"></asp:TextBox>


                                          
                                          <asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtT1_StTm"
                                          Mask="99:99:99" MessageValidatorTip="true" MaskType="Time" InputDirection="RightToLeft"
                                          ErrorTooltipEnabled="True" />
                                          <asp:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1"
                                          ControlToValidate="txtT1_StTm" 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="End Time">
                                          <ItemTemplate>
                                          <asp:TextBox ID="txtT1_EndTm" runat="server" CssClass="textbox" Text='<%#Eval("T1_EndTm","{0:HH:mm:ss}") %>'   Width="70px"></asp:TextBox>
                                           <asp:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtT1_EndTm"
                                          Mask="99:99:99" MessageValidatorTip="true" MaskType="Time" InputDirection="RightToLeft"
                                          ErrorTooltipEnabled="True" />
                                          <asp:MaskedEditValidator ID="MaskedEditValidator2" runat="server" ControlExtender="MaskedEditExtender2"
                                          ControlToValidate="txtT1_EndTm" 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="Spl.End Time">
                                          <ItemTemplate>
                                          <asp:TextBox ID="txtT2_EndTm" runat="server" CssClass="textbox" Text='<%#Eval("T2_EndTm","{0:HH:mm:ss}") %>'   Width="70px"></asp:TextBox>
                                           <asp:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="txtT2_EndTm"
                                          Mask="99:99:99" MessageValidatorTip="true" MaskType="Time" InputDirection="RightToLeft"
                                          ErrorTooltipEnabled="True" />
                                          <asp:MaskedEditValidator ID="MaskedEditValidator5" runat="server" ControlExtender="MaskedEditExtender5"
                                          ControlToValidate="txtT2_EndTm" 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="Inventory id">
                                          <ItemTemplate>
                                          <asp:Label ID="lblInventoryid" runat="server" Text='<%#Eval("Inventoryid") %>'></asp:Label>
                                          </ItemTemplate>
                                          </asp:TemplateField>

                                          
                                          </Columns>
                                         <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>

                                        <br />
                                         <h7>Note : 1. If EndTime falls within this day .Give the Time value in <span style="color:green"> EndTime</span>   <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.If EndTime falls today's Time and Tomorrow's Time Give the Time Value in <span style="color:green"> Spl.EndTime</span>. </h7>

                                    </caption>
                                </tbody>
                            </table>
                            
                        </div>
                                                 
                    </div>
                    <br />
                    <div class="form-row">
                    <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                    <asp:Button ID="btnGeneratebyinventoryid" runat="server" Text="Apply" ToolTip="To click to update Timing by Inventoryid " onclick="btnGeneratebyinventoryid_Click" CssClass="btn btn-primary" />
                    </div>
                    </div>

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

           </div>
            <div class="tab-pane fade" id="contact-simple" role="tabpanel" aria-labelledby="contact-tab-simple">
            <div class="card">
             <div>
                <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">
                  BASE SCHEDULE 
                </h5>

                <div class="card-body">
                    <div class="table-responsive">
                        <div align="center" style="overflow-x: scroll; width: 100%">
                            <table id="example4" class="table table-striped table-bordered" style="width: 100%">
                                <tbody>
                                    <caption>
                                        <asp:GridView ID="grdTiming" runat="server" ShowFooter="true" BorderColor="Transparent"
                                            DataKeyNames="id" AutoGenerateColumns="false" Font-Size="14px"
                                            Width="100%" AllowPaging="True" PageSize="20" EmptyDataText="No Record  ! ">
                                            <HeaderStyle CssClass="dataTable" />
                                            <HeaderStyle BackColor="White" ForeColor="Black" />
                                            <FooterStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                                            <RowStyle CssClass="dataTable" />
                                            <Columns>
                                             
                                           <asp:TemplateField>  
                                           <HeaderTemplate>   
                                           <asp:CheckBox ID="chkAllSelect" runat="server" onclick="CheckAll(this);" Visible="false" />  
                                           </HeaderTemplate>  
                                           <ItemTemplate>  
                                           <asp:CheckBox ID="chkSelect" runat="server" Checked="true" Visible="false"/>  
                                           </ItemTemplate>  
                                           </asp:TemplateField>  

                                         <asp:TemplateField HeaderText="SNo">
                                         <ItemTemplate>
                                         <%#Container.DataItemIndex+1 %>
                                         </ItemTemplate>
                                         </asp:TemplateField>
                                         
                                          <asp:TemplateField HeaderText="Id" Visible="false">
                                          <ItemTemplate>
                                          <asp:Label ID="lblid" runat="server" Text='<%#Eval("id") %>'></asp:Label>
                                          </ItemTemplate>
                                          </asp:TemplateField>

                                          <asp:TemplateField HeaderText="Days" >
                                          <ItemTemplate>
                                          <asp:Label ID="lblDays" runat="server" Text='<%#Eval("Days") %>'></asp:Label>
                                          </ItemTemplate>
                                          </asp:TemplateField>

                                          <asp:TemplateField HeaderText="Days" Visible="false">
                                          <ItemTemplate>
                                          <asp:Label ID="lblDays_Visiblity" runat="server" Text='<%#Eval("Days_Visibility") %>'></asp:Label>
                                          </ItemTemplate>
                                          </asp:TemplateField>

                                          <asp:TemplateField HeaderText="Start Time" >
                                          <ItemTemplate>
                                          <asp:TextBox ID="txtT1_StTm" runat="server" CssClass="textbox" Text='<%#Eval("T1_StTm","{0:HH:mm:ss}") %>'   Width="70px"></asp:TextBox>


                                          <asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtT1_StTm"
                                          Mask="99:99:99" MessageValidatorTip="true" MaskType="Time" InputDirection="RightToLeft"
                                          ErrorTooltipEnabled="True" />
                                          <asp:MaskedEditValidator ID="MaskedEditValidator3" runat="server" ControlExtender="MaskedEditExtender3"
                                          ControlToValidate="txtT1_StTm" 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="End Time">
                                          <ItemTemplate>
                                          <asp:TextBox ID="txtT1_EndTm" runat="server" CssClass="textbox" Text='<%#Eval("T1_EndTm","{0:HH:mm:ss}") %>'   Width="70px"></asp:TextBox>

                                           <asp:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="txtT1_EndTm"
                                          Mask="99:99:99" MessageValidatorTip="true" MaskType="Time" InputDirection="RightToLeft"
                                          ErrorTooltipEnabled="True" />
                                          <asp:MaskedEditValidator ID="MaskedEditValidator4" runat="server" ControlExtender="MaskedEditExtender4"
                                          ControlToValidate="txtT1_EndTm" 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="Spl.End Time">
                                          <ItemTemplate>
                                          <asp:TextBox ID="txtT2_EndTm" runat="server" CssClass="textbox" Text='<%#Eval("T2_EndTm","{0:HH:mm:ss}") %>'   Width="70px"></asp:TextBox>

                                          <asp:MaskedEditExtender ID="MaskedEditExtender6" runat="server" TargetControlID="txtT2_EndTm"
                                          Mask="99:99:99" MessageValidatorTip="true" MaskType="Time" InputDirection="RightToLeft"
                                          ErrorTooltipEnabled="True" />
                                          <asp:MaskedEditValidator ID="MaskedEditValidator6" runat="server" ControlExtender="MaskedEditExtender6"
                                          ControlToValidate="txtT2_EndTm" 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>
                                          
                                          </Columns>
                                         <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>
                                         <br />
                                         <h7>Note : 1. If EndTime falls within this day .Give the Time value in <span style="color:green"> EndTime</span>   <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.If EndTime falls today's Time and Tomorrow's Time Give the Time Value in <span style="color:green"> Spl.EndTime</span>. </h7>

                                    </caption>
                                </tbody>
                            </table>
                            
                        </div>
                                                 
                    </div>
             </div>
                
            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
            <%--<asp:Button ID="btnUpdate" runat="server" Text="Update BaseTime" onclick="btnUpdate_Click" CssClass="btn btn-primary" />--%>
            <asp:Button ID="btnGenerateIorderlaTiming" runat="server" Text="Apply" onclick="btnGenerateIorderlaTiming_Click" CssClass="btn btn-primary" />
            
            </div>
            

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

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


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


             <div class="card">
                        <h7 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></h7>
                        <div class="card-body">
                            <div class="row">
                                <div class="column">
                                 <label for="validationCustom03">
                                   
                                   Search Type
                                  </label>
                                    <asp:DropDownList ID="cmbSearch" CssClass="form-select w-25" OnSelectedIndexChanged="cmbSearch_SelectedIndexChanged" Height="35px" 
                                        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"></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:DropDownList>   

                                 </div>

                                 <div class="column">
                                <label for="validationCustom03">
                                 Enter Description
                                 </label>
                                 <asp:TextBox ID="txtSearchVal" class="form-control w-25" runat="server" OnTextChanged="txtSearchVal_TextChanged"></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="height: 650px;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="Panel8" runat="server" BackColor="white" Height="430px" ScrollBars="Auto"
                                                Width="1600px">
                                                <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="1550px" AllowPaging="true" PageSize="15000000" OnRowCommand="grdInventoryView_RowCommand"
                                                    BackColor="White" AllowSorting="false" BorderColor="#CCCCCC" Height="430px"
                                                    BorderStyle="None" BorderWidth="1px" CellPadding="3" OnSelectedIndexChanged="OnSelectedIndexChanged">
                                                    <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>
                                                            <ItemTemplate>
                                                                <%--<asp:ImageButton ID="imgbtn1" ImageUrl="~/IMG/edit.png" Width="30px" Height="25px"  runat="server" CommandName="Select" CommandArgument="<%# Container.DataItemIndex %>" />--%>
                                                                <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="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="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="OnHand"  HeaderStyle-HorizontalAlign="Center"  ItemStyle-HorizontalAlign="Center" 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"  Width="80px"  ></asp:TextBox>
                                                                </ItemTemplate>
                                                              </asp:TemplateField>
                                                        --%>
                                                        <asp:ButtonField Text="Select" CommandName="Select" ItemStyle-Width="150" Visible="false" />
                                                    </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>
                                                <br />
                                                <%--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>








             

     </ContentTemplate>
     </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>

      
 
 <br /><br /><br /><br /><br /><br />
 <br /><br /><br /><br /><br /><br />


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