<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../User_Col/col_Header.ascx" TagName="col_Header" TagPrefix="uc3" %>

<%@ Page Language="c#" CodeBehind="ReplyDate.aspx.cs" AutoEventWireup="True"
    Inherits="MTCUN.Mobile.Consultant.ReplyDate" Title="到期回访-客服" %>

<%@ Register Src="../../UserCol/SimpleCode.ascx" TagName="SimpleCode" TagPrefix="uc1" %>

<!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 Checks(checkbox) {
            for (var i = 0; i < document.forms[0].elements.length; i++) {
                var e = document.forms[0].elements[i];
                if (e.type == "checkbox" && e.id == "id") {
                    e.checked = checkbox.checked;
                }
            }
        }

        function Send() {
            var StudentID = "";
            for (var i = 0; i < document.forms[0].elements.length; i++) {
                var e = document.forms[0].elements[i];
                if (e.type == "checkbox" && e.id == "id") {
                    if (e.checked) {
                        StudentID += "," + e.value;
                    }
                }
            }

            if (StudentID.length > 0) {
                StudentID = StudentID.substring(1, StudentID.length);
                document.getElementById("PotentialID").value = StudentID;
                document.formStudent.action = "../SMS/SendToStudent.aspx";
                document.formStudent.submit();
            }
        }

        function Move() {
            var StudentID = "";
            for (var i = 0; i < document.forms[0].elements.length; i++) {
                var e = document.forms[0].elements[i];
                if (e.type == "checkbox" && e.id == "id") {
                    if (e.checked) {
                        StudentID += "," + e.value;
                    }
                }
            }

            if (StudentID.length > 0) {
                StudentID = StudentID.substring(1, StudentID.length);
                this.location = "Move.aspx?PotentialID=" + StudentID;
            }
        }
    </script>
</head>
<body>
    <form id="Form1" method="post" runat="server">
        <uc3:col_Header ID="col_Header1" runat="server" />
        <div id="web_page_contents">
            <div class="search biao_zhun_suo_jin">

                <div class="main">

                    <asp:Repeater ID="repBlock" runat="server" OnItemCommand="repBlock_ItemCommand" OnItemDataBound="repBlock_ItemDataBound">
                        <ItemTemplate>
                            <div class="kuai">
                                <h1 class="auto_length_title">
                                    <span runat="server" id="spanBox" style="display: none">
                                        <input type="checkbox" id="id" value='<%#Eval("PotentialID")%>' /></span>
                                    <%#ShowColorPotentialName(Eval("StatusID"), Eval("NextReplyDate"),Eval("PotentialName")) %>
                                </h1>

                                <table class=" table_simple_kuan" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 80px">咨询号：</td>
                                        <td style="width: auto"><%# Eval("PotentialID") %></td>
                                    </tr>

                                    <tr>
                                        <td style="width: auto">课程：</td>
                                        <td style="width: auto"><%#Eval("CourseName")%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">媒体渠道：</td>
                                        <td style="width: auto"><%#Eval("MediaName")%></td>
                                    </tr>
                                    <tr>
                                        <td>咨询日期：</td>
                                        <td><%#Eval("DateAndTime") %></td>
                                    </tr>
                                    <tr>
                                        <td>客户状态：</td>
                                        <td><%#Eval("StatusName")%></td>
                                    </tr>
                                    <tr>
                                        <td>咨询顾问：</td>
                                        <td><%#Eval("TrueName")%></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="striking">最后回访：
                                            <div class="inline_block">
                                                <%#Eval("LastPostName")%>,
                                            </div>
                                            <div class="inline_block">
                                                <%#Eval("LastPostTime")%>,
                                            </div>
                                            <div class="inline_block" title='<%#swq.Tools.GetSingleText(Eval("LastPostContent"))%>' style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 120px">
                                                <%#swq.Tools.GetSingleText(Eval("LastPostContent"))%>
                                            </div>

                                        </td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button" id="divDelete" runat="server">
                                                <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" CommandArgument='<%#Eval("UserID")%>'
                                                    OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button" id="divEdit" runat="server">
                                                <asp:HyperLink ID="hlkEdit" runat="server" Text="编辑" NavigateUrl='<%# string.Format("PostPotential.aspx?PotentialID={0}&GetURL={1}",Eval("PotentialID"),swq.Web.PathAndQuery()) %>' />
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button dianming">
                                                <a style="display: block" href='Reply.aspx?PotentialID=<%#Eval("PotentialID")%>&GetURL=<% = swq.Web.PathAndQuery() %>'><span style="color: red">
                                                    <%#Eval("ReCount")%>
                                                </span>回访</a>
                                            </div>
                                        </td>
                                    </tr>
                                </table>



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

                <div class=" striking" style="display: none">
                    <table cellpadding="2" cellspacing="0">
                        <tr>
                            <td>
                                <input onclick="Checks(this)" type="checkbox">
                            </td>
                            <td>全选
                            </td>
                            <td>
                                <asp:HyperLink ID="hlkSMS" runat="server" NavigateUrl='<%#string.Format("javascript:Send();void(0);") %>'
                                    Text="发消息" />
                            </td>
                        </tr>
                    </table>
                </div>

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

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

            </div>
        </div>
    </form>

    <div style="display: none">
        <!--短信Post传递参数代码S-->
        <form id="formStudent" name="formStudent" method="post">
            <input id="PotentialID" name="PotentialID" type="hidden" value="" />
        </form>
        <!--短信Post传递参数代码E-->
    </div>
</body>
</html>
