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

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

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="PollListSearchUpdatePanel" runat="server">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">
               
                            <div class="dashBoardLeftCont" runat="server" id="ScreenGroupTableId">
                                <div class="himssuHeader3WireBox">
                                    <table>
                                        <tr>
                                            <td>
                                                <div class="himsBoxContent">
                                                    <div class="leftUlMenu">
                                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="114"
                                                            Visible="true" runat="server" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="whiteboxpaddingleft row">
                                <div class="himssuHeader1WireBox card card-box">
                                    <div class="himsBoxHeader card-head" id="Div4" runat="server" visible="True">
                                       
                                        <div class="himsBoxTitle">
                                            <div class="headerText fLeft">
                                                <header>
                                                <i class="fas fa-list-ul"></i>
                                                <asp:Label ID="Label4" Text="List"
                                                    runat="server" />
                                                </header>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent card-body">
                                        <asp:Panel ID="DetailPanel" runat="Server">
                                            <div class="contentHolder">
                                                <div class="himssuHeader6WireBox col-md-12">
                                                    <div class="himsBoxHeader card-head inner" id="ActivePollListGridViewPagerDiv" runat="server" visible="true">
                                                        
                                                        <div class="himsBoxTitle">
                                                            <div class="gridHeaderText ">
                                                                <header>
                                                                <asp:Label ID="Label1" Text="Active List" runat="server" />
                                                                </header>
                                                            </div>
                                                            </div>
                                                        </div>
                                                         <div class="himsBoxContent col-md-12 pb5">
                                                            <div class="fRight">
                                                                <uc1:GridViewPager ID="ActivePollListGridViewPager" ParentGridView="ActivePollListGridView"
                                                                    runat="server" OnFirstRecordClick="ActivePollListGridViewPager_FirstRecordClick" OnLastRecordClick="ActivePollListGridViewPager_LastRecordClick"
                                                                    OnNextRecordClick="ActivePollListGridViewPager_NextRecordClick" OnPrevRecordClick="ActivePollListGridViewPager_PrevRecordClick"
                                                                    OnTextBoxValueChange="ActivePollListGridViewPager_TextBoxValueChange" />
                                                            </div>
                                                        </div>
                                                    
                                                    <div class="himsBoxContent table-responsive col-md-12">
                                                        <asp:GridView runat="server" ID="ActivePollListGridView" AutoGenerateColumns="False"
                                                            EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="ActivePollListGridView_RowDataBound"
                                                            AllowPaging="True" PageSize="10" DataKeyNames="PollId" CssClass="table table-striped table-bordered table-hover"
                                                            ShowHeader="true" meta:resourcekey="ActivePollListGridViewResource1">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="Name" ItemStyle-Width="80%" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="ActiveTitleLinkButton" runat="server" Text='<%# Bind("PollTitle") %>'
                                                                            Width="100%" OnClick="ActiveTitleLinkButton_OnClick" Font-Underline="false"></asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Remark" ItemStyle-Width="0%" Visible="false" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="RemarkLabel" runat="server" Text='<%# Bind("PollRemark") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Posted on" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="PollCreatedDateTimeLabel" runat="server" Text='<%# Bind("PollCreatedDateTime","{0:dd/MM/yyyy}") %>' Width="110px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Votes" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="TotalPollVoteLabel" runat="server" Text='<%# Bind("TotalPollVote") %>' Width="75px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="IsOwnAnswer" ItemStyle-Width="0%" Visible="false" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="IsOwnAnswerLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsOwnAnswer").ToString().ToUpper()=="TRUE"?"Y":"N" %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                               
                                                <div class="himssuHeader6WireBox col-md-12">
                                                    <div class="himsBoxHeader card-head inner" id="ClosedPollListGridViewPagerDiv" runat="server" visible="true">
                                                        
                                                        <div class="himsBoxTitle">
                                                            <div class="gridHeaderText ">
                                                                <header>
                                                                <asp:Label ID="Label2" Text="Closed List" runat="server" />
                                                                </header>
                                                            </div>
                                                               </div>
                                                    </div>
                                                          
                                                     <div class="himsBoxContent col-md-12 pb5">
                                                           <div class="fRight">
                                                                <uc1:GridViewPager ID="ClosedPollListGridViewPager" ParentGridView="ClosedPollListGridView"
                                                                    runat="server" OnFirstRecordClick="ClosedPollListGridViewPager_FirstRecordClick" OnLastRecordClick="ClosedPollListGridViewPager_LastRecordClick"
                                                                    OnNextRecordClick="ClosedPollListGridViewPager_NextRecordClick" OnPrevRecordClick="ClosedPollListGridViewPager_PrevRecordClick"
                                                                    OnTextBoxValueChange="ClosedPollListGridViewPager_TextBoxValueChange" />
                                                            </div>
                                                     </div>
                                                    <div class="himsBoxContent col-md-12">
                                                        <asp:GridView runat="server" ID="ClosedPollListGridView" class="himssuHeader7WireBox col-md-12 table-responsive" AutoGenerateColumns="False" CssClass="table table-striped table-bordered"
                                                            EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="ClosedPollListGridView_RowDataBound"
                                                            AllowPaging="True" PageSize="10" DataKeyNames="PollId"
                                                            ShowHeader="true" meta:resourcekey="ClosedPollListGridViewResource1">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="Name" ItemStyle-Width="80%" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="ClosedTitleLinkButton" runat="server" Text='<%# Bind("PollTitle") %>'
                                                                            Width="100%" OnClick="ClosedTitleLinkButton_OnClick" Font-Underline="false"></asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Remark" ItemStyle-Width="0%" Visible="false" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="RemarkLabel" runat="server" Text='<%# Bind("PollRemark") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Posted on" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="PollCreatedDateTimeLabel" runat="server" Text='<%# Bind("PollCreatedDateTime","{0:dd/MM/yyyy}") %>' Width="110px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Votes" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="TotalPollVoteLabel" runat="server" Text='<%# Bind("TotalPollVote") %>' Width="75px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="IsOwnAnswer" ItemStyle-Width="0%" Visible="false" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="IsOwnAnswerLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsOwnAnswer").ToString().ToUpper()=="TRUE"?"Y":"N" %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                                
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </div>
                     
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
  <%--   <script data-main="../../JavaScript/rjs/encrypt/assign-organization-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
     <script type="text/javascript">
          function RedirectToNewMyCommunication(CommunicationURL) {
            var newTab = window.open(CommunicationURL, '_blank');
            // Redirect the current page with an absolute path
            window.location.href = '../../Pages/BaseFramework/MyDashBoard.aspx';
        }
      </script>
</asp:Content>