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

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="Date" %>
<%@ 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" %>
<%@ Register Src="~/UserControls/EExam/DataBankDetail.ascx" TagName="DataBankDetailControl"
    TagPrefix="DB" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <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="145"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <DB:DataBankDetailControl ID="DataBankDetailUserControl" runat="server" Visible="true" />
                    <div class="himssuHeader5WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="ClassLabel" runat="server" Text="Class Group" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                    onmouseleave="showHideTooltip()" class="form-control" onmouseenter="showHideTooltip()"
                                                    AutoPostBack="true" OnSelectedIndexChanged="ClassDropDownList_OnSelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SubjectLabel" runat="server" Text="Data Subject" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SubjectDropDownList" SkinID="CustomWidthDropDownList"
                                                    onmouseleave="showHideTooltip()" class="form-control" onmouseenter="showHideTooltip()"
                                                    AutoPostBack="true" OnSelectedIndexChanged="SubjectDropDownList_OnSelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="TopicLabel" runat="server" Text="Topic" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="TopicDropDownList" SkinID="CustomWidthDropDownList"
                                                    onmouseleave="showHideTooltip()" class="form-control" onmouseenter="showHideTooltip()"
                                                    AutoPostBack="false">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="DifficultyLevelLabel" runat="server" Text="Difficulty Level"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="DifficultyLevelDropDownList" SkinID="CustomWidthDropDownList"
                                                    onmouseleave="showHideTooltip()" class="form-control" onmouseenter="showHideTooltip()"
                                                    AutoPostBack="false">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3 pt-1">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label10" runat="server" Text="Question Type"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="QuestionTypeDropDownList" SkinID="CustomWidthDropDownList"
                                                    onmouseleave="showHideTooltip()" class="form-control" onmouseenter="showHideTooltip()"
                                                    AutoPostBack="true">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="fLeft pTop5">
                                                <asp:CheckBox ID="IsEditorWise" runat="server" Text="Editor Wise" />
                                            </div>
                                        </div>
                                        <div class="alignCenter col-md-12 pTop15 pb5">
                                            <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton_Click"
                                                Text="&#xf002; Search" SkinID="0" CssClass="btn-search btn fas" />
                                            <asp:Button ID="ResetButton" runat="server" OnClick="ResetButton_Click" Text="&#xf0e2; Reset" SkinID="0" CssClass="btn-reset btn fas" />
                                            <asp:Button ID="CreateNewButton" runat="server" Text="&#xf067; Create New" OnClick="CreateNewButton_Click"
                                                Visible="true" SkinID="0" CssClass="btn-add btn fas" />
                                            <asp:Button ID="CreateNewEditorButton" runat="server" Text="&#xf067; Create New With Editor"
                                                OnClick="CreateNewEditorButton_Click" Visible="true" SkinID="0" CssClass="btn-add btn fas" />
                                            <asp:Button ID="PrintButton" runat="server" Text="&#xf02f; Print" OnClientClick="openWindow();" SkinID="0" CssClass="btn-print btn fas" />
                                            <%-- <div id="WithAnsDiv" runat="server">--%>
                                            <asp:Label ID="IsKey" runat="server" Text="With Ans :" Font-Bold="true" SkinID="0"
                                                Visible="true"></asp:Label>
                                            <label class="rt-chkbox rt-chkbox-outline">
                                                <asp:CheckBox ID="IsKeyCheckBox" runat="server" Visible="true" SkinID="0" AutoPostBack="True"
                                                    OnCheckedChanged="IsKeyCheckBox_CheckedChanged" />
                                                <span></span>
                                            </label>
                                            <%-- </div>--%>
                                        </div>
                                        <div class="cBoth">
                                        </div>

                                    </asp:Panel>
                                    <div id="Div1" class="himssuHeader7WireBox box-body box-solid gridviewfont" runat="server"
                                        style="width: 100%; margin-right: 5px;">
                                        <div id="ReasonMasterDetailDiv" visible="false" runat="server">
                                            <div class="spacer">
                                                <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" />
                                            </div>
                                            <div class="himsBoxHeader" id="PatientRelationDiv" visible="false" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle" style="width: 99%">
                                                    <div class="col-md-2">
                                                        <asp:Label ID="RecordsPerPage" Text="Records per Page : " runat="server" />
                                                    </div>
                                                    <div class="col-md-3">
                                                        <asp:DropDownList ID="AddRowsToGridDropDownList" SkinID="CustomWidthDropDownList" Width="60px" runat="server"
                                                            AutoPostBack="true" OnSelectedIndexChanged="AddRowsToGridDropDownList_SelectedIndexChanged" class="form-control">
                                                            <asp:ListItem Text="10" Value="10" Selected="True"></asp:ListItem>
                                                            <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                            <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                            <asp:ListItem Text="100" Value="100"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="">
                                                        <uc1:GridViewPager ID="QuestionListGridView_GridViewPager" runat="server" OnFirstRecordClick="QuestionListGridView_GridViewPager_FirstRecordClick"
                                                            OnLastRecordClick="QuestionListGridView_GridViewPager_LastRecordClick" OnNextRecordClick="QuestionListGridView_GridViewPager_NextRecordClick"
                                                            OnPrevRecordClick="QuestionListGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="QuestionListGridView_GridViewPager_TextBoxValueChange"
                                                            ParentGridView="QuestionListGridView" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                            <asp:GridView ID="QuestionListGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                OnRowDataBound="QuestionListGridView_RowDataBound" OnPageIndexChanging="QuestionListGridView_PageIndexChanging"
                                                                CssClass="table table-striped table-bordered table-hover" AllowPaging="true" PageSize="10"
                                                                SkinID="" ShowHeader="true" PagerSettings-Visible="false" DataKeyNames="QuestionId,QuestionTypeId">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Que.No." ItemStyle-Width="5%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="QuenoLabel" CssClass="boxEllips" runat="server" Text='<%# Bind("OrderIndex") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Question Description" ItemStyle-Width="30%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <%--<CKEditor:CKEditorControl Text='<%# Bind("QuestionDescription") %>' ID="QuestionDescription1" BasePath="~/ckeditor/" runat="server" Height="70px"></CKEditor:CKEditorControl>--%>
                                                                            <asp:Label ID="QuestionDescription" CssClass="boxEllips" runat="server" Text='<%# Bind("QuestionDescription") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Question Description" ItemStyle-Width="30%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <CKEditor:CKEditorControl Text='<%# Bind("QuestionDescription") %>' ID="QuestionDescription1" BasePath="~/ckeditor/" runat="server" Height="70px" Enabled="false" RemovePlugins="toolbar"></CKEditor:CKEditorControl>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Marks" ItemStyle-Width="5%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="Marks" runat="server" Text='<%# Bind("Marks") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Difficulty Level" ItemStyle-Width="7%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="DifficultyLevelLabel" runat="server" Text='<%# Bind("DifficultyLevel") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="In Active" ItemStyle-Width="5%" SortExpression="IsObsolete"
                                                                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="IsObsoleteLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsObsolete").ToString().ToUpper()=="TRUE"?"Y":"N" %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Question Type" ItemStyle-Width="7%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="QuestionTypeTitleLabel" runat="server" Text='<%# Bind("QuestionTypeTitle") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="With Para" ItemStyle-Width="7%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="WithParaLabel" runat="server" Text='<%# Bind("WithPara") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="View" ItemStyle-Width="5%" SortExpression="View" HeaderStyle-HorizontalAlign="Center"
                                                                        ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="ViewLinkButton" runat="server" CommandName="Select" OnClick="ViewLinkButton_Click"
                                                                                Text="View" CausesValidation="false"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Edit" ItemStyle-Width="5%" SortExpression="View"
                                                                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="EditLinkButton_Click"
                                                                                Text="Edit" CausesValidation="false"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="QuestionType" ItemStyle-Width="2%" SortExpression="Title"
                                                                        ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" Visible="false">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="QuestionTypeLabel" runat="server" Text='<%# Bind("QuestionTypeId") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%-- <script data-main="../../JavaScript/rjs/encrypt/question-list-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/question-list")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function openWindow() {
            var browser = navigator.appName;
            if (browser == "Microsoft Internet Explorer") {
                window.opener = self;
            }

            window.open('PreviewQuestion.aspx', '', 'width=1004,height=600,toolbar=no,status=1,scrollbars=no,location=no,resizable =yes');
            window.moveTo(0, 0);
            window.resizeTo(screen.availWidth, screen.availHeight);
        }
    </script>
</asp:Content>
