<%@ Page Title="Inventory Promotions" Language="C#" MasterPageFile="~/SunMaster.Master"
    AutoEventWireup="true" CodeBehind="InventoryPromotions.aspx.cs" Inherits="SUNWEB.InventoryPromotions" %>

<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    
    <script type="text/javascript">
        $(document).ready(function () {
            $(".chb input:checkbox").on('change', function () {
                $(".chb input:checkbox").not(this).prop('checked', false);
            });
        });

    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".chm input:checkbox").on('change', function () {
                $(".chm input:checkbox").not(this).prop('checked', false);
            });
        });

    </script>




    <style type="text/css">
        .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;
        }
        
        .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
        {
            width: 1200px;
            height: 500px;
            
        }
        
        /* Modal Content */
        .modal-contentCss
        {
            background-color: #fefefe;
            margin: auto;
            width: 1200px;
            height: 500px;
            border-radius: 3px;
        }
    </style>
    <script type="text/javascript">
        function validate() {

            if (document.getElementById("<%=txtProName.ClientID %>").value == "") {
                alert("Enter Promotion Name !");
                document.getElementById("<%=txtProName.ClientID %>").focus();
                return false;
            }

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

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

            if (document.getElementById("<%=txtAmtorPercentage1.ClientID %>").value == "") {
                alert("Enter Promotion Percentage/Amount Value");
                document.getElementById("<%=txtAmtorPercentage1.ClientID %>").focus();
                return false;
            }
        }

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

        function CloseModalPromotionList() {
            var modal = document.getElementById("ModalPromotionList");
            modal.style.display = "none";
        }

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

        function CloseModalItemList() {
            var modal = document.getElementById("ModalItemsList");
            modal.style.display = "none";
        }

        function ClearFields() {
            location.href = 'InventoryPromotions.aspx';
        }
    </script>

      
    <%--Grid Pager CSS :--%>
    <style>
        .GridPager a,
        .GridPager span {
            display: inline-block;
            padding: 0px 9px;
            margin-right: 4px;
            border-radius: 3px;
            border: solid 1px #c0c0c0;
            background: #e9e9e9;
            box-shadow: inset 0px 1px 0px rgba(255,255,255, .8), 0px 1px 3px rgba(0,0,0, .1);
            font-size:10PX;
            font-weight: bold;
            text-decoration: none;
            color: #717171;
            text-shadow: 0px 1px 0px rgba(255,255,255, 1);
        }

        .GridPager a {
            background-color: #f5f5f5;
            color: #969696;
            border: 1px solid #969696;
        }

        .GridPager span {

            background: #616161;
            box-shadow: inset 0px 0px 8px rgba(0,0,0, .5), 0px 1px 0px rgba(255,255,255, .8);
            color: #f0f0f0;
            text-shadow: 0px 0px 3px rgba(0,0,0, .5);
            border: 1px solid #3AC0F2;
        }

    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
        <ContentTemplate>
            <%--<table style="margin-left: 1%; width: 98%;">
                <td style="max-width: 50%; min-width: 50%; text-align: right; padding-bottom: 7px;">
                    <label for="validationCustom03">
                        Branch
                    </label>
                    <label for="validationCustom03">
                        <asp:Label ID="lblBranchAliasName" ForeColor="Gray" runat="server"></asp:Label></label>
                    <asp:DropDownList ID="cmbBranches" CssClass="form-select" runat="server" AutoPostBack="true"
                        OnSelectedIndexChanged="cmbBranches_SelectedIndexChanged" Width="200px" >
                    </asp:DropDownList>
                </td>
            </table>--%>


            <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="row">
                <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div class="card">
                        <h7 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">
                            Promotion &nbsp;&nbsp;
                            <button type="button" class="btn btn-warning" onclick="ShowModalPromotionList()">
                                Search
                            </button>
                            <button type="button" class="btn btn-success" onclick="ClearFields()">
                                Add New
                            </button>
                        </h7>
                        <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">
                                    <caption>
                                        <label for="validationCustom03">
                                            Name
                                        </label>
                                        <asp:TextBox ID="txtProName" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                            Description
                                        </label>
                                        <asp:TextBox ID="txtProDescription" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                            </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;">
                            Promotion Period
                        </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" id="checkboxradio">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:CheckBox ID="chkEver" runat="server" class="chb" Checked="true" OnCheckedChanged="chkEver_CheckedChanged"
                                            AutoPostBack="true" />&nbsp;&nbsp;&nbsp;&nbsp;All Time &nbsp;&nbsp;<asp:CheckBox
                                                ID="chkdatetime" runat="server" class="chb" OnCheckedChanged="chkdatetime_CheckedChanged"
                                                AutoPostBack="true" />&nbsp;&nbsp;&nbsp;&nbsp;Date-Time &nbsp;&nbsp;<asp:CheckBox
                                                    ID="chkTime" runat="server" AutoPostBack="true" class="chb" OnCheckedChanged="chkTime_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;Time
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2" id="Div5">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:CheckBox ID="chkActive" runat="server" Checked="true" />&nbsp;&nbsp;&nbsp;&nbsp;Active
                                    </caption>
                                </div>
                            </div>
                            <div class="form-row" id="Ds1" runat="server">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                            From
                                        </label>
                                        <asp:TextBox ID="txtStartDt" class="form-control" runat="server"></asp:TextBox>
                                        <asp:CalendarExtender ID="calFirstDueDate" Format="yyyy-MM-dd" runat="server" TargetControlID="txtStartDt"
                                            PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <label for="validationCustom03">
                                        To
                                    </label>
                                    <asp:TextBox ID="txtEndDt" class="form-control" runat="server"></asp:TextBox>
                                    <asp:CalendarExtender ID="CalendarExtender1" Format="yyyy-MM-dd" runat="server"   TargetControlID="txtEndDt"
                                        PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>
                                </div>
                            </div>
                            <div class="form-row" id="ds2" runat="server">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                            St&nbsp;&nbsp;&nbsp; Tm
                                        </label>
                                        Hrs&nbsp;
                                        <asp:DropDownList ID="cmbHours" CssClass="custom-select" runat="server" Width="75px">
                                        </asp:DropDownList>
                                        Mins &nbsp;<asp:DropDownList ID="cmbMinutes" CssClass="custom-select" runat="server"
                                            Width="75px">
                                        </asp:DropDownList>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                            End&nbsp;Tm
                                        </label>
                                        Hrs &nbsp;<asp:DropDownList ID="cmbHours1" CssClass="custom-select" runat="server"
                                            Width="75px">
                                        </asp:DropDownList>
                                        Mins &nbsp;<asp:DropDownList ID="CmbMinutes1" CssClass="custom-select" runat="server"
                                            Width="75px">
                                        </asp:DropDownList>
                                    </caption>
                                </div>
                            </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;">
                            Promotion Type:
                        </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" id="Div1">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:CheckBox ID="chkPercentage" runat="server" class="chm" AutoPostBack="true" Checked="true"
                                            OnCheckedChanged="chkPercentage_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;By
                                        Percentage(%)
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2" id="Div2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:CheckBox ID="chkPackageAmount" runat="server" class="chm" AutoPostBack="true"
                                            OnCheckedChanged="chkPackageAmount_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;By
                                        Amount($)
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2" id="Div3">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:CheckBox ID="chkSellingPrice" runat="server" AutoPostBack="true" class="chm"
                                            OnCheckedChanged="chkSellingPrice_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;
                                        By Selling price($)
                                    </caption>
                                </div>
                            </div>
                            <div class="form-row">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                            <asp:Label ID="lblLableValue1" runat="server"></asp:Label>
                                        </label>
                                        <asp:TextBox ID="txtQty1" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                            <asp:Label ID="lblLableValue2" runat="server"></asp:Label>
                                        </label>
                                        <asp:TextBox ID="txtAmtorPercentage1" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                            </div>
                            <div class="form-row">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtQty2" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtAmtorPercentage2" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:CheckBox ID="chkNodiscQty" runat="server" />&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label
                                            ID="lblNoDiscountLable" runat="server"></asp:Label>
                                    </caption>
                                </div>
                            </div>
                            <div class="form-row">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtQty3" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtAmtorPercentage3" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                            </div>
                            <div class="form-row">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtQty4" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtAmtorPercentage4" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                            </div>
                            <div class="form-row">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtQty5" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                        <asp:TextBox ID="txtAmtorPercentage5" class="form-control" runat="server"></asp:TextBox>
                                    </caption>
                                </div>
                            </div>
                            <div class="form-row">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2" id="Div6">
                                    <asp:Button ID="btnSave" runat="server" Text="Save " ToolTip="Save Promotion Information"
                                        OnClientClick="return validate()" CssClass="btn btn-primary" AutoPostBack="true"
                                        OnClick="btnSave_Click" />
                                    <asp:Button ID="btnUpdate1" OnClick="btnUpdate1_Click" OnClientClick="return validate()"
                                        runat="server" class="btn btn-primary" Text="Update" />
                                    &nbsp;&nbsp;&nbsp;<%--<asp:CheckBox ID="chkMix" runat="server" />
                                    &nbsp;&nbsp;&nbsp;&nbsp;Items Mixed
                                    <asp:HiddenField ID="HidMixmatchid" runat="server" />--%>
                                </div>
                                 

                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2" id="Div4">
                                    <caption>
                                        <label for="validationCustom03">
                                        </label>
                                    </caption>
                                </div>

                                
                            </div>
                            <div style="margin-top:12px">
                                 <h6 style="color:forestgreen"> You are at .. <asp:Label ID="lblSelctedBranchCaption1" ForeColor="Black" runat="server"> </asp:Label>   </h6>
                                 </div>
                        </div>
                    </div>
                </div>
            </div>
            <%--Add Inventory Promotion and Its Linked Barcodes - Tab Panel --%>
             <div class="row">
     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
         <div class="card">

            <div class="simple-card">
                <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">
                    Promotion Inventory Item:&nbsp;&nbsp;
                    <button type="button" class="btn btn-warning" onclick="ShowModalItemList()">
                        Search
                    </button>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp
                    <asp:CheckBox ID="chkMix" runat="server" />
                Items Mixed
                <asp:HiddenField ID="HidMixmatchid" runat="server" />
                </h5>
               
                <%-- <ul class="nav nav-tabs" id="myTab5" role="tablist">
                    <li class="nav-item"><a runat="server" class="nav-link active border-left-0" id="shome"
                        data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="false" style="visibility:hidden;">
                        Promo List </a></li>
                    <li class="nav-item"><a runat="server" class="nav-link" id="sprofile" data-toggle="tab"
                        href="#profile" role="tab" aria-controls="profile" aria-selected="false" style="visibility:hidden;">Make Link</a>
                    </li>
                    <li class="nav-item"><a runat="server" class="nav-link" id="sLinkedbarcode" data-toggle="tab"
                        href="#Linkedbarcode" role="tab" aria-controls="profile" aria-selected="false">Linked
                        Barcode</a> </li>
                </ul>--%>
                <ul class="nav nav-tabs" id="myTab5" role="tablist">
                    <li class="nav-item"><a runat="server" class="nav-link" id="sLinkedbarcode" data-toggle="tab"
                        href="#Linkedbarcode" role="tab" aria-controls="profile" aria-selected="true">Linked
                        Barcode</a> </li>
                </ul>
                <div class="tab-content" id="myTabContent5" style="padding: 20px">
                    <asp:Panel class="tab-pane fade show active" ClientIDMode="Static" ID="home" role="tabpanel"
                        aria-labelledby="shome" runat="server">
                         
                        <%--<div class="tab-pane fade show active" id="home-simple" role="tabpanel" aria-labelledby="home-tab-simple">--%>
                        <%--  <div class="card-body">
                            <div class="table-responsive">
                                <table id="example" class="table table-striped table-bordered second" style="width: 100%">
                                    <tbody>
                                        <caption>
                                               <asp:GridView ID="GrdPromo" runat="server" ShowFooter="false" BorderColor="Transparent"
                                                DataKeyNames="MixMatchID" AutoGenerateColumns="false" EmptyDataText=" No Record Found ! "
                                                Height="50px" Width="380px" OnSelectedIndexChanged="GrdPromo_SelectedIndexChanged"
                                                OnRowCommand="GrdPromo_RowCommand">
                                                <AlternatingRowStyle CssClass="dataTableAlt" />
                                                <RowStyle CssClass="dataTable" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="MixMatchID" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="left"
                                                        ItemStyle-Width="31%" Visible="false">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblMixMatchID" runat="server" Text='<%#Eval("MixMatchID")%>'></asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="PromoName" HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left"
                                                        ItemStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblName" runat="server" Text='<%#Eval("Name")%>'></asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Description" ItemStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-right">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("Description")%>'></asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="From" ItemStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-right"
                                                        ItemStyle-Width="250%">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblFrom" runat="server" Width="150px" Text='<%#Eval("FromTime")%>'></asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="To" ItemStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-right"
                                                        ItemStyle-Width="250%">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblTo" runat="server" Width="150px" Text='<%#Eval("ToTime")%>'></asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:ButtonField CommandName="Select" ItemStyle-ForeColor="Green" Text="Edit" />
                                                    <asp:TemplateField HeaderText="Delete" ShowHeader="False">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" ForeColor="Red"
                                                                ToolTip="Click Here to Remove" CommandName="Delete" OnClientClick="javascript: return confirm('Do you want to delete this record?')"
                                                                CommandArgument='<%#bind("MixMatchID") %>' Text="Delete"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                        </caption>
                                    </tbody>
                                </table>
                            </div>
                        </div>--%>
                    </asp:Panel>
                    <%-- <div class="tab-pane fade" id="profile-simple" role="tabpanel" aria-labelledby="profile-tab-simple">--%>
                    <asp:Panel class="tab-pane fade" ClientIDMode="Static" ID="profile" role="tabpanel"
                        aria-labelledby="sprofile" runat="server">
                        <div class="card" style="display: none">
                            <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">
                                Inventory List
                            </h5>
                            <div class="card-body">
                                <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-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="validationCustom03">
                                                            <asp:Label ID="Label2" ForeColor="Black" runat="server" Text="Search By"></asp:Label></label>
                                                        <asp:DropDownList ID="cmbSearch" CssClass="custom-select" OnSelectedIndexChanged="cmbSearch_SelectedIndexChanged"
                                                            runat="server" AutoPostBack="true">
                                                            <asp:ListItem Value="0" Text="Select"></asp:ListItem>
                                                            <asp:ListItem Value="1" Text="All Inventory"></asp:ListItem>
                                                            <asp:ListItem Value="2" Text="InventoryId"></asp:ListItem>
                                                            <asp:ListItem Value="3" Text="Barcode"></asp:ListItem>
                                                            <asp:ListItem Value="4" Text="InventoryName"></asp:ListItem>
                                                            <asp:ListItem Value="5" Text="Category"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                        <caption>
                                                            <label for="validationCustom03">
                                                                LIKE (Search)
                                                            </label>
                                                            <asp:TextBox ID="txtSearchVal" class="form-control" runat="server"></asp:TextBox>
                                                        </caption>
                                                    </div>
                                                    <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                        <label for="validationCustom03">
                                                            Category
                                                        </label>
                                                        <asp:DropDownList ID="cmbCategory" CssClass="custom-select" runat="server" AutoPostBack="true"
                                                            OnSelectedIndexChanged="cmbCategory_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                        <asp:Button ID="btnSearchbyVal" runat="server" Text="Search" CssClass="btn btn-primary"
                                                            OnClick="btnSearchbyVal_Click" />
                                                    </div>
                                                </div>--%>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <%-- <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                                        <br />
                                       <div class="card-body">
                                            <div class="table-responsive">
                                                <table id="Table1" class="table table-striped table-bordered second" style="width: 100%">
                                                    <tbody>
                                                        <caption>
                                                            <asp:GridView ID="GrdInventory" OnPageIndexChanging="GrdInventory_PageIndexChanging"
                                                                runat="server" ShowFooter="false" BorderColor="Transparent" AllowPaging="true"
                                                                PageSize="12" DataKeyNames="InventoryID" AutoGenerateColumns="false" EmptyDataText=" No Record Found ! "
                                                                Height="50px" Width="380px">
                                                                <AlternatingRowStyle CssClass="dataTableAlt" />
                                                                <RowStyle CssClass="dataTable" />
                                                                <Columns>
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:CheckBox ID="chkSelect" runat="server" />
                                                                        </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="OnHand" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                                                        SortExpression="Onhand">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblOnHand" runat="server" Text='<%#Eval("OnHandICA") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </caption>
                                                    </tbody>
                                                </table>
                                            </div>
                                    </div>--%>
                                    <%-- <div align="left">
                                        <asp:Button ID="btnLink" runat="server" Text="Link" OnClick="btnLink_Click" ToolTip="Click To Link Barcode For Promotion "
                                            CssClass="btn btn-primary" AutoPostBack="true" />
                                    </div>--%>
                                </div>
                            </div>
                        </div>
                </div>
                <%--</div> --%>
                <asp:Panel class="tab-pane fade show active" ClientIDMode="Static" ID="Linkedbarcode"
                    role="tabpanel" aria-labelledby="sLinkedbarcode" runat="server">
                    <%-- <div class="card">
                        <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">
                        Linked Barcode List
                        </h5>
                        <div class="card-body">--%>
                    <div class="table-responsive">
                        <table id="Table3" class="table table-striped table-bordered second" style="width: 100%;">
                            <tbody>
                                <caption>
                                    <asp:GridView ID="GrdDblinked" runat="server" ShowFooter="false" BorderColor="Transparent"
                                        DataKeyNames="Barcode" AutoGenerateColumns="false" EmptyDataText=" No Record Found ! "
                                        Width="90%" OnRowCommand="GrdDblinked_RowCommand">
                                        <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:TemplateField HeaderText="InvenID" ItemStyle-HorizontalAlign="Center" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblMixMatchID" runat="server" Text='<%#Eval("MixMatchID") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Barcode" ItemStyle-Width="20%" SortExpression="BarCode">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblBarCode" runat="server" Text='<%#Eval("BarCode") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Description" ItemStyle-Width="60%" SortExpression="Description">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Delete" ShowHeader="False">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" ForeColor="Red"
                                                        ToolTip="Click Here to Remove" CommandName="DeletePromo" OnClientClick="javascript: return confirm('Do you want to delete this record?')"
                                                        CommandArgument='<%#bind("BarCode") %>' Text="Delete"></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </caption>
                            </tbody>
                        </table>
                    </div>
                    <%--     </div>
                    </div>--%>
                </asp:Panel>
                </asp:Panel>
                <%--<div class="tab-pane fade" id="Linkedbarcode" role="tabpanel" aria-labelledby="profile-tab-simple">--%>
                <%-- </div>--%>
            </div>
            </div>
         </div>

                 </div>
            

            <%-- Tab Panel End  --%>
            <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>
            <div class="modalCss" id="ModalPromotionList">
                <div class="modal-dialogCss" style="width:90%">
                
                        <div class="modal-body">
                            <div class="card" style="margin-left:150px;">
                                <h7 class="card-header" style="background-color: #4c4c4c; color: White;">
                                    SEARCH PROMOTION
                                    <button type="button" id="Button2" class="close" style="color: White; opacity: 1;"
                                        onclick="CloseModalPromotionList()">
                                        &times;</button></h7>
                                    <div class="card-body">
                                    <div class="form-row">
                                        <div class="column">
                                            <label for="validationCustom03">
                                                Promotion Name
                                            </label>
                                            <div style="padding-top: 5px">
                                                <asp:TextBox ID="txtInputPromotion" runat="server" class="form-control" Width="320px"> </asp:TextBox>
                                            </div>
                                            <div style="padding-top: 5px">

                                             <asp:CheckBox ID="chkRActive" runat="server" Checked="true" />
                                             <label for="validationCustom03">
                                              Active
                                             </label>
                                            </div>
                                            <div style="margin-top: 8px">
                                                <asp:Button ID="btnApplySearchPromotion" runat="server" OnClick="btnApplySearchPromotion_Click1" class="btn btn-primary" Text="Apply" />
                                            </div>
                                        </div>
                                       
                                    </div>
                                  <div class="table-responsive" style="height: 500px">
                                        <label for="validationCustom03">
                                        Search Result:
                                        </label>
                                        <table id="Table2" class="table table-striped table-bordered second" style="width: 100%">
                                            <tbody>
                                                <caption>
                                                    <asp:Panel ID="Panel1" runat="server" BackColor="white" ScrollBars="Auto">
                                                        <asp:GridView ID="GrdPromo" runat="server" ShowFooter="false" BorderColor="Transparent"
                                                            DataKeyNames="MixMatchID" AutoGenerateColumns="false" EmptyDataText=" No Record Found ! "
                                                            Height="50px" Width="580px" OnSelectedIndexChanged="GrdPromo_SelectedIndexChanged"
                                                            OnRowCommand="GrdPromo_RowCommand">
                                                            <AlternatingRowStyle CssClass="dataTableAlt" />
                                                            <RowStyle CssClass="dataTable" />
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="MixMatchID" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="left"
                                                                    ItemStyle-Width="31%" Visible="false">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblMixMatchID" runat="server" Text='<%#Eval("MixMatchID")%>'></asp:Label></ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="PromoName" HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left"
                                                                    ItemStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblName" runat="server" Text='<%#Eval("Name")%>'></asp:Label></ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Description" ItemStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-right">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("Description")%>'></asp:Label></ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="From" ItemStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-right"
                                                                    ItemStyle-Width="250%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblFrom" runat="server" Width="150px" Text='<%#Eval("FromTime")%>'></asp:Label></ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="To" ItemStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-right"
                                                                    ItemStyle-Width="250%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblTo" runat="server" Width="150px" Text='<%#Eval("ToTime")%>'></asp:Label></ItemTemplate>
                                                                </asp:TemplateField>
                                                                <%--<asp:CommandField ShowDeleteButton="True" DeleteText="Remove"  ControlStyle-ForeColor="Red"   />--%>
                                                                <asp:ButtonField CommandName="Select" ItemStyle-ForeColor="Green" Text="Edit" />
                                                                <asp:TemplateField HeaderText="Delete" ShowHeader="False">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" ForeColor="Red"
                                                                            ToolTip="Click Here to Remove" CommandName="Delete" OnClientClick="javascript: return confirm('Do you want to delete this record?')"
                                                                            CommandArgument='<%#bind("MixMatchID") %>' Text="Delete"></asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
                                                    </asp:Panel>
                                                </caption>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <%--<asp:AsyncPostBackTrigger ControlID="cmbSearch" EventName="SelectedIndexChanged" /> 
                <asp:AsyncPostBackTrigger ControlID="btnSearchbyVal" EventName="Click" /> --%>
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdatePanel runat="server" ID="updatepanel2" UpdateMode="Conditional">
        <ContentTemplate>
            <div class="modalCss" id="ModalItemsList">
                <div class="modal-dialogCss" style="width:95%;">
                 
                        <div class="modal-body" style="padding: 0px;">
                            <div class="card" style=" height:720px;margin-left:145px;">
                                <h7 class="card-header" style="background-color: #4c4c4c; color: White;">
                                    SEARCH ITEM
                                    <button type="button" id="Button1" class="close" style="color: White; opacity: 1;"
                                        onclick="CloseModalItemList()">
                                        &times;</button></h7>
                                <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="validationCustom03">
                                                <asp:Label ID="Label2" ForeColor="Black" runat="server" Text="Search By"></asp:Label></label>
                                            <asp:DropDownList ID="cmbSearch" CssClass="custom-select" OnSelectedIndexChanged="cmbSearch_SelectedIndexChanged"
                                                runat="server" AutoPostBack="true">
                                                <asp:ListItem Value="0" Text="Select"></asp:ListItem>
                                                <asp:ListItem Value="1" Text="All Inventory"></asp:ListItem>
                                                <asp:ListItem Value="2" Text="InventoryId"></asp:ListItem>
                                                <asp:ListItem Value="3" Text="Barcode"></asp:ListItem>
                                                <asp:ListItem Value="4" Text="InventoryName"></asp:ListItem>
                                                <asp:ListItem Value="5" Text="Description"></asp:ListItem>
                                                <asp:ListItem Value="6" Text="Category"></asp:ListItem>
                                                <asp:ListItem Value="7" Text="StockCode"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                        <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                            <caption>
                                                <label for="validationCustom03">
                                                    LIKE (Search)
                                                </label>
                                                <asp:TextBox ID="txtSearchVal" class="form-control" runat="server"></asp:TextBox>
                                            </caption>
                                        </div>
                                        <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                            <label for="validationCustom03" style="display:none ">
                                                Category
                                            </label>
                                            <asp:DropDownList ID="cmbCategory" CssClass="custom-select" runat="server" AutoPostBack="true" Visible="false"
                                                OnSelectedIndexChanged="cmbCategory_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </div>
                                        <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                            <asp:Button ID="btnSearchbyVal" runat="server" Text="Search" CssClass="btn btn-primary"
                                                OnClick="btnSearchbyVal_Click" />
                                        </div>
                                    </div>
                                    
                                        <table id="Table1" class="table table-striped table-bordered second" >
                                            <tbody>
                                                <caption>
                                                  
                                                    <asp:GridView ID="GrdInventory" OnPageIndexChanging="GrdInventory_PageIndexChanging" Font-Size="Small"
                                                        runat="server" ShowFooter="false" BorderColor="Transparent" AllowPaging="true"  Height="450px"
                                                        PageSize="10" DataKeyNames="InventoryID" AutoGenerateColumns="false" EmptyDataText=" No Record Found ! "
                                                        Width="1630px">
                                                        <AlternatingRowStyle CssClass="dataTableAlt" />
                                                        <RowStyle CssClass="dataTable" />
                                                        <Columns>
                                                            <asp:TemplateField>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkSelect" runat="server" />
                                                                </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="10px">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblStockcode" runat="server" Text='<%#Eval("Stockcode") %>'></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>--%>
                                                        </Columns>
                                                      <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>
                                                    
                                                    
                                                </caption>
                                            </tbody>
                                        </table>
                                        
                                    
                                 

                                     <div class="modal-footer">
                                      
                                      <div>

  
                                      <asp:Button ID="btnLink" runat="server" Text="Link" OnClick="btnLink_Click" 
                                           ToolTip="Click To Link Barcode For Promotion" 
                                           CssClass="btn btn-primary mt-1" AutoPostBack="true" />
                                     </div>
   
                                    </div>
                                </div>
                                 

                            </div>

                              

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

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