<%@ Page Language="c#" CodeBehind="StuReply.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.Affairs.StuReply"
    Title="正式学员回访-教务" %>

<%@ Import Namespace="MTCUN" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript">
        function OpenClass() {
            if (setContent2.style.display == 'none') {
                setContent2.style.display = 'block';
                setControl2.innerHTML = '▲详情';
                __mt__setClassCookie(1);
            }
            else {
                setContent2.style.display = 'none';
                setControl2.innerHTML = '▼详情';
                __mt__setClassCookie(0);
            }
        }

        function defaultClassState() {
            var num = __mt__getClassCookie();
            if (num == 1) {
                setContent2.style.display = 'block';
                setControl2.innerHTML = '▲详情';
            }
            else {
                setContent2.style.display = 'none';
                setControl2.innerHTML = '▼详情';
            }
        }
    </script>

</head>
<body>
    <form id="Form1" method="post" runat="server">
        <div class="divpanel">
            <asp:FormView ID="fvSubject" runat="server" Width="100%" CssClass="ClearCollapse">
                <ItemTemplate>
                    <table cellpadding="4" cellspacing="0" class="table" style="height: 40px" width="100%">
                        <tr>
                            <td align="center" style="width: 124px; border-top-width: 0px" rowspan="3">
                                <div style="font-size: 14px; font-weight: bold">
                                    <%#Eval("StudentName")%>
                                </div>
                            </td>
                            <td align="left" style="height: 22px; border-top-width: 0px">
                                <%--                                电话：<%#Eval("Tel")%>
                            手机：<%#Eval("MobileTel")%>
                            电话1：<%#Eval("Tel1")%>
                            电话2：<%#Eval("Tel2")%>
                            电话3：<%#Eval("Tel3")%>
                            QQ：<%#Eval("QQ")%>
                            Email：<%#Eval("Email")%>--%>


                                <div class="setandsearch" style="margin-bottom: 5px">
                                    <ul class="searchtool">
                                        <li>手机：<a href='tel:<%# Eval("MobileTel") %>'><%# Eval("MobileTel") %></a></li>
                                        <li>
                                            <div id="setControl2" onclick="OpenClass()">
                                                ▼详情
                                            </div>
                                        </li>

                                    </ul>
                                    <div id="setContent2" style="display: none">
                                        <table class="table_simple_kuan" cellpadding="2" cellspacing="0">
                                            <tr>
                                                <td style="width: 85px">手机：</td>
                                                <td><%#Eval("MobileTel")%></td>
                                            </tr>
                                            <tr>
                                                <td style="width: 85px">电话：</td>
                                                <td><%#Eval("Tel")%></td>
                                            </tr>
                                            <tr>
                                                <td>电话1：</td>
                                                <td><%#Eval("Tel1")%></td>
                                            </tr>
                                            <tr>
                                                <td>电话2：</td>
                                                <td><%#Eval("Tel2")%></td>
                                            </tr>
                                            <tr>
                                                <td>电话3：</td>
                                                <td><%#Eval("Tel3")%></td>
                                            </tr>
                                            <tr>
                                                <td>QQ：</td>
                                                <td><%#Eval("QQ")%></td>
                                            </tr>
                                            <tr>
                                                <td>Email：</td>
                                                <td><%#Eval("Email")%></td>
                                            </tr>
                                            <tr>
                                                <td>年龄：</td>
                                                <td><%#swq.Tools.GetAge(Eval("Birthday"))%></td>
                                            </tr>
                                            <tr>
                                                <td>原学校：</td>
                                                <td><%#Eval("School")%></td>
                                            </tr>
                                            <tr>
                                                <td>年级：</td>
                                                <td><%#Eval("Grade")%></td>
                                            </tr>
                                            <tr>
                                                <td>班级：</td>
                                                <td><%#Eval("Class")%></td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>


                            </td>
                        </tr>
                        <tr>
                            <td align="left" height="120">
                                <%#swq.Tools.HtmlEncode(Eval("Remark").ToString())%>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" height="22">录入员：<%#Eval("TrueName")%>
                            时间：<%#Eval("DateAndTime")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:FormView>
        </div>
        <div class="divpanel">
            <asp:DataList ID="DataList1" runat="server" DataKeyField="ReplyID" Width="100%" CssClass="ClearCollapse"
                OnCancelCommand="DataList1_CancelCommand" OnEditCommand="DataList1_EditCommand"
                OnItemCommand="DataList1_ItemCommand" OnItemDataBound="DataList1_ItemDataBound"
                OnUpdateCommand="DataList1_UpdateCommand">
                <ItemTemplate>
                    <table cellpadding="4" cellspacing="0" class="table" style="height: 40px" width="100%">
                        <tr>
                            <td rowspan="2" style="width: 124px; border-top-width: 0px">回访人：<%#Eval("TrueName")%>
                            </td>
                            <td style="height: 20px; border-top-width: 0px">
                                <div class="lab_button_sub" id="divEdit" runat="server">
                                    <asp:LinkButton ID="lbnEdit" runat="server" Text="编辑" CommandName="edit" CausesValidation="false"></asp:LinkButton>
                                </div>
                                <div class="lab_button_sub" id="divDelete" runat="server">
                                    <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="false"
                                        OnClientClick="<%# Rs.Messages.确定删除%>">
                                    </asp:LinkButton>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td height="50">
                                <%#swq.Tools.HtmlEncode(Eval("Content").ToString())%>
                                <p align="right">
                                    <i>
                                        <%#Eval("NextReplyDate") is DateTime ? ("下次回访时间："+swq.Tools.GetClearTimeZone(Eval("NextReplyDate"))) : "" %></i>
                                    时间：<%#Eval("DateAndTime")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <EditItemTemplate>
                    <table cellpadding="4" cellspacing="0" class="table" style="height: 40px" width="100%">
                        <tr>
                            <th colspan="2"></th>
                        </tr>
                        <tr>
                            <td rowspan="2" style="width: 124px;">追踪人：<%#Eval("TrueName")%>
                            </td>
                            <td>
                                <div class="lab_button_sub" id="div1" runat="server">
                                    <asp:LinkButton ID="Linkbutton1" runat="server" Text="更新" CommandName="update" CommandArgument='<%#Eval("UserID")%>'
                                        CausesValidation="false">
                                    </asp:LinkButton>
                                </div>
                                <div class="lab_button_sub" id="div2" runat="server">
                                    <asp:LinkButton ID="Linkbutton2" runat="server" Text="取消" CommandName="cancel" CausesValidation="false"></asp:LinkButton>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td height="50">
                                <asp:TextBox TextMode="MultiLine" Rows="5" Width="90%" ID="tBody" Text='<%#Eval("Content")%>'
                                    runat="server" />
                                <p align="right">
                                    时间：<asp:TextBox ID="dtime" Text='<%#Eval("DateAndTime")%>' runat="server">
                                    </asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </EditItemTemplate>
            </asp:DataList>
        </div>
        <div class="divpanel">
            <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
        </div>
        <div class="divpanel">
            <table class="table" cellspacing="0" width="85%">
                <tr>
                    <th colspan="2">回访信息
                    </th>
                </tr>
                <tr>
                    <td>时间：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxDateAndTime" runat="server" Width="167px"></asp:TextBox>
                        <span style="color: Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td>内容：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxContent" runat="server" Width="461px" Height="78px" TextMode="MultiLine"></asp:TextBox>
                        <span style="color: Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td>下次回访日期：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxNextReplyDate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <label class="lab_button">
                            <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click"></asp:Button>
                        </label>
                        <label class="lab_button" id="__mt_labBack" runat="server">
                            <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
                        </label>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
