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

<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="https://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"></script>
    <style type="text/css">
        .overlay {
            position: fixed;
            top: 0px;
            left: 0px;
            z-index: 0;
            height: 100%;
            width: 100%;
            top: 0;
            background-color: White;
            filter: alpha(opacity=60);
            opacity: 0.9;
            -moz-opacity: 1;
        }

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

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

        .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 */
        }

        .KitchenFlagModalCss {
            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: 800px;
            height: 400px;
            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;
        }

        .progress-barCondimentImagePath {
            background-color: #5969ff;
            justify-content: center;
            color: #fff;
            text-align: center;
        }
    </style>








    <script type="text/jscript">

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


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

        function Confirm() {
            var result = window.confirm('Are you sure you want to delete this condiment?');
            if (result == true)
                return true;
            else
                return false;
        }


       function ValidateChar(e)
       {

             let key = e.key;
                let keyCharCode = key.charCodeAt(0);
                
                if(keyCharCode == 13){
                    return false;
                }

                // 0-9
                if(keyCharCode >= 48 && keyCharCode <= 57) {
                    return key;
                }

                // A-Z
                if(keyCharCode >= 65 && keyCharCode <= 90) {
                    return key;
                }
                // a-z
                if(keyCharCode >= 97 && keyCharCode <= 122) {
                    return key;
                }

                //space
                if (keyCharCode == 32)
                 {
                    return key;
                }
               //space
                if (keyCharCode == 43) {
                 return key;
               }
               //Dot  
               if (keyCharCode ==46) {
               return key;
               }
            
                alert('Special character not allowed.');
                return false;
       }

      

        function isAlphaNumeric(keyCode) {
            alert(keyCode);
            //var isShift = false;
            //if (keyCode != 16) {
            // if (isShift == false) {
            return ((keyCode >= 65 && keyCode <= 90) || (keyCode == 8));
            //|| (keyCode >= 48 && keyCode <=57) || keyCode == 32
            //}
            //}
        }

        function ConfirmationMessage() {
            if (confirm("Are you sure you want to change this Condiment Availability?")) {
                return true;
            } else {
                return false;
            }
        }

        function KitchenFlagModalClose() {
            var modal = document.getElementById("KitchenFlagModal");
            modal.style.display = "none";
        }
        
        function loadImage() {
            var clientname = $('#<%=lblclientname.ClientID %>').html();              // Pass the cm_id from Pms Record 
            var branchname = $('#<%=lblstorename.ClientID %>').html();               // Pass the BranchAlias Name 
            //var filename = $("#<%= txtCondimentID.ClientID %>").val();
            //var filename = $("#<%= txtCondimentDesc.ClientID %>").val();
            var filename = $('#<%=txtCondimentID.ClientID%>').val();

            filename = filename.toLowerCase().replaceAll(' ', '')
            console.log(clientname);
            console.log(branchname);
            console.log(filename);
            $.ajax({
                url: 'https://www.suntoyo.online/api/FileService/GetObject?fileName=' + filename + '.jpg&clientName=' + clientname + '&storeName=' + branchname + '/condiment',
                type: 'GET',
                mimeType: "multipart/form-data",
                async: true,
                success: function (data) {
                    console.log(data);
                    if (data != "") {
                        var dataUrl = "https://suntoyo-aws-s3.s3.ap-southeast-1.amazonaws.com/" + clientname + "/" + branchname + "/condiment/jpg/" + filename.toLowerCase().replaceAll(' ', '') + ".jpg";
                        var imgCondiment = document.createElement("img");
                        imgCondiment.id = "imgCondiment";
                        imgCondiment.src = dataUrl + "?nocache=" + Math.random();
                        imgCondiment.style = "width:100px; height:85px; margin-bottom: 20px;";
                        document.getElementById("divImage").appendChild(imgCondiment);
                    }
                },
                beforeSend: function (request) {
                    request.setRequestHeader("fileName", filename.toLowerCase().replaceAll(' ', ''));
                    request.setRequestHeader("clientName", clientname);
                    request.setRequestHeader("storeName", branchname);
                },
                cache: false,
                contentType: false,
                processData: false
            });
        }


        function uploadClick() {

            if ($('#fileUploadnew').val() == "") {
                alert("No file selected!");
                return false;
            }
            //else if ($('#<%=txtCondimentID.ClientID%>').val() == "") {
            //else if ($('#<%=txtCondimentDesc.ClientID%>').val() == "") {
            else if ($('#<%=txtCondimentID.ClientID%>').val() == "") {
                alert("Add Condiment First and Upload Image!");                
                return false;
            }

            // This Validation For Image size should not Exceed 200 Kb 
            if (fileUploadnew.files[0].size > 200000) {
                document.getElementById('dvMsg').style.display = "block";
                return false;
            }

            console.log(fileUploadnew.files[0].size);
            var fd = new FormData();
            fd.append("", fileUploadnew.files[0]);

            var clientname = $('#<%=lblclientname.ClientID %>').html();              // Pass the cm_id from Pms Record 
            var branchname = $('#<%=lblstorename.ClientID %>').html();               // Pass the BranchAlias Name 
            var filename = $("#<%= txtCondimentID.ClientID %>").val();               // Pass the Barcode 
            //var filename = $("#<%= txtCondimentDesc.ClientID %>").val();           // Pass the Barcode 

            console.log(clientname);
            console.log(branchname);
            console.log(filename);

            let imgCondiment = document.getElementById('imgCondiment')
            if (imgCondiment !== null) {
                imgCondiment.remove();
            }



            $.ajax({
                xhr: function () {
                    var xhr = new window.XMLHttpRequest();
                    xhr.upload.addEventListener("progress", function (evt) {
                        if (evt.lengthComputable) {
                            var percentComplete = ((evt.loaded / evt.total) * 100);
                            $(".progress-bar").width(percentComplete + '%');
                            $(".progress-bar").html(percentComplete + '%');
                        }
                    }, false);
                    return xhr;
                },
                url: 'https://www.suntoyo.online/api/FileService/Upload',
                //url: 'https://suntoyo-aws-s3.s3.ap-southeast-1.amazonaws.com/309/outlet1/category/jpg/medium.jpg',
                type: 'POST',
                mimeType: "multipart/form-data",
                data: fd,
                crossDomain: true,
                async: true,
                success: function (data) {
                    console.log("ajax");
                    var dataUrl = "https://suntoyo-aws-s3.s3.ap-southeast-1.amazonaws.com/" + clientname + "/" + branchname + "/condiment/jpg/" + filename.toLowerCase().replaceAll(' ', '') + ".jpg";
                    var imgCondiment = document.createElement("img");
                    imgCondiment.id = "imgCategory";
                    imgCondiment.src = dataUrl + "?nocache=" + Math.random();
                    imgCondiment.style = "width:100px; height:85px; margin-bottom: 20px;";
                    imgCondiment.alt = "no image";
                    document.getElementById("divImage").appendChild(imgCondiment);

                    $('#<%=lbldbpath.ClientID%>').html(data);
                    $("#hdnPath").val(data);
                },
                //error: function (data) {
                //    console.log(data);
                //},
                beforeSend: function (request) {

                    request.setRequestHeader("clientName", clientname);
                    request.setRequestHeader("fileName", filename.replaceAll(' ', ''));
                    request.setRequestHeader("branchName", branchname + "/condiment");
                    $(".progress-bar").width('0%');
                    $('#uploadStatus').html('<img src="images/loading.gif"/>');
                },
                cache: false,
                contentType: false,
                processData: false
            });
        }

        function DeleteS3Image() {
            var clientname = $('#<%=lblclientname.ClientID %>').html();              // Pass the cm_id from Pms Record 
            var branchname = $('#<%=lblstorename.ClientID %>').html();               // Pass the BranchAlias Name 
            var filename = $("#<%= txtCondimentID.ClientID %>").val();                   //  Pass the Barcode 
            //var filename = $("#<%= txtCondimentDesc.ClientID %>").val();                   //  Pass the Barcode 

            branchname = branchname + "/condiment";
            $.ajax({
                xhr: function () {
                    var xhr = new window.XMLHttpRequest();
                    xhr.upload.addEventListener("progress", function (evt) {
                        if (evt.lengthComputable) {
                            var percentComplete = ((evt.loaded / evt.total) * 100);
                            $(".progress-bar").width(percentComplete + '%');
                            $(".progress-bar").html(percentComplete + '%');
                        }
                    }, false);
                    return xhr;
                },

                url: 'https://www.suntoyo.online/api/FileService/Delete?fileName=' + filename.trim() + '.jpg&clientName=' + clientname + '&storeName=' + branchname,
                type: 'POST',
                mimeType: "multipart/form-data",
                //data: fd,
                crossDomain: true,
                success: function (data) {
                    $('#<%=lbldbpath.ClientID%>').html(data);
                    $("#hdnPath").val(data);
                    var imgCondiment = document.getElementById("imgCondiment");
                    imgCondiment.remove();
                },
                beforeSend: function (request) {
                    // request.setRequestHeader("clientName", clientname);
                    // request.setRequestHeader("fileName", filename.replaceAll(' ', ''));
                    // request.setRequestHeader("branchName", branchname + "/category");                 
                },
                cache: false,
                processData: false
            });
        }

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

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

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

            <div class="simple-card">
                <div class="card">
                    <h5 class="card-header" style="background-color: #4c4c4c; font-size: 14px; color: #F8F9FA">Condiment Group &nbsp;&nbsp;
                        <asp:Button ID="btnAddNew" OnClick="btnAddNew_Click" runat="server" class="btn btn-success"
                            Text="Add New" />
                        <button type="button" class="btn btn-warning" onclick="ShowModalCondimentGroupList()">
                            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 Group ID</label>
                            <asp:TextBox ID="txtCondimentGroupID" runat="server" class="form-control" ReadOnly="true"
                                Visible="false"> </asp:TextBox>
                        </div>

                        <div class="form-group">
                            <label for="inputText4" class="col-form-label">
                                Condiment Group Name</label>
                            <asp:TextBox ID="txtCondimentGroup" runat="server" class="form-control" MaxLength="42" onkeypress="return ValidateChar(event)"> </asp:TextBox><%--onkeypress="return isAlphaNumeric(event.keyCode);"--%>
                            <label for="inputText4" class="col-form-label">
                                Pre-set default quantity(Optional) 
                               <%-- <div style="font-size:12px;color:black;">Pre-set default quantity(optional)</div>--%>
                                <div style="font-size: 12px; color: black; max-width: 280px;">Condition applicatible to only group with only 1 condiment and mandatory setting under modifier setting</div>
                            </label>
                            <asp:TextBox ID="txtCondimentGroupDefaultQTY" runat="server" CssClass="form-control" Width="80px" MaxLength="2" TextMode="Number" min="0" Text="0">
                            </asp:TextBox>
                            <br />
                            <asp:CheckBox ID="chkoptional" runat="server" />
                            <label for="validationCustom03">
                                Optional(KIOSK)</label>&nbsp;&nbsp;&nbsp;
                        </div>
                        <asp:Button ID="btnSave" OnClick="btnSave_Click" runat="server" class="btn btn-primary"
                            Text="Save Condiment Group" />
                        <div class="simple-card" style="margin-top: 20px">
                            <div class="card">
                                <h5 class="card-header" style="background-color: #4c4c4c; font-size: 14px; color: #F8F9FA">Condiment List &nbsp;&nbsp;
                                   <asp:Button ID="btnClearCondiment" OnClick="btnClearCondiment_Click" runat="server" class="btn btn-success"
                                       Text="Add New" />
                                </h5>

                                <div class="card-body">
                                    <div class="form-group" style="display: none">
                                        <label for="inputText4" class="col-form-label" style="visibility: hidden;">
                                            Condiment ID
                                        </label>
                                        <asp:TextBox ID="txtCondimentID" runat="server" class="form-control" Visible="true"> </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" OnTextChanged="txtCondimentName_OnTextChanged" AutoPostBack="True" MaxLength="20" onkeypress="return ValidateChar(event)"> </asp:TextBox>
                                    </div>
                                    <div class="form-group">
                                        <label for="inputText4" class="col-form-label">
                                            Condiment Description</label>
                                        <div style="padding-top: 5px">
                                            <asp:TextBox ID="txtCondimentDesc" runat="server" class="form-control" MaxLength="40" onkeypress="return ValidateChar(event)"> </asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="from-group">


                                        <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">
                                                    Default QTY
                                                </label>
                                                <asp:TextBox ID="txtCondimentDefaultQTY" runat="server" class="form-control" AutoPostBack="True" TextMode="Number" min="0" Text="0" Width="80px"> </asp:TextBox>
                                            </div>

                                        </div>
                                        <div class="form-group">
                                            <div class="form-row">
                                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                    <asp:FileUpload ID="Fileploadid" class="form-control" runat="server" onchange="return validateFileSize();" Visible="false" />
                                                    <input type="file" id="fileUploadnew" accept=".jpg" />
                                                    <button id="btnUploadCondiment" type="button" value="Upload" onclick="uploadClick()">Upload</button>
                                                    <br />
                                                    * Only jpg and png Allowed upload                                                     
                                                            <div class="progress" style="margin: 10px; margin-left: -3px">
                                                                <div class="progress-bar"></div>
                                                            </div>

                                                    <br />
                                                    <asp:Label ID="lblImageError" runat="server" ForeColor="Gray"></asp:Label>
                                                    <div id="dvMsg" style="background-color: Red; color: White; width: 280px; padding: 2px; display: none;">
                                                        Image size Not Exceeds More than 200 KB
                                                    </div>
                                                </div>
                                                <%--<div  style="background: url(Request.Form[hdnurl].va); margin-left: 0px; width:100px; height:85px; background-size: cover; background-position: center; background-repeat: no-repeat;">--%>
                                                <div id="divImage">
                                                </div>
                                            </div>
                                            <div class="form-row">
                                                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                    <button type="button" class="btn btn-danger" onclick="DeleteS3Image()">Delete Image</button>
                                                </div>
                                            </div>
                                            <br />
                                            <br />

                                            <asp:Button ID="btnAddCondiment" OnClick="btnAddCondiment_Click" runat="server" class="btn btn-primary"
                                                Text="Save Condiment" />
                                            <br />
                                            <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! "
                                                                    FooterStyle-BackColor="Green" FooterStyle-ForeColor="white" AllowPaging="false"
                                                                    PageSize="150" BackColor="White" AllowSorting="true" BorderColor="#CCCCCC" BorderStyle="None"
                                                                    BorderWidth="1px" CellPadding="3" DataKeyNames="condimentid" OnRowCommand="grdCondimentList_OnRowCommand">
                                                                    <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="Default QTY" ItemStyle-Width="5%">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblDefaultQTY" runat="server" Text='<%#Eval("condimentdefaultqty") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Single Selection" ItemStyle-Width="15%">
                                                                            <ItemTemplate>
                                                                                <asp:CheckBox ID="chkSingleSelection" runat="server" Checked='<%#Convert.ToBoolean(Eval("singleselection")) %>' OnClick="if(!confirm('Are you sure you want to set this Condiment to Single Selection?'))return false;" OnCheckedChanged="chkSingleSelection_Changed" AutoPostBack="true"></asp:CheckBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Availability" ItemStyle-Width="15%">
                                                                            <ItemTemplate>
                                                                                <asp:CheckBox ID="chkAvailable" runat="server" Checked='<%#Convert.ToBoolean(Eval("Available")) %>' OnClick="if(!confirm('Are you sure you want to change this Condiment Availability?'))return false;" OnCheckedChanged="chkAvailable_Changed" AutoPostBack="true"></asp:CheckBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="SpecialCondiment" ItemStyle-Width="15%">
                                                                            <ItemTemplate>
                                                                                <asp:CheckBox ID="chkSpecialCondiment" runat="server" Checked='<%#Convert.ToBoolean(Eval("SpecialCondiment")) %>' OnClick="if(!confirm('Are you sure you want change Special Condiment Status?'))return false;" OnCheckedChanged="chkCondimentStatus_Changed" AutoPostBack="true"></asp:CheckBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Nosubcondiment " ItemStyle-Width="15%">
                                                                            <ItemTemplate>
                                                                                <asp:CheckBox ID="chknosubcondiment" runat="server" Checked='<%#Convert.ToBoolean(Eval("nosubcondiment")) %>' OnClick="if(!confirm('Are you sure you want change No Sin Condiment Status?'))return false;" OnCheckedChanged="chknosubcondiment_Changed" AutoPostBack="true"></asp:CheckBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Kitchen Flag" ItemStyle-Width="15%">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="linkCondimentKitchenFlag" runat="server" Font-Underline="true" ForeColor="Blue"
                                                                                    CommandName="ViewRow" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">View</asp:LinkButton>
                                                                                <%--<button style="text-decoration: underline; font-size: 12px; color: blue; border: none; background-color: transparent" onclick="ShowKitchenFlagModal();return false">View</button>--%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="" ItemStyle-Width="15%">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="linkCondimentEdit" runat="server" Font-Underline="true" ForeColor="Blue"
                                                                                    CommandName="EditRow" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="" ItemStyle-Width="15%">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="linkCondimentDelete" runat="server" Font-Underline="true" ForeColor="Blue" OnClientClick="return Confirm();"
                                                                                    CommandName="DeleteRow" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">Delete</asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Image Path" ItemStyle-Width="15%" Visible="false">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblImagePath" runat="server" Text='<%#Eval("ImagePath") %>'></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>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="modalCss" id="ModalCondimentGroupList">
                            <div class="modal-dialogCss">
                                <div class="modal-contentCss" style="width: 90%">
                                    <div class="modal-body" style="padding: 0px;">
                                        <div class="card">
                                            <h7 class="card-header" style="background-color: #4c4c4c; color: White;">SEARCH CONDIMENT GROUP
                                        <button type="button" id="Button2" class="close" style="color: White; opacity: 1;"
                                            onclick="CloseModalCondimentGroupList()">
                                            &times;</button></h7>
                                            <div class="card-body" style="width: 100%">
                                                <div class="row">
                                                    <div class="column">
                                                        <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">
                                                    </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="12px" 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" Width="75%" OnSelectedIndexChanged="OnSelectedIndexChangedGroup">
                                                                        <Columns>
                                                                            <asp:TemplateField HeaderText="" ItemStyle-Width="15%">
                                                                                <ItemTemplate>
                                                                                    <asp:LinkButton ID="hlinkEditGroup" Width="25px" runat="server" Font-Underline="true" ForeColor="Blue"
                                                                                        CommandName="Select" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>">Edit</asp:LinkButton>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>

                                                                            <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="Default QTY" ItemStyle-Width="15%">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblGCondimentDefaultQTY" runat="server" Text='<%#Eval("condimentgroupdefaultqty") %>'></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>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="KitchenFlagModal" class="KitchenFlagModalCss">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-body" style="padding: 0px;">
                                        <div class="card" style="box-shadow: none">
                                            <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14PX"><%--PRINTER--%>
                                                <asp:Label ID="modallblCondmentID" runat="server" Font-Size="Medium" ForeColor="White"></asp:Label>
                                                &nbsp&nbsp
                                            <asp:Label ID="modallblCondimentName" runat="server" Font-Size="Large" ForeColor="White"></asp:Label>
                                                <button type="button" class="close" style="color: White; opacity: 1;"
                                                    onclick="KitchenFlagModalClose()">
                                                    &times;</button>
                                            </h5>
                                            <div class="card-body">

                                                <br />
                                                <table>
                                                    <tbody>
                                                        <tr>
                                                            <td style="width: 0.5%"></td>
                                                            <td style="width: 2%"></td>
                                                        </tr>
                                                    </tbody>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkPrinterInven" runat="server" Visible="false" />
                                                            <span style="display: none">1: Inventory Flag ; 0:Category Flag</span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP19" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter19" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP18" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter18" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP17" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter17" runat="server"></asp:Label>

                                                            </span>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP16" runat="server" />
                                                            <span>

                                                                <asp:Label ID="lblLPrinter16" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP15" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter15" runat="server"></asp:Label>
                                                            </span>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP14" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter14" runat="server"></asp:Label>

                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP13" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter13" runat="server"></asp:Label>

                                                            </span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP12" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter12" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP11" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter11" runat="server"></asp:Label>
                                                            </span>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP10" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter10" runat="server"></asp:Label>

                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">

                                                            <asp:CheckBox ID="chkRP9" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter9" runat="server"></asp:Label></span>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP8" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter8" runat="server"></asp:Label></span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP7" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter7" runat="server"></asp:Label></span>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP6" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter6" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP5" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter5" runat="server"></asp:Label>
                                                            </span>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP4" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter4" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP3" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter3" runat="server"></asp:Label>
                                                            </span>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:CheckBox ID="chkRP2" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter2" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            <asp:CheckBox ID="chkRP1" runat="server" />
                                                            <span>
                                                                <asp:Label ID="lblLPrinter1" runat="server"></asp:Label>
                                                            </span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <%--<td>
                                                        <asp:Button ID="btnSavePrinter" OnClick="btnSavePrinter_Click" runat="server" class="btn btn-primary" Text="ADD PRINTER" Visible="true" />
                                                    </td>--%>
                                                        <td>
                                                            <asp:HiddenField ID="HideCatPrinter" runat="server" />
                                                            <asp:Label ID="lblmsgCate_Printer" runat="server" Text="Label" Visible="false"></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <asp:Button ID="btnSavePrinter" OnClick="btnSavePrinter_Click" runat="server" class="btn btn-primary" Text="Save" Visible="true" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div>
                            <h4>&nbsp;<asp:Label ID="lblGreeting" runat="server"></asp:Label></h4>
                        </div>
                    </div>
                    <div id="s3bucketParameters" runat="server">
                        <table style="display: none">
                            <tr>
                                <td>
                                    <asp:Label ID="lblclientname" runat="server"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblstorename" runat="server"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lbldbpath" runat="server"></asp:Label>
                                    <asp:HiddenField ID="hdnPath" runat="server" ClientIDMode="Static" />
                                    <asp:HiddenField ID="hdnurl" runat="server" ClientIDMode="Static" />
                                    <asp:HiddenField ID="hdnfileid" runat="server" ClientIDMode="Static" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

    <asp:UpdateProgress ID="UpdateProgress" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="overlay">
                <div class="LoadingDivCss">
                    <img alt="" src="IMG/Spinner.gif" class="LoadingImgCss" />
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
    <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" />


</asp:Content>
