<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Communication_PollList, 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">
                    <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="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="Poll List"
                                            runat="server" />
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27">
                                <asp:Button ID="ViewButton" runat="server" OnClick="ViewButton_Click" SkinID="0" Text="&#Xf06e; View" CssClass="btn btn-edit fas" />
                                <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0" class="btn btn-add fas" Text="&#xf067;  Add" />
                            </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 col-md-12">
                                            <asp:GridView runat="server" ID="ActivePollListGridView" class="himssuHeader7WireBox col-md-12 table-responsive" AutoGenerateColumns="False"
                                                EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="ActivePollListGridView_RowDataBound"
                                                AllowPaging="True" CssClass="table table-striped table-bordered" PageSize="10" DataKeyNames="PollId"
                                                ShowHeader="true" meta:resourcekey="ActivePollListGridViewResource1">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Name" ItemStyle-Width="50%" HeaderStyle-HorizontalAlign="Left" Visible="false">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="ActiveTitleLinkButton" runat="server" Text='<%# Bind("PollTitle") %>'
                                                                Width="555px" OnClick="ActiveTitleLinkButton_OnClick" Font-Underline="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Name" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("PollTitle") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Created By" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="CreatedByLabel" runat="server" Text='<%# Bind("CreatedBy") %>'></asp:Label>
                                                        </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="5%" 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="2%" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="TotalPollVoteLabel" runat="server" Text='<%# Bind("TotalPollVote") %>' Width="110px"></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="EditLinkButton_Click"
                                                                Text="Edit" CausesValidation="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="ActiveDeleteLinkButton" runat="server" CommandName="Select" OnClick="ActiveDeleteLinkButton_Click"
                                                                Text="Delete" CausesValidation="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="CloseLinkButton" runat="server" CommandName="Select" OnClick="CloseLinkButton_Click"
                                                                Text="Close" CausesValidation="false"></asp:LinkButton>
                                                        </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"
                                                EmptyDataText="No records available for the seacrh criteria!" CssClass="table table-striped table-bordered" OnRowDataBound="ClosedPollListGridView_RowDataBound"
                                                AllowPaging="True" PageSize="10" DataKeyNames="PollId"
                                                ShowHeader="true" meta:resourcekey="ClosedPollListGridViewResource1">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Name" ItemStyle-Width="60%" HeaderStyle-HorizontalAlign="Left" Visible="false">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="ClosedTitleLinkButton" runat="server" Text='<%# Bind("PollTitle") %>'
                                                                Width="665px" OnClick="ClosedTitleLinkButton_OnClick" Font-Underline="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Name" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>                                                           
                                                            <asp:LinkButton ID="NameLinkButton" runat="server" Text='<%# Bind("PollTitle") %>'
                                                                 OnClick="NameLinkButton_Click" Font-Underline="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Created By" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="CreatedByLabel" runat="server" Text='<%# Bind("CreatedBy") %>'></asp:Label>
                                                        </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="5%" 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="2%" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:Label ID="TotalPollVoteLabel" runat="server" Text='<%# Bind("TotalPollVote") %>' Width="110px"></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="ClosedDeleteLinkButton" runat="server" CommandName="Select" OnClick="ClosedDeleteLinkButton_Click"
                                                                Text="Delete" CausesValidation="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="OpenLinkButton" runat="server" CommandName="Select" OnClick="OpenLinkButton_Click"
                                                                Text="Open" CausesValidation="false"></asp:LinkButton>
                                                        </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>
                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="PollAnalysisReportLinkButton" runat="server" CommandName="Select" OnClick="PollAnalysisReportLinkButton_Click"
                                                                Text="Poll Analysis Report" CausesValidation="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </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>
</asp:Content>
