<%@ Import Namespace="MTCUN" %>

<%@ Page Language="c#" CodeBehind="StuPotentials.aspx.cs" AutoEventWireup="True"
    Inherits="MTCUN.Consultant.StuPotentials" Title="咨询信息-顾问" %>

<!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" />
</head>
<body>
    <form id="Form1" method="post" runat="server">
        <div class="divpanel">
            <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False"
                DataKeyNames="PotentialID" OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="咨询号">
                        <ItemTemplate>
                            <asp:Label ID="labPotentialID" runat="server" Text='<%# Eval("PotentialID") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="姓名">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="labPotentialName" ForeColor='<%# Convert.ToInt32(Eval("StatusID")) == 3 ? System.Drawing.Color.ForestGreen:System.Drawing.Color.Black%>'
                                Text='<%#Eval("PotentialName")%>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="来源">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="labSourceType" Text='<%#Rs.Items.GetSourceType(Eval("SourceType"))%>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="CourseName" ReadOnly="True" HeaderText="课程" />
                    <asp:BoundField DataField="DateAndTime" ReadOnly="True" HeaderText="咨询日期" />
                    <asp:TemplateField HeaderText="客户状态">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="labStatusName" Text='<%# Eval("StatusName") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="咨询顾问">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="labTrueName" Text='<%#Eval("TrueName") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="最后回访信息">
                        <ItemTemplate>
                            <%#Eval("LastPostName")%>|<%#Eval("LastPostTime")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="回访">
                        <ItemTemplate>
                            <font color="red">
                                <%#Eval("ReCount")%>
                            </font>
                            <div class="lab_button_sub" id="divShow" runat="server">次</div>
                            |
                        <div class="lab_button_sub" id="div1" runat="server">
                            <a href='Reply.aspx?PotentialID=<%#Eval("PotentialID")%>&GetURL=<% = swq.Web.PathAndQuery() %>'>
                                <asp:Literal
                                    Text="回访" runat="server" /></a>
                        </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="编辑">
                        <ItemTemplate>
                            <div class="lab_button_sub" 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>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除" SortExpression="delete">
                        <ItemTemplate>
                            <div class="lab_button_sub" id="divDelete" runat="server">
                                <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" CommandArgument='<%#Eval("UserID")%>'
                                    OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
        <div class="backpanel">
            <label class="lab_button" id="__mt_labBack" runat="server">
                <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
            </label>
        </div>
    </form>
</body>
</html>
