<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AnswerDetailSP.aspx.vb" Inherits="mobile_questionnaire_AnswerDeatilSP" MasterPageFile="~/mobile.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="msp_asp_cph1" Runat="Server">
    <style>
        table.sheet{
            font-size:10pt;
        }
        table.sheet td{
            border:solid 1px #727171;
        }
        table.list2{
            font-size:10pt;
        }
        table.list2 th{
            border:solid 1px #8d8c8c;
        }
        table.list2 tr td {
            border: solid 1px #727171;
            padding-top: 10px;
            padding-bottom: 10px;
            vertical-align: middle;
         }        
    </style>

    <%-- SqlDataSource Start --%>
    <asp:SqlDataSource ID="sql_質問回答" runat="server" /> 
    <asp:SqlDataSource ID="sql_選択肢" runat="server" /> 
    <asp:SqlDataSource ID="sql_二択回答" runat="server" />
    <%-- SqlDataSource End --%>

    <%-- ボタン --%>  
    <asp:Button ID="btn_戻る1" runat="server" Text="戻る" CssClass="buttonBig buttonBig-blue" Width="80px" Height="25px"  />
    &nbsp;
    <asp:Button ID="btn_回答1" runat="server" Text="回答" CssClass="buttonBig buttonBig-red" Width="80px" Height="25px"
         OnClientClick="if (Page_ClientValidate('chkAnswer')) { return confirm('回答してもよろしいですか？');}" />
    
    <div class="vertical_space"></div>
    
    <%-- 質問回答 Start --%>
    <asp:ListView ID="lsv_質問回答" DataSourceID="sql_質問回答" runat="server">
        <LayoutTemplate>            
            <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
        </LayoutTemplate>        
        <ItemTemplate>
            <%-- 講座情報 --%>
            <table class="adaptiveWidth500 sheet">
                <colgroup>
                    <col style="width:30%;"/>
                    <col style="width:70%;"/>
                </colgroup>
                <tr>
                    <td class="section">講座名</td>
                    <td class="detail">
                        <asp:Label ID="lbl講座名" Text='<%# Eval("講座名")%>' runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="section">主担当教員名</td>
                    <td class="detail">
                        <asp:Label ID="lbl講師名" Text='<%# Eval("講師名")%>' runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="section">回答日</td>
                    <td class="detail" colspan="3">
                        <asp:Label ID="Label1" Text='<%# Eval("回答日", "{0:yyyy/MM/dd HH:mm:ss}")%>' runat="server" />
                    </td>
                </tr>
            </table>
            <div class="vertical_space"></div>
            <%-- 質問一覧 --%>
            <table class="adaptiveWidth500 list2">
                <colgroup>                   
                    <col style="width:55%;"/>
                    <col style="width:45%;"/>
                </colgroup>
                <tr>
                    <th>質問</th>
                    <th>回答</th>
                </tr>
                <%-- Q1 --%>
                <tr id="row_1" runat="server">                    
                    <td>
                        <asp:Label ID="lbl_Q1" Text='<%# Eval("Q1")%>' runat="server" /> 
                        <%-- 非表示項目 --%>                        
                        <asp:Label ID="lbl_表示FLG_1" Text='<%# Eval("表示FLG_01")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A1" Text='<%# Eval("A1")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A1_二択" Text='<%# Eval("A1_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A1" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD"
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q1_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A1_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q1_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q2 --%>
                <tr id="row_2" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q2" Text='<%# Eval("Q2")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_2" Text='<%# Eval("表示FLG_02")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A2" Text='<%# Eval("A2")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A2_二択" Text='<%# Eval("A2_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A2" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q2_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A2_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q2_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q3 --%>
                <tr id="row_3" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q3" Text='<%# Eval("Q3")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_3" Text='<%# Eval("表示FLG_03")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A3" Text='<%# Eval("A3")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A3_二択" Text='<%# Eval("A3_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A3" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q3_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A3_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q3_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q4 --%>
                <tr id="row_4" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q4" Text='<%# Eval("Q4")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_4" Text='<%# Eval("表示FLG_04")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A4" Text='<%# Eval("A4")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A4_二択" Text='<%# Eval("A4_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A4" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q4_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A4_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q4_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q5 --%>
                <tr id="row_5" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q5" Text='<%# Eval("Q5")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_5" Text='<%# Eval("表示FLG_05")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A5" Text='<%# Eval("A5")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A5_二択" Text='<%# Eval("A5_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A5" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q5_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A5_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q5_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q6 --%>
                <tr id="row_6" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q6" Text='<%# Eval("Q6")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_6" Text='<%# Eval("表示FLG_06")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A6" Text='<%# Eval("A6")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A6_二択" Text='<%# Eval("A6_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A6" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q6_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A6_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q6_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q7 --%>
                <tr id="row_7" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q7" Text='<%# Eval("Q7")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_7" Text='<%# Eval("表示FLG_07")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A7" Text='<%# Eval("A7")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A7_二択" Text='<%# Eval("A7_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A7" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q7_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A7_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q7_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q8 --%>
                <tr id="row_8" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q8" Text='<%# Eval("Q8")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_8" Text='<%# Eval("表示FLG_08")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A8" Text='<%# Eval("A8")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A8_二択" Text='<%# Eval("A8_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A8" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q8_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A8_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q8_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q9 --%>
                <tr id="row_9" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q9" Text='<%# Eval("Q9")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_9" Text='<%# Eval("表示FLG_09")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A9" Text='<%# Eval("A9")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A9_二択" Text='<%# Eval("A9_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A9" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q9_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A9_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q9_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q10 --%>
                <tr id="row_10" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q10" Text='<%# Eval("Q10")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_10" Text='<%# Eval("表示FLG_10")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A10" Text='<%# Eval("A10")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A10_二択" Text='<%# Eval("A10_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A10" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q10_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A10_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q10_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q11 --%>
                <tr id="row_11" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q11" Text='<%# Eval("Q11")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_11" Text='<%# Eval("表示FLG_11")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A11" Text='<%# Eval("A11")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A11_二択" Text='<%# Eval("A11_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A11" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q11_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A11_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q11_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q12 --%>
                <tr id="row_12" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q12" Text='<%# Eval("Q12")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_12" Text='<%# Eval("表示FLG_12")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A12" Text='<%# Eval("A12")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A12_二択" Text='<%# Eval("A12_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A12" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q12_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A12_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q12_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q13 --%>
                <tr id="row_13" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q13" Text='<%# Eval("Q13")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_13" Text='<%# Eval("表示FLG_13")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A13" Text='<%# Eval("A13")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A13_二択" Text='<%# Eval("A13_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A13" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q13_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A13_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q13_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q14 --%>
                <tr id="row_14" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q14" Text='<%# Eval("Q14")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_14" Text='<%# Eval("表示FLG_14")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A14" Text='<%# Eval("A14")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A14_二択" Text='<%# Eval("A14_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A14" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q14_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A14_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q14_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
                <%-- Q15 --%>
                <tr id="row_15" style="vertical-align:middle;" runat="server">
                    <td>
                        <asp:Label ID="lbl_Q15" Text='<%# Eval("Q15")%>' runat="server" /> 
                        <%-- 非表示項目 --%>
                        <asp:Label ID="lbl_表示FLG_15" Text='<%# Eval("表示FLG_15")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A15" Text='<%# Eval("A15")%>' Visible="false" runat="server" />
                        <asp:Label ID="lbl_A15_二択" Text='<%# Eval("A15_二択")%>' Visible="false" runat="server" />
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rbtn_A15" DataSourceID="sql_選択肢" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# Not CType(Eval("Q15_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                        
                        <asp:RadioButtonList ID="rbtn_A15_二択" DataSourceID="sql_二択回答" DataTextField="回答" DataValueField="回答CD" 
                             RepeatLayout="Flow" Visible='<%# CType(Eval("Q15_二択FLG"), Boolean)%>' runat="server"></asp:RadioButtonList>
                    </td>
                </tr>
            </table>
            <%-- 備考 --%>
            <div class="adaptiveWidth500" style="margin-top:10px;margin-bottom:5px;font-weight:700;font-size:10pt;">
                <span>◆授業・教員について</span>
                <asp:TextBox ID="txt_備考" Text='<%# Eval("備考") %>' CssClass="input" Width="100%" TextMode="MultiLine" Rows="5" runat="server" />
                <asp:RegularExpressionValidator ID="rev備考" ControlToValidate="txt_備考" ErrorMessage="<br />165文字以上は入力できません"
                            ValidationExpression="(.|\n){1,165}" ValidationGroup="chkAnswer" runat="server" Display="Dynamic" />
            </div>
        </ItemTemplate>
        <EmptyDataTemplate>
            <asp:Label ID="lbl_empty" runat="server" class="accent" Text="質問がありません。" />
        </EmptyDataTemplate>
    </asp:ListView>
    <%-- 質問回答 End --%>

    <div class="vertical_space"></div>

    <%-- ボタン --%>
    <asp:Button ID="btn_戻る2" runat="server" Text="戻る" CssClass="buttonBig buttonBig-blue" Width="80px" Height="25px"  />
    &nbsp;
    <asp:Button ID="btn_回答2" runat="server" Text="回答" CssClass="buttonBig buttonBig-red" Width="80px" Height="25px" 
         OnClientClick="if (Page_ClientValidate('chkAnswer')) { return confirm('回答してもよろしいですか？');}" />
    
    <div class="vertical_space"></div>
</asp:Content>