<%@ Page Language="c#" CodeBehind="Reply.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.Mobile.Consultant.Reply"
    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="mobileCss" runat="server" href="../themes/mobile.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 onload="defaultClassState()">
    <form id="Form1" method="post" runat="server">
        <div id="web_page_contents">
            <div class="search biao_zhun_suo_jin">

                <div class="kuai_show">
                    <asp:FormView ID="fvSubject" runat="server" Width="100%" CssClass="ClearCollapse">
                        <ItemTemplate>
                            <table cellpadding="4" cellspacing="0" class="table" width="100%">
                                <tr>
                                    <td align="center" style="border-top-width: 0px; width: 85px" rowspan="3">
                                        <div style="font-size: 14px; font-weight: bold">
                                            <asp:Label runat="server" ID="name" ForeColor='<%# Convert.ToInt32(Eval("StatusID")) == 3 ? System.Drawing.Color.ForestGreen:System.Drawing.Color.Black%>'
                                                Text='<%#Eval("PotentialName")%>'>
                                            </asp:Label>
                                        </div>
                                    </td>
                                    <td align="left" style="height: 22px; border-top-width: 0px">

                                        <div class="setandsearch" style="margin-bottom: 5px">
                                            <ul class="searchtool">
                                                <li><%#Eval("StatusName")%></li>
                                                <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 style="display: none">
                                                        <td>电话1：</td>
                                                        <td><%#Eval("Tel1")%></td>
                                                    </tr>
                                                    <tr style="display: none">
                                                        <td>电话2：</td>
                                                        <td><%#Eval("Tel2")%></td>
                                                    </tr>
                                                    <tr style="display: none">
                                                        <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><%#Eval("CourseName")%></td>
                                                    </tr>
                                                    <tr>
                                                        <td>上课规律：</td>
                                                        <td><%#Eval("TimeRule")%></td>
                                                    </tr>
                                                    <tr>
                                                        <td>空闲时间：</td>
                                                        <td><%#Eval("FreeTimes")%></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>
                                                    <tr>
                                                        <td>录入员：</td>
                                                        <td><%#Eval("TrueName")%></td>
                                                    </tr>
                                                    <tr>
                                                        <td>时间：</td>
                                                        <td><%#Eval("DateAndTime")%></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" style="min-height: 30px">
                                        <%#swq.Tools.HtmlEncode(Eval("Remark").ToString())%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label class="lab_button btn_width" id="labEdit" runat="server">
                                            <asp:HyperLink ID="hlkEdit" runat="server" Text="编辑" NavigateUrl='<%# string.Format("PostPotential.aspx?PotentialID={0}&GetURL={1}",Eval("PotentialID"),swq.Web.PathAndQuery()) %>' />
                                        </label>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:FormView>
                </div>

                <div class="main">
                    <asp:Repeater ID="repBlock" runat="server" OnItemCommand="repBlock_ItemCommand"
                        OnItemDataBound="repBlock_ItemDataBound">
                        <ItemTemplate>
                            <asp:Panel ID="plItem" runat="server" CssClass="kuai">

                                <%--<h1 class="auto_length_title"><%#Eval("MediaName")%></h1>--%>

                                <table class="table_simple_kuan">
                                    <tr>
                                        <td>内容：
                                        </td>
                                        <td style="width: auto"><%#swq.Tools.HtmlEncode(Eval("Content").ToString())%></td>
                                    </tr>
                                    <tr>
                                        <td>时间：
                                        </td>
                                        <td style="width: auto"><%#Eval("DateAndTime")%></td>
                                    </tr>
                                    <tr>
                                        <td>结果：
                                        </td>
                                        <td style="width: auto"><%# Eval("StatusName")%></td>
                                    </tr>
                                    <tr>
                                        <td>结果描述：
                                        </td>
                                        <td style="width: auto"><%# Eval("StatusReasonName")%></td>
                                    </tr>
                                    <tr>
                                        <td>回访人：
                                        </td>
                                        <td style="width: auto"><%#Eval("TrueName")%></td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button" runat="server" id="divDelete">
                                                <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" CommandArgument='<%#Eval("ReplyID")%>'
                                                    OnClientClick="<%# Rs.Messages.确定删除%>" CausesValidation="false"></asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnEdit" CommandArgument='<%# Eval("ReplyID")%>'
                                                    CommandName="Edit" Text="编辑" CausesValidation="false"></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>


                            </asp:Panel>
                            <asp:Panel ID="plEdit" runat="server" CssClass="kuai edit_kuai">

                                <table class="table_simple_kuan">

                                    <tr>
                                        <td>内容：
                                        </td>
                                        <td style="width: auto">
                                            <asp:TextBox TextMode="MultiLine" Rows="5" ID="tBody" Text='<%#Eval("Content")%>'
                                                runat="server" /></td>
                                    </tr>
                                    <tr>
                                        <td>时间：
                                        </td>
                                        <td style="width: auto">
                                            <asp:TextBox ID="dtime" Text='<%#Eval("DateAndTime")%>' runat="server">
                                            </asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td>结果：
                                        </td>
                                        <td style="width: auto">
                                            <asp:DropDownList ID="ddlStatus" DataSource='<%#swq.Cache.GetStatus() %>' DataTextField="StatusName"
                                                DataValueField="StatusID" SelectedValue='<%#Eval("StatusID")%>' AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlStatus2_SelectedIndexChanged" runat="server">
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr style="display: none">
                                        <td>结果描述：
                                        </td>
                                        <td style="width: auto">
                                            <asp:DropDownList ID="ddlStatusReason" runat="server" DataTextField="StatusReasonName"
                                                DataValueField="StatusReasonID">
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td>回访人：
                                        </td>
                                        <td style="width: auto"><%#Eval("TrueName")%></td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnUpdate" CommandArgument='<%# Eval("ReplyID")%>'
                                                    CommandName="Update" Text="更新"></asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnCancel" CommandArgument='<%# Eval("ReplyID")%>'
                                                    CommandName="Cancel" Text="取消"></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>

                            </asp:Panel>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>

                <div class="pager_button">
                    <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
                </div>

                <div class="kuai_show">
                    <table class="table_simple_kuan" cellspacing="0">
                        <tr>
                            <th colspan="2">回访信息
                            </th>
                        </tr>
                        <tr class="required">
                            <td style="width: 85px">时间：
                            </td>
                            <td>
                                <asp:TextBox ID="tbxDateAndTime" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr class="required">
                            <td>内容：
                            </td>
                            <td>
                                <asp:TextBox ID="tbxContent" runat="server" Height="78px" TextMode="MultiLine"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>内容简述：
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlStatusReason" runat="server" DataTextField="StatusReasonName"
                                    DataValueField="StatusReasonID">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr class="required">
                            <td>结果状态：
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlStatus" runat="server" DataTextField="StatusName" DataValueField="StatusID">
                                </asp:DropDownList>
                            </td>
                        </tr>

                        <tr>
                            <td>下次回访：
                            </td>
                            <td>
                                <asp:TextBox ID="tbxNextReplyDate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>

                <label class="lab_button_kuan">
                    <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click"></asp:Button>
                </label>

                <label class="lab_button_kuan" id="__mt_labBack" runat="server">
                    <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
                </label>

                <div class="divremark">
                    <b>注意事项：</b><br />
                    1、将结果选择“成功”时，请确认学员已正式报名，并且档案已经输入到正式学员信息里，很多操作者不明白，认为这里回访状态选择“成功”就表示学员正式报名了，结果正式学员列表里又找不到他。<br />
                    2、将结果选择“成功”后，“我的正式学员”里没有他，原因有两种：a 学员信息并没有录入到正式学员系统。 b 录入正式学员信息时咨询顾问填的不是你，联系上级负责人修正。<br />
                </div>
            </div>
        </div>
    </form>

</body>
</html>
