<%@ Page Title="" Language="C#" MasterPageFile="~/masterpages/eDashboard.master"
    AutoEventWireup="true" CodeBehind="QuestionDetail.aspx.cs" Inherits="WebSite.site.Administrative.OnlineClaimsConfig.QuestionDetail" %>

<%@ Register Src="~/Controls/ScriptingHelper.ascx" TagName="ScriptingHelper" TagPrefix="uc" %>
<%@ Register Src="~/Controls/DefaultHeader.ascx" TagName="DefaultHeader" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="server">
    <script src="../../../script/eSetFormControls.js" type="text/javascript"></script>
    <uc:ScriptingHelper ID="ScriptingHelper1" runat="server" />
    <div class="mastersearch">
        <table cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td align="left">
                    <h1>
                        <asp:Label ID="lblProgramFlowQuestion" Font-Bold="false" runat="server" Text="Program Flow Question Detail:"></asp:Label>
                        <asp:Label ID="lblProgramFlowName" runat="server" Font-Bold="false"></asp:Label>
                    </h1>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <table cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td align="right">
                    &nbsp;
                </td>
                <td align="right">
                    <asp:LinkButton ID="lnkReturn" runat="server" OnClick="lnkReturn_Click" CausesValidation="false">Return</asp:LinkButton>
                </td>
            </tr>
        </table>
    </div>
    <asp:Panel ID="pnlQuestionDetails" runat="server" Visible="False">
        <div class="greyblock">
            <table style="width: 99%">
                <tr align="left">
                    <td style="height: 29px; text-align: center">
                        <asp:Label ID="lblMsg" runat="server" ForeColor="#B90000"></asp:Label>
                    </td>
                    <td align="right" bgcolor="#D5DCE8" rowspan="4" style="text-align: center" valign="top">
                        <asp:TreeView ID="treeViewQuestions" runat="server" ImageSet="Arrows" NodeWrap="True">
                            <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
                            <NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
                                NodeSpacing="0px" VerticalPadding="0px" />
                            <ParentNodeStyle Font-Bold="False" />
                            <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
                                VerticalPadding="0px" />
                        </asp:TreeView>
                    </td>
                </tr>
                <tr align="left">
                    <td style="height: 29px; text-align: center">
                        <asp:Label ID="lblQuestionDetails" runat="server" Font-Size="Medium">Question Details:</asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <table>
                            <tr>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblComponentName" runat="server" Text="Question Text:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlQuestionsEdit" runat="server" Width="354px">
                                    </asp:DropDownList>
                                    <asp:Button ID="btnAddNewText" runat="server" OnClick="btnAddNewText_Click" Text="Add New Text"
                                        CausesValidation="False" />
                                </td>
                            </tr>
                            <tr id="trNewText" runat="server" visible="false">
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="txtnewQuestion" runat="server" Width="340px"></asp:TextBox>
                                                <asp:Button ID="btnSaveText0" runat="server" Text="Save Text" CausesValidation="False"
                                                    OnClick="btnSaveText_Click" />
                                                <asp:Button ID="btnCancelNewText" runat="server" OnClick="btnCancelNewText_Click"
                                                    Text="Cancel" CausesValidation="False" />
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblComponentDescription" runat="server" Text="Display Order:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDisplayOrderEdit" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvDisplayOrder" runat="server" ControlToValidate="txtDisplayOrderEdit"
                                        ErrorMessage="Required" ForeColor="#990000">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblComponentDescription0" runat="server" Text="Display Type:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDisplayTypeEdit" runat="server" Height="25px" Width="352px"
                                        AutoPostBack="True" OnSelectedIndexChanged="ddlDisplayTypeEdit_SelectedIndexChanged">
                                        <asp:ListItem Value="eSecuritelTextBox">eSecuritelTextBox</asp:ListItem>
                                        <asp:ListItem Value="eSecuritelSummary">eSecuritelSummary</asp:ListItem>
                                        <asp:ListItem Value="eSecuritelCalendar">eSecuritelCalendar</asp:ListItem>
                                        <asp:ListItem Value="eSecuritelRadioButtonListTop" Selected="True">eSecuritelRadioButtonListTop</asp:ListItem>
                                        <asp:ListItem Value="eSecuritelInformation">eSecuritelInformation</asp:ListItem>
                                        <asp:ListItem Value="eCreditCardPayment">eCreditCardPayment</asp:ListItem>
                                        <asp:ListItem Value="eSecuritelCheckBoxList">eSecuritelCheckBoxList</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 23px">
                                    <asp:Label ID="lblComponentDescription1" runat="server" Text="Is Required:"></asp:Label>
                                </td>
                                <td align="right" style="height: 23px">
                                    &nbsp;
                                </td>
                                <td align="left" style="height: 23px">
                                    <asp:CheckBox ID="chkIsRequiredEdit" runat="server" />
                                </td>
                            </tr>
                            <tr runat="server" id="trDataType" visible="true">
                                <td align="right">
                                    <asp:Label ID="lblDataTypeEdit" runat="server" Text="Data Types:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDataTypeEdit" runat="server" Height="25px" Width="168px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblActiveEdit" runat="server" Text="Active:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:CheckBox ID="chkActiveEdit" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td align="left">
                                    <asp:Button ID="btnCancel" runat="server" ForeColor="Black" Text="Cancel" Width="147px"
                                        OnClick="btnCancel_Click" CausesValidation="False" />
                                    <asp:Button ID="btnSaveQuestion" runat="server" ForeColor="Black" Text="Save" Width="147px"
                                        OnClick="btnSaveQuestion_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <asp:Panel ID="pnlQuestionDetailsView" runat="server">
        <div class="greyblock">
            <table width="100%">
                <tr>
                    <td>
                        <asp:Label ID="lblQuestionDetails0" runat="server" Font-Size="Medium"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <table>
                            <tr>
                                <td colspan="3">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblQtext" runat="server" Text="Question Text:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtQuestionView" runat="server" Enabled="False" Font-Bold="True"
                                        TextMode="MultiLine" Width="594px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblDisplayOrder" runat="server" Text="Display Order:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblDisplayOrderView" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblDisplayType" runat="server" Text="Display Type:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblDisplayTypeView" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblIsRequired" runat="server" Text="Is Required:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:CheckBox ID="chkIsRequiredView" runat="server" />
                                </td>
                            </tr>
                            <tr id="trDataTypeView" runat="server" visible="true">
                                <td align="right">
                                    <asp:Label ID="lblDataTypeText" runat="server" Text="Data Type:"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblDataTypeView" runat="server"></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td align="left">
                                    <asp:Button ID="btnEdit" runat="server" ForeColor="Black" Text="Edit" Width="147px"
                                        OnClick="btnEdit_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <div class="mastersearch">
        <table cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td align="left">
                    <h1>
                        <asp:Label ID="Label1" runat="server" Font-Size="Medium">Question Answers:</asp:Label>
                    </h1>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <table cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td align="right">
                    <asp:Button ID="btnAnswer" runat="server" Height="27px" Text="Add New Answer" Width="163px"
                        OnClick="btnAnswer_Click" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:GridView ID="grdQuestionAnswres" runat="server" GridLines="None" Width="100%"
                        AutoGenerateColumns="False" DataKeyNames="AnswerId" OnRowDataBound="grdQuestionAnswres_RowDataBound">
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <Columns>
                            <asp:TemplateField ItemStyle-Width="12%" ItemStyle-Height="25px" 
                                HeaderText="Answer">
                                <HeaderTemplate>
                                    <asp:Literal runat="server" ID="m_litAnswerColumnHeader"></asp:Literal>
                                    <br />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:HyperLink ID="m_hlkAnswer" runat="server"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle Height="25px" Width="12%" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="AnswerId" HeaderText="Answer Id" Visible="False" />
                            <asp:BoundField DataField="NextProgramComponentFlowId" HeaderText="Next Flow Id" />
                            <asp:TemplateField HeaderText="ResourceId" Visible="False">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("ResourceId") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Answer">
                                <ItemTemplate>
                                    <asp:Label ID="lblAnswer" runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="NextFlowQuestionId" HeaderText="NextQuestionId" />
                            <asp:BoundField DataField="DisplayOrder" HeaderText="Display Order" />
                            <asp:BoundField DataField="ActionCode" HeaderText="ActionCode" />
                        </Columns>
                        <EditRowStyle BackColor="#999999" />
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Left" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Left"  />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <asp:Panel ID="Panel1" runat="server">
        <div class="mastersearch">
            <table cellspacing="0" cellpadding="0" width="100%" style="height: 14px">
                <tr>
                    <td align="left">
                        <h1>
                            <asp:Label ID="lblQuestionRules" runat="server" Font-Size="Medium">Question Rules:</asp:Label>
                        </h1>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table cellspacing="0" cellpadding="0" width="100%" style="height: 46px">
                <tr>
                    <td align="right" colspan="2">
                        <asp:Button ID="btnAddNewRule" runat="server" Height="27px" Text="Add New Rule" Width="163px"
                            OnClick="btnAddNewRule_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table width="100%">
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr id="trRules" runat="server" visible="false">
                    <td>
                        <table cellpadding="0" cellspacing="0" width="100%" style="height: 139px">
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:GridView ID="grdQuestionRules" runat="server" Width="100%" OnRowDataBound="grdQuestionRules_RowDataBound"
                                        AutoGenerateColumns="False" DataKeyNames="RuleDataId">
                                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="Rule Type">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblRuleType" runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Operator">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblOperator" runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="ValueToCompare" HeaderText="Value To Compare" />
                                            <asp:BoundField DataField="MaximumValue" HeaderText="Maximum Value" />
                                            <asp:BoundField DataField="MinimumValue" HeaderText="Minimun Value" />
                                            <asp:BoundField DataField="ValidationExpression" HeaderText="Validation Expression" />
                                        </Columns>
                                        <EditRowStyle BackColor="#999999" />
                                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                    </asp:GridView>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td class="style15">
                                    &nbsp;
                                </td>
                                <td align="center" class="style6" colspan="3">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</asp:Content>
