<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Communication_PlaylistMaster, App_Web_sqnaqmtm" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims1" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims2" %>



<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="OTQueueListingUpdatePanel" runat="server">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <hims1:EmployeeSearchControl ID="EmployeeSearch1" Visible="false" runat="server" />
            <hims2:EmployeeSearchControl ID="EmployeeSearch2" Visible="false" runat="server" />
            <asp:HiddenField ID="ButtonIdHiddenField" runat="server" />
            <asp:HiddenField ID="IndexHiddenField" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">
                
                            <div class="dashBoardLeftCont">
                                <div class="himssuHeader3WireBox">
                                    <table>
                                        <tr>
                                            <td>
                                                <div class="himsBoxContent">
                                                    <div class="leftUlMenu">
                                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="157"
                                                            Visible="true" runat="server" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="whiteboxpaddingleft row">
                            
                                <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                                    <div class="himsBoxHeader card-head">
                                        <asp:Panel ID="Panel1" runat="server">
                                            <div class="leftdiv">
                                            </div>
                                            <div class="himsBoxTitle">
                                                <div class="headerText">
                                                     <header>
                                                        <i class="fas fa-search"></i>
                                                    <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                                         </header>
                                                </div>
                                                <div class="fRight" style="margin-top: -32px">
                                                    <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0"
                                                        CssClass="btn btn-add fas" Text="&#xf067; Add" />
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="himsBoxContent card-body">
                                        <asp:Panel ID="DetailPanel1" runat="Server">
                                            <div class="contentHolder">
                                                
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="TitleLabel" Text="Title" runat="server"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SearchTitleTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" Width="150px" onmouseenter="showHideTooltip()"></asp:TextBox>
                                                    </div>
                                                </div>
                                               <%-- <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchTitleLabel" runat="server" Text="Name"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SearchTitleTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" Width="150px" onmouseenter="showHideTooltip()" MaxLength="100"></asp:TextBox>
                                                    </div>
                                                </div>--%>
                                             <%--   <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchRouteNumberLabel" Text="Route Number" runat="server"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SearchRouteNumberTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                            Width="150px" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)" onblur="return isNumberKey(event)"></asp:TextBox>
                                                    </div>
                                                </div>
                                               --%>
                                                <div class="alignCenter col-md-12 middle pTop5">
                                                    <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" 
                                                        SkinID="0" CssClass="btn-search btn fas" OnClick="SearchButton_Click"/>
                                                    <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset"  SkinID="0"  CssClass="btn-reset btn fas" OnClick="ResetButton_Click"/>
                                                    <asp:Button ID="SearchPrintButton" runat="server" SkinID="0" Text="&#xf15b; Print" class="form-control"  CssClass="btn btn-report fas"/>
                                                </div>

                                                <div id="Div2" class="himssuHeader7WireBox col-md-12" runat="server">
                                                    <div id="PlaylistMasterListDetailDiv" runat="server" visible="false">
                                                        
                                                        <div class="himsBoxHeader" id="PlaylistMasterListDiv" visible="false" runat="server">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle">
                                                                <divclass="fRight">
                                                                    
                                                                     <uc1:GridViewPager ID="PlaylistMasterGridViewPager" runat="server" ParentGridView="PlaylistMasterGridView"
                                                                        OnFirstRecordClick="PlaylistMasterGridViewPager_FirstRecordClick" OnLastRecordClick="PlaylistMasterGridViewPager_LastRecordClick"
                                                                        OnNextRecordClick="PlaylistMasterGridViewPager_NextRecordClick" OnPrevRecordClick="PlaylistMasterGridViewPager_PrevRecordClick"
                                                                        OnTextBoxValueChange="PlaylistMasterGridViewPager_TextBoxValueChange" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="himsBoxContent card-body" style="padding-bottom:0px">
                                                            <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                                <asp:GridView ID="PlaylistMasterGridView" runat="server" AutoGenerateColumns="False"
                                                                    AllowPaging="true" PageSize="10" SkinID="" PagerSettings-Visible="false" EmptyDataText="No Records Found !!"
                                                                    CssClass="table table-striped table-bordered table-hover" DataKeyNames="Id" OnRowDataBound="PlaylistMasterGridView_RowDataBound"
                                                                    >
                                                                    <Columns>
                                                                       <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                            HeaderStyle-HorizontalAlign="Center">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="SelectLinkButton" runat="server" CommandName="Select" OnClick="SelectLinkButton_Click"
                                                                                    Text='Select' CausesValidation="false"></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                       <%-- <asp:BoundField DataField="RouteCode" HeaderText="Route Code" ItemStyle-Width="10%" />
                                                                        <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                            HeaderText="Route Number">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="RouteNumberLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"RouteNumber").ToString()=="0"?"":DataBinder.Eval(Container.DataItem,"RouteNumber") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>--%>
                                                                        <asp:BoundField DataField="Title" HeaderText="Title" ItemStyle-Width="10%" />
                                                                        <asp:BoundField DataField="OrderIndex" HeaderText="Order Index" ItemStyle-Width="10%" />
                                                                        <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="40%" />
                                                                        <asp:TemplateField HeaderText="InActive" ItemStyle-Width="5%" SortExpression="IsObsolete"
                                                                            HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="ObsoleteLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsObsolete").ToString().ToUpper()=="TRUE"?"Y":"N" %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="CreatedUserName" HeaderText="Created User Name" ItemStyle-Width="10%" />
                                                                         <asp:BoundField DataField="CreatedDateTime" HeaderText="Created Date Time" ItemStyle-Width="15%" />
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                                <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                                    <div class="himssuHeader1WireBox card card-box  ">
                                        <div class="himsBoxHeader card-head">
                                            <div class="leftdiv">
                                            </div>
                                            <div class="himsBoxTitle">
                                                <div class="headerText">
                                                    <header>
                                                        <i class="fas fa-tasks"></i>
                                                    <asp:Label ID="Label1" runat="server" Text="Playlist Master "></asp:Label>
                                                    </header>
                                                </div>
                                            </div>
                                            <div class="fRight mt-27 pagination display-flex" style="margin-top: -32px">
                                               
                                                            <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                                                <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                                    runat="server" ImageUrl="~/Images/arrowLlast.gif" CommandName="Page" CommandArgument="First" OnClick="FirstRecordImageButton_Click"
                                                                    CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                     <i class="fa fa-fast-backward"></i>
                                                                </asp:LinkButton>
                                                                <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                                                    runat="server" ImageUrl="~/Images/arrowLeft.gif" CommandName="Page" CommandArgument="Prev" OnClick="PreviousImageButton_Click"
                                                                    CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                    <i class="fa fa-play fa-rotate-180"></i>
                                                                </asp:LinkButton>
                                                                
                                                                <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                                               &nbsp; <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                                              &nbsp;  <asp:Label ID="ofLabel" Text="of" runat="server" />
                                                               &nbsp; <asp:Label ID="TotalRecord" runat="server" />
                                                                &nbsp;
                                                                <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButton" OnClick="NextImageButton_Click"
                                                                    runat="server" ImageUrl="~/Images/arrowRight.gif" CommandName="Page" CommandArgument="Next"
                                                                    CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                     <i class="fa fa-play"></i>
                                                                </asp:LinkButton>
                                                                <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                                    runat="server" ImageUrl="~/Images/arrowRLast.gif" CommandName="Page" CommandArgument="Last" OnClick="LastRecordImageButton_Click"
                                                                    CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                     <i class="fa fa-fast-forward"></i>
                                                                </asp:LinkButton>
                                                            </div>
                                                      
                                                            &nbsp;&nbsp;<asp:Button ID="BackButton" runat="Server"  SkinID="0" OnClick="BackButton_Click"
                                                                CssClass="btn btn-back fas" Text="&#xf30a; Back" />
                                                    
                                            </div>
                                        </div>

                                        <div class="himsBoxContent card-body" style="padding-bottom:0px">
                                            <asp:Panel ID="DetailPanel" runat="Server">
                                                <div class="contentHolder">
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="RouteCodeLabel" Text="Title" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="TitleTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" CssClass="form-control" onmouseenter="showHideTooltip()"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="OrderIndexLabel" Text="Order Index" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="OrderIndexTextBox" runat="server" onmouseleave="showHideTooltip()" OnTextChanged="OrderIndexTextBox_TextChanged" AutoPostBack="true"
                                                             onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)" onblur="return isNumberKey(event)"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                  
                                                     <div class="outerBox11 pTop5 col-md-4">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="RemarkLabel" runat="server" Text="Remark"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="RemarkTextBox" onmouseleave="showHideTooltip()" SkinID="MultiLineTextbox"
                                                                TextMode="MultiLine" runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="cBoth"></div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="fLeft">
                                                            <asp:CheckBox ID="IsObseleteCheckBox" runat="server" Text="InActive"></asp:CheckBox>
                                                        </div>
                                                    </div>
                                                    <div class="cBoth"></div>
                                                      <div class="outerBox pTop5 col-md-3" id="divTemplate" runat="server" visible="true">
                                                    <div class="controlLabelWidth">
                                                        <asp:HyperLink ID="HyperLink1" runat="server" Text="&#xf101; Download Template" NavigateUrl="~/ContentTemplates/Import/Playlist_Import_Template.xls" CssClass="pointer fas"></asp:HyperLink>
                                                        <asp:HyperLink ID="HyperLink2" runat="server" Text="&#xf101; Download Template" NavigateUrl="~/ContentTemplates/Import/Playlist_Import_Template.csv" Visible="false" CssClass="pointer fas"></asp:HyperLink>
                                                    </div>
                                                 </div>     
                                                  <div class="outerBox pTop5 col-md-3" id="divFileUpload" runat="server" visible="true">
                                                    <div class="controlLabelWidth">
                                                        <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                                            <i class="fa fa-arrow-down"></i>Browse</a>
                                                        <asp:FileUpload ID="flUpload" runat="server" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />
                                                          <asp:Button ID="ImportFromExcelButton" runat="server" Text="&#xf019; Import From Excel"
                                                           SkinID="0" CssClass="fas btn btn-examcommon" OnClick="ImportFromExcelButton_Click" />
                                                    </div>
                                                    <asp:Label ID="Label4" runat="server" Text="" Style="padding-left: 10px; font-size: medium;"></asp:Label>
                                                        <asp:Label ID="SuccessMsg" runat="server" ></asp:Label>
                                                      
                                                 </div>
                                                     <div style="float:right">
                                                                <asp:Button ID="AddButton" runat="server" CssClass="btn btn-add fas" Text="&#xf067; Add" OnClick="AddButton_Click" SkinID="0" />
                                                     </div>
                                                            <div class="col-md-1 pTop5" style="float:right">
                                                                <asp:DropDownList ID="AddRowsToGridDropDownList" SkinID="CustomWidthDropDownList"
                                                                    CssClass="form-control" runat="server" AutoPostBack="false">
                                                                    <asp:ListItem Text="1" Value="0" Selected="True"></asp:ListItem>
                                                                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                                    <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                                </asp:DropDownList>
                                                    </div>

                                                    <div id="SupervisorDiv" class="himssuHeader6WireBox col-md-12" runat="server" visible="true">
                                                    <div class="cBoth"></div>
                                                         <div id="Div1" class="himssuHeader6WireBox col-md-12" runat="server" visible="true">
                                                            <div class="himsBoxHeader card-head inner" id="PatientRelationDiv" runat="server">
                                                            <div class="gridHeaderText">
                                                                <header>
                                                                        <asp:Label ID="BusRouteMasterHeadLabel" runat="server" Text="Play List"></asp:Label>
                                                                </header>
                                                            </div>
                                                            </div>
                                                            <asp:HiddenField ID="PlayistIdHiddenField" runat="server" />
                                                             <asp:HiddenField ID="AutoIdHiddenField" runat="server" />
                                                         <%--   <asp:HiddenField ID="DestinationHiddenField" runat="server" />--%>
                                                            <div class="himsBoxContent card-body">
                                                                <asp:GridView ID="PlayListDetailMasterGridView" runat="server" class="himssuHeader7WireBox col-md-12 table-responsive"
                                                                    AutoGenerateColumns="False" EmptyDataText="No Records Found !!" AllowPaging="false" DataKeyNames="Id,Index"  OnRowDataBound="PlayListDetailMasterGridView_RowDataBound"
                                                                    CssClass="table table-striped table-bordered table-hover" ShowHeader="True" OnRowDeleting="ImmunizationChartGridView_RowDeleting">
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="Title" ItemStyle-Width="15%" ItemStyle-Wrap="true"
                                                                            HeaderStyle-HorizontalAlign="Left" >
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="PlaylistTitleTextBox" runat="server" Text='<%# Bind("Title") %>'  OnTextChanged = "OnTitleTextChanged" AutoPostBack="true"
                                                                                    Width="100%"></asp:TextBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Order Index" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                            HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <%--Removed OnTextChanged attribute for mantis : 30836--%>
                                                                                <asp:TextBox ID="PlaylistOrderIndexTextBox" runat="server" Text='<%# Bind("OrderIndex") %>' 
                                                                                    Width="100%" AutoPostBack="true"></asp:TextBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                         <asp:TemplateField HeaderText="Remark" ItemStyle-Width="40%" ItemStyle-Wrap="true"
                                                                            HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="PlaylistRemarkTextBox" runat="server" Text='<%# Bind("Remark") %>' TextMode="MultiLine"
                                                                                    Width="100%"></asp:TextBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="URL" ItemStyle-Width="25%" ItemStyle-Wrap="true"
                                                                            HeaderStyle-HorizontalAlign="Left">
                                                                                <ItemTemplate>
                                                                                <asp:TextBox ID="PlaylistUrlTextBox" runat="server" Text='<%# Bind("URL") %>'
                                                                                    Width="100%"></asp:TextBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="In Active" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                            HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <ItemTemplate>
                                                                              <label class="rt-chkbox rt-chkbox-outline">
                                                                               <asp:CheckBox ID="PlaylistIsObsoleteCheckBox" runat="server" Checked='<%# Bind("IsObsolete") %>' />
                                                                              <span></span>
                                                                            </label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField ShowHeader="true" HeaderText="Delete">
                                                                            <ItemTemplate>
                                                                                <asp:ImageButton SkinID="DeleteImage" ID="DeleteImageButton" runat="server"  OnClick="DeleteImageButton_Click"
                                                                                    ImageUrl="~/Images/icons/icon_delete.gif" ToolTip="Delete" />
                                                                            </ItemTemplate>
                                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                    <PagerSettings Visible="False" />
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    </div>
                                </div>
                               
                            </div>
                        </tr>
                    </table>
                </div>
            </div>
         
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/bus-route-master-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/bus-route-master")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
