⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conlistctrl.ascx

📁 CRM管理系统 CRM管理系统
💻 ASCX
字号:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ConListCtrl.ascx.cs" Inherits="Contact_Ctrls_ConListCtrl" %>
<%@ Register Assembly="WFNetCtrl" Namespace="WFNetCtrl" TagPrefix="cc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<script language="javascript" type="text/javascript">
function SetDepName()
{
    var returnValue = window.showModalDialog('CustSelect.aspx',window,'dialogWidth=600px;dialogHeight=400px;help:no;resizable:no;scroll=yes; status:no;');
    if(returnValue != null && returnValue.length > 0 && returnValue != "undefined")
    {
        document.getElementById("ConListCtrl1_ddlConName").value = returnValue;
    }
}
function SetItemName()
{
    var returnValue = window.showModalDialog('ItemSelect.aspx',window,'dialogWidth=600px;dialogHeight=400px;help:no;resizable:no;scroll=yes; status:no;');
    if(returnValue != null && returnValue.length > 0 && returnValue != "undefined")
    {
        document.getElementById("ConListCtrl1_ddlProject").value = returnValue;
    }
}
</script>
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0">    
    <tr>
        <td align="left">
            <asp:DropDownList ID="ddlConName" runat="server" Width="145px">
                <asp:ListItem>--客户名称--</asp:ListItem>
            </asp:DropDownList>
            <img alt="" src="../images/test_search.gif" onclick="SetDepName();" style=" cursor:hand;" />
            <img alt="" src="../images/clear.gif" style="display: none" />
            <asp:DropDownList ID="ddlProid" runat="server" Width="100px">
                <asp:ListItem>--联络阶段--</asp:ListItem>
            </asp:DropDownList><asp:DropDownList ID="ddlUser" runat="server" Width="100px">
                <asp:ListItem>--我方人员--</asp:ListItem>
            </asp:DropDownList><asp:DropDownList ID="ddlDatetime" runat="server">
                <asp:ListItem>--联络日期--</asp:ListItem>
                <asp:ListItem Value="7">最近一周</asp:ListItem>
                <asp:ListItem Value="30">最近一个月</asp:ListItem>
                <asp:ListItem Value="90">最近三个月</asp:ListItem>
                <asp:ListItem Value="180">半年内</asp:ListItem>
                <asp:ListItem Value="365">一年内</asp:ListItem>
                <asp:ListItem Value="730">两年内</asp:ListItem>
            </asp:DropDownList>开始:<cc1:Calendar ID="txtBegin" runat="server" Width="80px"></cc1:Calendar>结束:<cc1:Calendar
                ID="txtEnd" runat="server" Width="80px"></cc1:Calendar></td>
    </tr>
    <tr>
        <td align="left">
            <asp:DropDownList ID="ddlProject" runat="server" Width="300px">
                <asp:ListItem>--相关项目--</asp:ListItem>
            </asp:DropDownList>
            <img alt="" src="../images/test_search.gif" onclick="SetItemName();return false;" style=" cursor:hand;" />
            <img alt="" src="../images/clear.gif" style="display: none" />
            联络主题:<asp:TextBox ID="txtConTitle" runat="server" Width="80px"></asp:TextBox>
            <asp:Button ID="btnSearch" runat="server" Text="查 询" OnClick="btnSearch_Click" /><asp:Button ID="btnClear" runat="server" OnClick="btnClear_Click" Text="条件清空" /></td>
    </tr>
    <tr>
        <td align="center">
            <asp:GridView ID="gvConList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                BackColor="White" BorderColor="#E7E7FF" BorderWidth="1px" CellPadding="4" 
                PageSize="12" Width="100%" OnPageIndexChanging="gvConList_PageIndexChanging" OnRowDataBound="gvConList_RowDataBound" OnRowCommand="gvConList_RowCommand">
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" Font-Size="12px" />
                <SelectedRowStyle BackColor="#E0E0E0" Font-Bold="True" ForeColor="Black" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" Height="22px"
                    HorizontalAlign="Center" />
                <AlternatingRowStyle BackColor="#F7F7F7" />
                <Columns>
                    <asp:TemplateField HeaderText="联络编号" Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("code") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="联络主题">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnTitle" runat="server" ToolTip='<%# Eval("title") %>' Text='<%# Query1(Eval("title"),8) %>'></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" />
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="客户名称">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" ToolTip='<%# GetCustomName(Eval("customer_id")) %>' Text='<%# Query1(GetCustomName(Eval("customer_id")),10) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="客户人员">
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" Text='<%# GetCustomerPerson(Eval("customer_person_id")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="我方人员">
                        <ItemTemplate>
                            <asp:Label ID="Label5" runat="server" Text='<%# GetUserName(Eval("contract_person")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="联络方式">
                        <ItemTemplate>
                            <asp:Label ID="Label8" runat="server" Text='<%# GetDictName(Eval("type")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="联络阶段">
                        <ItemTemplate>
                            <asp:Label ID="Label7" runat="server" Text='<%# GetDictName(Eval("period")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="联络日期">
                        <ItemTemplate>
                            <asp:Label ID="lblConDateTime" runat="server" Text='<%# Bind("contract_time") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="销售预测">
                        <ItemTemplate>
                            <asp:LinkButton CommandName="lbtnSale" ID="lbtnSale" runat="server">销售预测</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除">
                        <ItemTemplate>
                            <asp:LinkButton CommandName="lbtnDelete" ID="lbtnDelete" runat="server">删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                </Columns>
                <PagerSettings Visible="False" />
            </asp:GridView>
            <webdiyer:aspnetpager id="pager" runat="server" OnPageChanging="pager_PageChanging" BackColor="#F7F7F7"></webdiyer:aspnetpager>
        </td>
    </tr>
    <tr>
        <td align="center">
            <asp:Button ID="btnAddContact" runat="server" OnClick="btnAddContact_Click" Text="增 加" /></td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
    </tr>
</table>
<script language="javascript" type="text/javascript">
function SetSearchTime()
{
    if(document.getElementById("ConListCtrl1_ddlDatetime").value != "--联络日期--")
    {
        var now = new Date();  
        document.getElementById("ConListCtrl1_txtEnd").value = now.getFullYear() + '-' + (now.getMonth()+1) + '-' + now.getDate();
        
        var day = now.getDate();
        var days = document.getElementById("ConListCtrl1_ddlDatetime").value;
        var begin = new Date(now.setDate(day-days));
        document.getElementById("ConListCtrl1_txtBegin").value = begin.getFullYear() + '-' + (begin.getMonth()+1) + '-' + begin.getDate();
    }
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -