<%@ Page Language="c#" CodeBehind="Reply.aspx.cs" AutoEventWireup="True" Inherits="SWTraining.Consultant.Reply"
    Title="顾问工作台-回访咨询信息" %>

<%@ Import Namespace="SWTraining" %>
<!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/Orange/css.css" rel="stylesheet"
        type="text/css" />
</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">
                                <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">
                            电话：<%#Eval("Tel")%>
                            手机：<%#Eval("MobileTel")%>
                            QQ：<%#Eval("QQ")%>
                            课程名称：<%#Eval("CourseName")%>
                            上课规律：<%#Eval("TimeRule")%>
                            <asp:HyperLink ID="hlkEdit" runat="server" Text="编辑" NavigateUrl='<%# string.Format("PostPotential.aspx?PotentialID={0}&GetURL={1}",Eval("PotentialID"),swq.Web.PathAndQuery()) %>' />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" height="120">
                            <%#swq.Tools.HtmlEncode(Eval("Remark").ToString())%>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" height="22">
                            客户状态：<%#Eval("StatusName")%>
                            录入员：<%#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">
                            结果：<%# Eval("StatusName")%>
                            <asp:LinkButton ID="lbnEdit" runat="server" Text="编辑" CommandName="edit" CausesValidation="false"></asp:LinkButton>
                            <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="false"
                                OnClientClick="<%# Rs.Messages.确定删除%>">
                            </asp:LinkButton>
                        </td>
                    </tr>
                    <tr>
                        <td height="50">
                            <%#swq.Tools.HtmlEncode(Eval("Content").ToString())%>
                            <p align="right">
                                时间：<%#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>
                            结果：<asp:DropDownList ID="ddlStatus" DataSource='<%#swq.Cache.GetStatus() %>' DataTextField="StatusName"
                                DataValueField="StatusID" SelectedValue='<%#Eval("StatusID")%>' runat="server">
                            </asp:DropDownList>
                            <asp:LinkButton ID="Linkbutton1" runat="server" Text="更新" CommandName="update" CommandArgument='<%#Eval("UserID")%>'
                                CausesValidation="false">
                            </asp:LinkButton>
                            <asp:LinkButton ID="Linkbutton2" runat="server" Text="取消" CommandName="cancel" CausesValidation="false"></asp:LinkButton>
                        </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: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>
            <tr>
                <td align="center" colspan="2">
                    <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click"></asp:Button>
                    <input causesvalidation="false" type="button" runat="server" onclick="back()" value="返回" />
                </td>
            </tr>
        </table>
    </div>
    <div class="divpanel">
    </div>
    </form>
</body>
</html>
