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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <%--    <link rel="stylesheet" href="../assets/vendor/bootstrap/css/bootstrap.min.css">--%>
    <%-- <link href="../assets/vendor/fonts/circular-std/style.css" rel="stylesheet">
    <link rel="stylesheet" href="../assets/libs/css/style.css">
    <link rel="stylesheet" href="../assets/vendor/fonts/fontawesome/css/fontawesome-all.css">
    <link rel="stylesheet" type="text/css" href="../assets/vendor/datatables/css/dataTables.bootstrap4.css">
    <link rel="stylesheet" type="text/css" href="../assets/vendor/datatables/css/buttons.bootstrap4.css">
    <link rel="stylesheet" type="text/css" href="../assets/vendor/datatables/css/select.bootstrap4.css">
    <link rel="stylesheet" type="text/css" href="../assets/vendor/datatables/css/fixedHeader.bootstrap4.css">
    <link type="text/css" rel="Stylesheet" href="css/style.css" />--%>
    <%--MODAL CSS--%>
    <%--   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">--%>
    <%--  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>--%>
    <style type="text/css">
        body
        {
            font-family: Arial;
            font-size: 10pt;
            overflow-x: hidden;
        }
        @media only screen and (max-width: 600px)
        {
            table, th, td
            {
                font-size: 10px;
                font-weight: bold;
            }
        
            .Labels
            {
                font-size: 10px;
            }
            .alnright
            {
                text-align: right;
            }
        
        }
        
        .gridview
        {
            background-color: #fff;
            padding: 2px;
            margin: 1% auto;
        }
        
        .SectionCSS
        {
            background-color: #4c4c4c;
            color: White;
        }
    </style>
    <%--    Modal--%>
    <style type="text/css">
        .modalCss
        {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 1; /* Sit on top */
            padding-top: 80px; /* Location of the box */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
        }
        
        
        
        .modal-dialogCss
        {
        }
        
        /* Modal Content */
        .modal-contentCss
        {
            background-color: #fefefe;
            margin: auto;
            width: 1200px;
            height: 850px;
            border-radius: 3px;
        }
        
        
        /* Create two equal columns that floats next to each other */
        .column
        {
            float: left;
            width: 40%;
            padding: 16px;
            height: auto; /* Should be removed. Only for demonstration */
        }
        
        /* Clear floats after the columns */
        .row:after
        {
            content: "";
            display: table;
            clear: both;
        }
        
        .ButtonSearch
        {
            background: #ffc108;
            margin: 0;
            font-family: Circular Std Book;
            font-size: 14px;
            line-height: inherit;
            border-width: thin;
            border-color: #212529;
            border-radius: 2px;
            color: #212529;
        }
    </style>
    <script type="text/javascript">



        function CheckOne(obj) {

            var grid = obj.parentNode.parentNode.parentNode;
            var inputs = grid.getElementsByTagName("input");
            for (var i = 0; i < inputs.length; i++) {
                if (inputs[i].type == "checkbox") {
                    if (obj.checked && inputs[i] != obj && inputs[i].checked) {
                        inputs[i].checked = false;
                    }
                }
            }
        }

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


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

        //Search CondimentGroup
        function CloseModalCondimentGroupList() {
            var modal = document.getElementById("ModalCondimentGroupList");
            modal.style.display = "none";
        }


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

        //LinkCondiment
        function CloseModal() {
            var modal = document.getElementById("myModal");
            modal.style.display = "none";


        }


        function ValidateCondimentGroup() {
            var CondimentGroupName = document.getElementById('<%= txtGCondimentName.ClientID %>').value;
            var modal = document.getElementById("myModal");
            var btn = document.getElementById("myBtn");
            if (CondimentGroupName != "") {
                modal.style.display = "block";

            } else {
                alert("Please Select Condiment Group");
            }

        }

        function myFunction() {
            //            $("#<%=grdLinked.ClientID %> tr").each(function () {
            //                alert("test");
            //            });
            //            alert($("#<%=grdLinked%>"));
            //            var gridLinked = $("#<%=grdLinked.Rows.Count%>");
            //            alert(gridLinked);


            var GridId = "<%=grdLinked.ClientID %>";

            var input, filter, table, tr, td, i, txtValue;
            input = document.getElementById("myInput");
            filter = input.value.toUpperCase();
            table = document.getElementById(GridId);
            //table = document.getElementById(" #<%= grdLinked.ClientID %>");
            //alert(table);
            tr = table.getElementsByTagName("tr");
            for (i = 0; i < tr.length; i++) {
                td = tr[i].getElementsByTagName("td")[1];
                if (td) {
                    // alert(txtValue);
                    txtValue = td.textContent || td.innerText;
                    if (txtValue.toUpperCase().indexOf(filter) > -1) {
                        tr[i].style.display = "";
                    } else {
                        tr[i].style.display = "none";
                    }
                }
            }
        }

     
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel runat="server" ID="upPanel" UpdateMode="Conditional">
        <ContentTemplate>
            <table style="padding-bottom: 2px; width: 100%;">
                <tr>
                    <td style="max-width: 50%; min-width: 50%;">
                    </td>
                    <%-- <td style="font-size: large; width: 50%; font-family: 'Open Sans', sans-serif; font-weight: bolder;">
                        CONDIMENT
                    </td>--%>
                    <td style="max-width: 50%; min-width: 50%; text-align: right; padding-bottom: 7px;">
                        <label for="validationCustom03">
                            Branch
                        </label>
                        <%-- <asp:Label ID="lblBranchAliasName" ForeColor="Blue" runat="server" Text="Branch "></asp:Label>--%>
                        <asp:DropDownList ID="cmbBranches" CssClass="custom-select" runat="server" AutoPostBack="true"
                            OnSelectedIndexChanged="cmbBranches_SelectedIndexChanged" Width="200px" Height="35px">
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <div class="row" style="display: none">
                <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div>
                        <%-- <div class="card-body">--%>
                        <div style="background-color: transparent;">
                            <div class="form-row" style="background-color: transparent;">
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <caption>
                                        <%--   <label for="validationCustom03">
                                            FROM DATE
                                        </label>--%>
                                        <asp:TextBox ID="txtStartDt" class="form-control" runat="server" Visible="false"></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 DATE
                                    </label>--%>
                                    <asp:TextBox ID="txtEndDt" class="form-control" runat="server" Visible="false"></asp:TextBox>
                                    <asp:CalendarExtender ID="CalendarExtender1" Format="yyyy-MM-dd" runat="server" TargetControlID="txtEndDt"
                                        PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <%-- <label for="validationCustom03">
                                       </label>
                                        <asp:Label ID="lblBranchAliasName" ForeColor="Blue" runat="server" Text="Branch Name"></asp:Label>--%>
                                    <%--  <asp:DropDownList ID="cmbBranches" CssClass="custom-select" runat="server" AutoPostBack="true"
                                        OnSelectedIndexChanged="cmbBranches_SelectedIndexChanged">
                                    </asp:DropDownList>--%>
                                    Branch
                                </div>
                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                    <asp:Button ID="btnGetReports" runat="server" Text="Apply" CssClass="btn btn-primary"
                                        Visible="false" OnClick="btnGetReports_Click" OnClientClick="return validate()" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="simple-card" role="tabpanel" id="TabsID">
                <ul class="nav nav-tabs" id="myTab5">
                    <li id="liCondiment" class="nav-item" runat="server"><a runat="server" class="nav-link active border-left-0"
                        id="aCondiment" data-toggle="tab" href="#hCondiment" role="tab" aria-controls="acCondiment"
                        aria-selected="true">CONDIMENT </a></li>
                    <li id="liCondimentGroupID" class="nav-item" runat="server"><a id="aCondimentGroupID"
                        runat="server" data-toggle="tab" class="nav-link" aria-controls="acCondimentGroup"
                        href="#hCondimentGroup">CONDIMENT GROUP</a> </li>
                    <li id="liCondimentLinked" class="nav-item" runat="server"><a runat="server" id="aCondimentLinked"
                        data-toggle="tab" class="nav-link" aria-controls="acCondimentGroup" href="#hCondimentLinked"
                        visible="false">CONDIMENT LINKED</a> </li>
                </ul>
                <div class="tab-content" id="myTabContent5">
                    <asp:Panel class="tab-pane fade show active" ClientIDMode="Static" ID="hCondiment"
                        role="tabpanel" aria-labelledby="acCondiment" runat="server">
                        <br />
     
                        <div class="card">
                            <h5 class="card-header" style="background-color: #4c4c4c; font-size:14px;color:#F8F9FA">
                            
                                CONDIMENT &nbsp;&nbsp;
                                <button type="button" class="ButtonSearch" onclick="ShowModalCondimentList()">
                                    Search
                                </button>
                            </h5>
                            <div class="card-body">
                                <div class="form-group">
                                    <label for="inputText4" class="col-form-label" style="font-size: 17px;visibility:hidden;" >
                                        Condiment ID</label>
                                    <asp:TextBox ID="txtCondimentID" runat="server" class="form-control" ReadOnly="true"
                                        Visible="false"> </asp:TextBox>
                                </div>
                                <div class="form-group">
                                    <label for="inputText4" class="col-form-label">
                                        Condiment Name</label>
                                    <asp:TextBox ID="txtCondimentname" runat="server" class="form-control"> </asp:TextBox>
                                </div>
                                <div class="form-group">
                                    <label for="inputText4" class="col-form-label">
                                        Condiment Description</label>
                                    <asp:TextBox ID="txtDescription" runat="server" class="form-control"> </asp:TextBox>
                                </div>
                                <div class="form-group">
                                    <label for="inputText4" class="col-form-label">
                                        Group Condiment</label>
                                    <asp:DropDownList ID="dpGroupCondiment" CssClass="custom-select" runat="server" AutoPostBack="true">
                                        <%--OnSelectedIndexChanged="cmbBranches_SelectedIndexChanged"--%>
                                    </asp:DropDownList>
                                </div>
                                <div>
                                    <asp:Button ID="btnSave" runat="server" class="btn btn-primary" Text="Save" OnClick="btnSave_Click" />
                                    <%--<asp:Button ID="ShowModal" runat="server" class="btn btn-primary" Text="Modal" />--%>
                                    <%-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">
                                        Open Modal</button>--%>
                                </div>
                            </div>
                        </div>
                        <%-- <div class="card">
                            <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                CONDIMENT LIST</h5>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table id="example" class="table table-striped table-bordered second" style="width: 100%">
                                        <tbody>
                                            <caption>
                                                <asp:Panel ID="Panel8" runat="server" BackColor="white" Height="180px" ScrollBars="Auto"
                                                    Width="1500px">
                                                    <asp:GridView ID="grdCondimentList" runat="server" AutoGenerateColumns="False" EmptyDataRowStyle-CssClass="alert-dark"
                                                        Font-Size="11px" HeaderStyle-BackColor="RoyalBlue" EmptyDataText="No Record! "
                                                        DataKeyNames="CondimentID" FooterStyle-BackColor="Green" FooterStyle-ForeColor="white"
                                                        Width="920px" AllowPaging="true" PageSize="150" BackColor="White" AllowSorting="true"
                                                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" Height="180px"
                                                        OnSelectedIndexChanged="OnSelectedIndexChanged">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="ID" Visible="true" ItemStyle-Width="15%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCondimentID" runat="server" Text='<%#Eval("condimentid") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="CondimentName" ItemStyle-Width="30%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCondimentName" runat="server" Text='<%#Eval("condimentname") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Desciption" ItemStyle-Width="40%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("condimentdesc") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="CondimentGroupID" ItemStyle-Width="40%" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCondimentGroupID" runat="server" Text='<%#Eval("CondimentGroupID") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="CondimentGroupName" ItemStyle-Width="40%" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCondimentGroupname" runat="server" Visible="false" Text='<%#Eval("CondimentGroupName") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="" ItemStyle-Width="15%">
                                                                <ItemTemplate>
                                                                 
                        <asp:LinkButton ID="hlinkEdit" runat="server" Font-Underline="true" ForeColor="Blue"
                            CommandName="Select" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton>
                        </ItemTemplate> </asp:TemplateField> </Columns>
                        <pagerstyle cssclass="gridview"></pagerstyle>
                        <footerstyle backcolor="#006699" forecolor="White"></footerstyle>
                        <headerstyle backcolor="LightBlue" 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>
                    </asp:Panel>
                    </caption> </tbody> </table>
                </div>
            </div>
            </div>--%>
                    </asp:Panel>
                    <asp:Panel class="tab-pane fade" ClientIDMode="Static" ID="hCondimentGroup" role="tabpanel"
                        aria-labelledby="acCondimentGroup" runat="server">
                        <br />
                        <div class="card">
                            <h5 class="card-header" style="background-color: #4c4c4c; font-size:14px;color:#F8F9FA;">
                                CONDIMENT GROUP &nbsp;&nbsp;
                                <button type="button" class="ButtonSearch" onclick="ShowModalCondimentGroupList()">
                                    Search</button>
                                <button type="button" class="ButtonSearch" style="background-color:#ef172c;color:White" onclick="ValidateCondimentGroup()">
                                    Link Condiment</button>
                                <br />
                            </h5>
                            <div class="card-body">
                                <div class="form-group">
                                    <label for="inputText4" class="col-form-label" style="display: none">
                                        ID</label>
                                    <asp:TextBox ID="txtGCondimentID" runat="server" class="form-control" ReadOnly="true"
                                        Visible="false"> </asp:TextBox>
                                </div>
                                <div class="form-group">
                                    <label for="inputText4" class="col-form-label">
                                        Name</label>
                                    <asp:TextBox ID="txtGCondimentName" runat="server" class="form-control"> </asp:TextBox>
                                </div>
                                <div>
                                    <asp:Button ID="btnSaveGCondiment" runat="server" class="btn btn-primary" Text="Save"
                                        OnClick="btnSaveGCondiment_Click" />
                                    <%--  <button type="button" class="btn btn-primary" data-toggle="modal" onclick="ValidateCondimentGroup()" data-target="#myModal">
                                        Link Condiment
                                    </button>--%>
                                    <%--    <asp:Button ID="btnHiddenLinkGCondiment" runat="server" class="btn btn-primary" Text="View Linked Condiment"
                                        OnClick="btnViewLinkedModal_Click" Visible="true" />--%>
                                </div>
                            </div>
                        </div>
                        <%--                        <div class="card">
                            <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                CONDIMENT GROUP LIST</h5>
                            <div class="card-body" style="width: 70%">
                                <div class="table-responsive">
                                    <table id="Table1" class="table table-striped table-bordered second" style="width: 100%">
                                        <tbody>
                                            <caption>
                                                <asp:Panel ID="Panel1" runat="server" BackColor="white" Height="180px" ScrollBars="Auto"
                                                    Width="1500px">
                                                    <asp:GridView ID="grdCondimentGroupList" runat="server" AutoGenerateColumns="False"
                                                        EmptyDataRowStyle-CssClass="alert-dark" Font-Size="11px" HeaderStyle-BackColor="RoyalBlue"
                                                        EmptyDataText="No Record! " DataKeyNames="CondimentGroupID" FooterStyle-BackColor="Green"
                                                        FooterStyle-ForeColor="white" AllowPaging="true" PageSize="150" BackColor="White"
                                                        AllowSorting="true" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                                        CellPadding="3" Height="180px" OnSelectedIndexChanged="OnSelectedIndexChangedGroup">
                                                        <Columns>                                                 
                                                            <asp:TemplateField HeaderText="ID" Visible="false" ItemStyle-Width="15%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGCondimentID" runat="server" Text='<%#Eval("condimentgroupid") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Group Name" ItemStyle-Width="40%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGCondimentName" runat="server" Text='<%#Eval("condimentgroupname") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="" ItemStyle-Width="15%">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="hlinkEditGroup" runat="server" Font-Underline="true" ForeColor="Blue"
                                                                        CommandName="Select" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerStyle CssClass="gridview"></PagerStyle>
                                                        <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                                                        <HeaderStyle BackColor="LightBlue" 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>
                                                </asp:Panel>
                                            </caption>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>--%>
                    </asp:Panel>
                    <asp:Panel class="tab-pane fade" ClientIDMode="Static" ID="hCondimentLinked" role="tabpanel"
                        aria-labelledby="acCondimentLinked" runat="server" Visible="false">
                        <div class="card">
                            <div class="card">
                                <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                    CONDIMENT GROUP</h5>
                                <div class="card-body">
                                    <div class="form-row">
                                        <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                            <label for="inputText4" class="col-form-label">
                                                Group ID</label>
                                            <asp:TextBox ID="txtLGCondimentID" runat="server" class="form-control" ReadOnly="true"> </asp:TextBox>
                                        </div>
                                        <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                            <label for="inputText4" class="col-form-label">
                                                Group Name</label>
                                            <asp:TextBox ID="txtLGCondimentName" runat="server" class="form-control" ReadOnly="true"> </asp:TextBox>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                GROUP CONDIMENT 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:Panel ID="Panel3" runat="server" BackColor="white" Height="180px" ScrollBars="Auto"
                                                    Width="1500px">
                                                    <asp:GridView ID="grdGCLinked" runat="server" AutoGenerateColumns="False" EmptyDataRowStyle-CssClass="alert-dark"
                                                        Font-Size="11px" HeaderStyle-BackColor="LightBlue" EmptyDataText="No Record! "
                                                        DataKeyNames="CondimentGroupID" FooterStyle-BackColor="Green" FooterStyle-ForeColor="white"
                                                        Width="920px" AllowPaging="false" PageSize="150" BackColor="White" AllowSorting="true"
                                                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" Height="180px">
                                                        <Columns>
                                                            <asp:TemplateField ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkSelect" runat="server" onclick="CheckOne(this)" OnCheckedChanged="CheckBox_Changed"
                                                                        AutoPostBack="true" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="ID" ItemStyle-Width="15%" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGCondimentID" runat="server" Text='<%#Eval("CondimentGroupID") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Condiment Name" ItemStyle-Width="40%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGCondimentName" runat="server" Text='<%#Eval("condimentGroupName") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="" Visible="false" ItemStyle-Width="15%">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="lnkBtnLinked" runat="server" Visible="false" Font-Underline="true">Linked Details</asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </asp:Panel>
                                            </caption>
                                        </tbody>
                                    </table>
                                </div>
                                <br />
                                <div>
                                    <asp:Button ID="btnViewLinked" runat="server" class="btn btn-primary" Text="View Linked Condiment"
                                        OnClick="btnViewLinked_Click" Visible="false" />
                                </div>
                            </div>
                            <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                LINKED CONDIMENT</h5>
                            <%-- <div class="card-body">
                                <div class="table-responsive">
                                    <table id="Table2" class="table table-striped table-bordered second" style="width: 100%">
                                        <tbody>
                                            <caption>
                                                <asp:Panel ID="Panel2" runat="server" BackColor="white" Height="180px" ScrollBars="Auto"
                                                    Width="1500px">
                                                    <asp:GridView ID="grdLinked" runat="server" AutoGenerateColumns="False" EmptyDataRowStyle-CssClass="alert-dark"
                                                        Font-Size="11px" HeaderStyle-BackColor="LightBlue" EmptyDataText="No Record! "
                                                        DataKeyNames="CondimentID" FooterStyle-BackColor="Green" FooterStyle-ForeColor="white"
                                                        Width="920px" AllowPaging="false" PageSize="150" BackColor="White" AllowSorting="true"
                                                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" Height="180px">
                                                        <Columns>
                                                            <asp:TemplateField ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkSelectCondiment" runat="server" Checked='<%# Convert.ToBoolean(Eval("selected")) %>'
                                                                        OnCheckedChanged="chkSelectCondiment_Changed" AutoPostBack="true" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="ID" Visible="true" ItemStyle-Width="15%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGCondimentID" runat="server" Text='<%#Eval("CondimentID") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Condiment Name" ItemStyle-Width="40%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGCondimentName" runat="server" Text='<%#Eval("CondimentName") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Condiment Group Name" ItemStyle-Width="40%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGCondimentGroupName" runat="server" Text='<%#Eval("CondimentGroupname") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerStyle CssClass="gridview"></PagerStyle>
                                                        <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                                                        <HeaderStyle BackColor="LightBlue" 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>
                                                </asp:Panel>
                                            </caption>
                                        </tbody>
                                    </table>
                                </div>
                                <div>
                                    <br />
                                    <asp:Button ID="btnUpdateGCondiment" runat="server" class="btn btn-primary" Text="Update Group Condiment"
                                        OnClick="btnUpdateGCondiment_Click" />
                                </div>
                        </div> </div>--%>
                    </asp:Panel>
                </div>
            </div>
            <div class="modalCss" id="ModalCondimentList">
                <div class="modal-dialogCss">
                    <div class="modal-contentCss">
                        <%--<div class="modal-header">
                           
                        </div>--%>
                        <div class="modal-body" style="padding: 0px;">
                            <div class="card">
                                <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                    Search Condiment
                                    <button type="button" id="Button1" class="close" style="color: White; opacity: 1;"
                                        onclick="CloseModalCondimentList()">
                                        &times;</button></h5>
                                <div class="card-body">
                                    <div class="row">
                                        <div class="column">
                                            <label for="validationCustom03">
                                                Search Type
                                            </label>
                                            <br />
                                            <asp:DropDownList ID="cmbSearch" runat="server" Width="100%" Height="35px" AutoPostBack="false">
                                                <asp:ListItem Text="Name" Value="Name"></asp:ListItem>
                                                <asp:ListItem Text="Description" Value="Desc"></asp:ListItem>
                                            </asp:DropDownList>
                                            <div style="margin-top: 8px">
                                                <asp:Button ID="btnApplySearch" runat="server" class="btn btn-primary" Text="Apply"
                                                    OnClick="btnApplySearch_Click" />
                                            </div>
                                        </div>
                                        <div class="column">
                                            <label for="validationCustom03">
                                                Enter Description
                                                <div style="padding-top: 5px">
                                                    <asp:TextBox ID="txtInput" runat="server" class="form-control" Width="320px"> </asp:TextBox>
                                                </div>
                                            </label>
                                        </div>
                                    </div>
                                    <br />
                                    <div class="table-responsive" style="height: 550px">
                                        <label for="validationCustom03">
                                            Search Result:
                                        </label>
                                        <table id="example" class="table table-striped table-bordered second" style="width: 100%">
                                            <tbody>
                                                <caption>
                                                    <asp:Panel ID="Panel8" runat="server" BackColor="white" ScrollBars="Auto">
                                                        <asp:GridView ID="grdCondimentList" runat="server" AutoGenerateColumns="False" EmptyDataRowStyle-CssClass="alert-dark"
                                                            Font-Size="11px" HeaderStyle-BackColor="RoyalBlue" EmptyDataText="No Record! "
                                                            DataKeyNames="CondimentID" FooterStyle-BackColor="Green" FooterStyle-ForeColor="white"
                                                            AllowPaging="false" PageSize="150" BackColor="White" AllowSorting="true" BorderColor="#CCCCCC"
                                                            BorderStyle="None" BorderWidth="1px" CellPadding="3" OnSelectedIndexChanged="OnSelectedIndexChanged">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="ID" Visible="false" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblCondimentID" runat="server" Text='<%#Eval("condimentid") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="CondimentName" ItemStyle-Width="20%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblCondimentName" runat="server" Text='<%#Eval("condimentname") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Desciption" ItemStyle-Width="30%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("condimentdesc") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="CondimentGroupID" ItemStyle-Width="0%" Visible="false">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblCondimentGroupID" runat="server" Text='<%#Eval("CondimentGroupID") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="CondimentGroupName" ItemStyle-Width="0%" Visible="false">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblCondimentGroupname" runat="server" Visible="false" Text='<%#Eval("CondimentGroupName") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <%--      CommandArgument="<%# Container.DataItemIndex %>" --%>
                                                                        <asp:LinkButton ID="hlinkEdit" runat="server" Font-Underline="true" ForeColor="Blue"
                                                                            CommandName="Select" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerStyle CssClass="gridview"></PagerStyle>
                                                            <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                                                            <HeaderStyle BackColor="LightBlue" 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>
                                                    </asp:Panel>
                                                </caption>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modalCss" id="ModalCondimentGroupList">
                <div class="modal-dialogCss">
                    <div class="modal-contentCss">
                        <%-- <div class="modal-header">
                           
                        </div>--%>
                        <div class="modal-body" style="padding: 0px;">
                            <div class="card">
                                <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                    SEARCH CONDIMENT GROUP
                                    <button type="button" id="Button2" class="close" style="color: White; opacity: 1;"
                                        onclick="CloseModalCondimentGroupList()">
                                        &times;</button></h5>
                                <div class="card-body" style="width: 100%">
                                    <div class="row">
                                        <div class="column">
                                            <%--<label for="validationCustom03">
                                                Search Type
                                            </label>--%>
                                            <%--  <asp:DropDownList ID="DropDownList1" runat="server" Width="100%" Height="35px" AutoPostBack="false">
                                                <asp:ListItem Text="Name" Value="Name"></asp:ListItem>
                                                <asp:ListItem Text="Description" Value="Desc"></asp:ListItem>
                                            </asp:DropDownList>--%>
                                            <label for="validationCustom03">
                                                Condiment Group 
                                            </label>
                                            <div style="padding-top: 5px">
                                                <asp:TextBox ID="txtInputCondimentGroup" runat="server" class="form-control" Width="320px"> </asp:TextBox>
                                            </div>
                                            <div style="margin-top: 8px">
                                                <asp:Button ID="btnApplySearchCndimentGroup" runat="server" class="btn btn-primary"
                                                    Text="Apply" OnClick="btnApplySearchCndimentGroup_Click" />
                                            </div>
                                        </div>
                                        <div class="column">
                                            <%--   <label for="validationCustom03">
                                                Enter Description
                                                <div style="padding-top: 5px">
                                                    <asp:TextBox ID="txtInputCondimentGroup" runat="server" class="form-control" Width="320px"> </asp:TextBox>
                                                </div>
                                            </label>--%>
                                        </div>
                                    </div>
                                    <div class="table-responsive" style="height: 550px">
                                        <label for="validationCustom03">
                                            Search Result:
                                        </label>
                                        <table id="Table1" 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="grdCondimentGroupList" runat="server" AutoGenerateColumns="False"
                                                            EmptyDataRowStyle-CssClass="alert-dark" Font-Size="11px" HeaderStyle-BackColor="RoyalBlue"
                                                            EmptyDataText="No Record! " DataKeyNames="CondimentGroupID" FooterStyle-BackColor="Green"
                                                            FooterStyle-ForeColor="white" AllowPaging="false" PageSize="150" BackColor="White"
                                                            AllowSorting="true" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                                            CellPadding="3" OnSelectedIndexChanged="OnSelectedIndexChangedGroup" Width="100%">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="ID" Visible="false" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblGCondimentID" runat="server" Text='<%#Eval("condimentgroupid") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Group Name" ItemStyle-Width="60%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblGCondimentName" runat="server" Text='<%#Eval("condimentgroupname") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="" ItemStyle-Width="15%">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="hlinkEditGroup" runat="server" Font-Underline="true" ForeColor="Blue"
                                                                            CommandName="Select" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerStyle CssClass="gridview"></PagerStyle>
                                                            <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                                                            <HeaderStyle BackColor="LightBlue" 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>
                                                    </asp:Panel>
                                                </caption>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modalCss" id="myModal">
                <div class="modal-dialogCss">
                    <div class="modal-contentCss">
                        <div class="modal-body" style="padding: 0px;">
                            <%--  <div class="modal-header">
                            </div>--%>
                            <div class="card">
                                <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
                                    LINK CONDIMENT
                                    <button type="button" id="btnCloseModal" class="close" style="color: White; opacity: 1;"
                                        onclick="CloseModal()">
                                        &times;</button></h5>
                                <div class="card-body">
                                    <label for="validationCustom03">
                                        <asp:Label ID="lblCondimentGroupHeader" runat="server" Text="" ForeColor="black"></asp:Label>
                                    </label>
                                    <div class="row">
                                        <div class="column">
                                            <label for="validationCustom03">
                                                Enter Condiment Name
                                                <div style="padding-top: 5px">
                                                    <%--<asp:TextBox ID="txtSearchCondiment" runat="server" class="form-control" Width="320px"> </asp:TextBox>--%>
                                                    <input type="text" id="myInput" onkeyup="myFunction()" class="form-control" title="Type in a name"
                                                        style="height: 35px; width: 230px">
                                                </div>
                                            </label>
                                            <%--  <label for="validationCustom03">
                                                Enter Description
                                                
                                            </label>--%>
                                            <%--    <asp:DropDownList ID="dplinkCondiment" runat="server" Width="100%" Height="35px" AutoPostBack="false">
                                            <asp:ListItem Text="Name" Value="Name"></asp:ListItem>
                                            <asp:ListItem Text="Description" Value="Desc"></asp:ListItem>
                                        </asp:DropDownList>--%>
                                            <%--  <label for="validationCustom03">
                                            Condiment Group :
                                        </label>
                                        <div style="padding-top: 5px">
                                            <asp:TextBox ID="TextBox1" runat="server" class="form-control" Width="320px"> </asp:TextBox>
                                        </div>--%>
                                            <%--      <div style="margin-top: 8px">
                                            <asp:Button ID="Button3" runat="server" class="btn btn-primary" Text="Apply" OnClientClick="myFunction()" />
                                        </div>--%>
                                        </div>
                                        <div class="column">
                                            <%-- <label for="validationCustom03">
                                                Enter Description
                                                <div style="padding-top: 5px">
                                                    
                                                    <input type="text" id="myInput" onkeyup="myFunction()" class="form-control"  title="Type in a name" style="height:35px;width:230px">
                                                </div>
                                            </label>--%>
                                        </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">
                                            <tbody>
                                                <asp:GridView ID="grdLinked" runat="server" AutoGenerateColumns="False" EmptyDataRowStyle-CssClass="alert-dark"
                                                    Font-Size="11px" HeaderStyle-BackColor="LightBlue" EmptyDataText="No Record! "
                                                    DataKeyNames="CondimentID" FooterStyle-BackColor="Green" FooterStyle-ForeColor="white"
                                                    Width="500px" AllowPaging="false" PageSize="150" BackColor="White" AllowSorting="true"
                                                    BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" OnRowDataBound="grdLinked_RowDataBound">
                                                    <Columns>
                                                        <asp:TemplateField ItemStyle-Width="10%">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkSelectCondiment" runat="server" Checked='<%# Convert.ToBoolean(Eval("selected")) %>' />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="ID" ItemStyle-Width="15%" Visible="false">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblGCondimentID" runat="server" Text='<%#Eval("CondimentID") %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Condiment Name" ItemStyle-Width="40%">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblGCondimentName" runat="server" Text='<%#Eval("CondimentName") %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Condiment Group Name" ItemStyle-Width="40%">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblGCondimentGroupName" runat="server" Text='<%#Eval("CondimentGroupname") %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <PagerStyle CssClass="gridview"></PagerStyle>
                                                    <FooterStyle BackColor="#006699" ForeColor="White"></FooterStyle>
                                                    <HeaderStyle BackColor="LightBlue" Font-Bold="True" ForeColor="Black" CssClass="header">
                                                    </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>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div style="text-align: right;">
                                    <div class="modal-footer" style="border: none;">
                                        <asp:Button ID="btnUpdateGCondiment" runat="server" class="btn btn-primary" Text="Update"
                                            OnClick="btnUpdateGCondiment_Click" />
                                    </div>
                                    <%--  <button type="button" onclick="CloseModal();">
                                    Close Modal</button>--%>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
