LOADING STUFF...

用JAVASCRIPT选中RadioButton 夜飞

用JAVASCRIPT选中RadioButton

%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”SellTrend.aspx.cs” Inherits=”AnalyseData_SellTrend” %>
<%@ Register Assembly=”Microsoft.Web.UI.WebControls” Namespace=”Microsoft.Web.UI.WebControls” TagPrefix=”iewc” %>

<html >
<head runat=”server”>
    <title>销售趋势分析</title>
    <link href=”../css/CRM.css” type=”text/css” rel=”stylesheet” />
    <script language=”javascript” src=”../css/Calendar.js”></script>
    <script language=”javascript”>
   
 
  window.onload = function()
    {
        if (form1.TopNum[1].checked)
        {
            setCompanyEnable();
        }
        else if (form1.TopNum[2].checked)
        {
            setContactEnable();
        }
    }
   
  
   
   
   
    function setCompanyEnable()
    {
        document.all[“listCompany”].disabled=false;
        document.all[“listContact”].disabled=true;
    }
   
    function setContactEnable()
    {
        document.all[“listContact”].disabled=false;
        document.all[“listCompany”].disabled=true;
    }
   
    function setAllEnable()
    {
        document.all[“listContact”].disabled=true;
        document.all[“listCompany”].disabled=true;
    }
    </script>
</head>
<body>
    <form id=”form1″ runat=”server”>
    <div>
        <table style=”width: 100%; height: 100%”>
            <tr>
                <td colspan=”6″ style=”font-weight: bold; font-size: 20px; color: white; font-family: 楷体_GB2312;
                    height: 27px; background-color: #63769b”>
                    销售趋势分析</td>
            </tr>
            <tr>
                <td colspan=”1″ style=”width: 88px; height: 13px”>
                    数据来源:</td>
                <td colspan=”5″ style=”height: 13px”>
                    <asp:RadioButton ID=”rBtnAll” runat=”server” Checked=”True” GroupName=”TopNum” onclick=”setAllEnable()”
                        Text=”所有商业机会、销售记录” />
                    <asp:RadioButton ID=”rBtnCompany” runat=”server” GroupName=”TopNum” onclick=”setCompanyEnable()”
                        Text=”按客户:” Height=”20px” /><asp:DropDownList ID=”listCompany” runat=”server” DataTextField=”COMPANYNAME” DataValueField=”COMPANYID” Enabled=”false” Width=”158px” />
                    <asp:RadioButton ID=”rBtnContact” runat=”server” GroupName=”TopNum” onclick=”setContactEnable()”
                        Text=”按联系人:” /><asp:DropDownList ID=”listContact” runat=”server” DataTextField=”CONTACTNAME” DataValueField=”CONTACTID” Enabled=”false” Width=”157px” />
                    &nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td colspan=”1″ style=”width: 88px; height: 15px”>
                    分析类型:</td>
                <td colspan=”2″ style=”height: 15px; width: 258px;”>                      
                        <asp:DropDownList ID=”listTypeField” runat=”server” EnableTheming=”False”
                        Width=”190px”>
                        <asp:ListItem Value=”0″>仅商业机会记录</asp:ListItem>
                       <asp:ListItem Value=”1″>仅失败商业机会记录</asp:ListItem>
                        <asp:ListItem Value=”2″>仅销售记录</asp:ListItem>
                    </asp:DropDownList>
                    </td>
                    <td align=”right” >
                        分析方式:</td>
                <td colspan=”2″ style=”height: 15px”>
                    <asp:DropDownList ID=”listDateType” runat=”server” EnableTheming=”False”
                        Width=”190px”>
                        <asp:ListItem Value=”+ CONVERT(nvarchar, DATEPART(mm, {0})) + \’月\’ + CONVERT(nvarchar, DATEPART(dd, {0})) + \’日\'”>按天分析</asp:ListItem>
                        <asp:ListItem Value=”+ \’第\’ +CONVERT(nvarchar, DATEPART(wk, {0})) + \’周\'”>按周分析</asp:ListItem>
                        <asp:ListItem Value=”+ CONVERT(nvarchar, DATEPART(mm, {0})) + \’月\'”>按月分析</asp:ListItem>
                        <asp:ListItem Value=”+ \’第\’ +CONVERT(nvarchar, DATEPART(qq, {0})) + \’季度\'”>按季度分析</asp:ListItem>
                        <asp:ListItem Value=””>按年分析</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td colspan=”1″ style=”width: 88px; height: 24px”>
                    产品:</td>
                <td colspan=”2″ style=”width: 258px; height: 24px”>
                    <asp:DropDownList ID=”listProduct” runat=”server” Width=”190px” DataTextField=”PRODUCTNAME” DataValueField=”PRODUCTID” AppendDataBoundItems=”True”>
                        <asp:ListItem Value=”-1″>全部产品</asp:ListItem>
                    </asp:DropDownList></td>
                <td style=”height: 24px” align=”right”>
                    分析内容:</td>
                <td colspan=”2″ style=”height: 24px”>
                    <asp:DropDownList ID=”listDataField” runat=”server” Width=”190px”>
                <asp:ListItem Value=”0″>销售金额</asp:ListItem>
                <asp:ListItem Value=”1″>销售数量</asp:ListItem>
                </asp:DropDownList></td>
            </tr>
            <tr>
                <td colspan=”1″ style=”width: 98px; height: 15px”>
                    销售日期范围:</td>
                <td colspan=”4″>
                    起始:<asp:TextBox ID=”txtBoxBTime” runat=”server” MaxLength=”20″ onfocus=”setday(this)”
                        Width=”133px”></asp:TextBox>&nbsp;
                    结束:

                    <asp:TextBox ID=”txtBoxETime” runat=”server” MaxLength=”20″ onfocus=”setday(this)”></asp:TextBox>
                    &nbsp;&nbsp;</td>
                <td style=”width: 3px;” rowspan=”2″>
                    <asp:ImageButton ID=”imgBtnFind” runat=”server” EnableTheming=”False” EnableViewState=”False”
                        ImageUrl=”~/Images/button/button06.gif” OnClick=”imgBtnFind_Click” /></td>
            </tr>
            <tr>
                <td colspan=”1″ style=”width: 88px; height: 24px”>
                    查看范围:</td>
                <td colspan=”4″ style=”height: 24px”>
                    部门:<asp:DropDownList ID=”listDepartMent” runat=”server” Width=”132px” DataTextField=”DEPARTMENTNAME” DataValueField=”DEPARTMENTID” AppendDataBoundItems=”True” AutoPostBack=”True” OnSelectedIndexChanged=”listDepartMent_SelectedIndexChanged”>
                    <asp:ListItem Value=”0″>全部</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp; 员工:<asp:DropDownList ID=”listEmployee” runat=”server” Width=”155px” DataTextField=”OPERATORNAME” DataValueField=”OPERATOR” AppendDataBoundItems=”True”>
                    <asp:ListItem Value=”0″>全部</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td style=”height: 454px” colspan=”6″>
                    <table style=”left: 10px; width: 100%; height: 100%”>
                        <tr>
                            <td style=”width: 961px; height: 4px”>
                                <iewc:toolbar id=”Toolbar2″ runat=”server” defaultstyle=”background-repeat:repeat;border:0;background-image:url(../images/menu/silver.gif);”
                                    height=”27px” onbuttonclick=”Toolbar_ButtonClick” style=”border-right: #466094 1px solid;
                                    border-top: #466094 1px solid; font-size: 12px; border-left: #466094 1px solid;
                                    width: 100%; border-bottom: #466094 1px; font-family: 宋体”>
                                    <iewc:ToolbarButton id=”showGraph” ImageUrl=”../Images/ico/16_reports.gif” SelectedStyle=”background-image:url(../images/menu/2k3OlBarDown.gif);”
                                    HoverStyle=”background-image:url(../images/menu/2k3OlBarOver.gif);border:solid 1px #000080;”
                                    DefaultStyle=”background-image:url(../images/menu/silver.gif);” Text=”图表显示”>
                                    </iewc:ToolbarButton><iewc:ToolbarSeparator></iewc:ToolbarSeparator>
                                    <iewc:ToolbarButton Text=”导出到Excel” ImageUrl=”../Images/ico/16_excel.gif” DefaultStyle=”background-image:url(../images/menu/silver.gif);”
        ID=”Excel” HoverStyle=”background-image:url(../images/menu/2k3OlBarOver.gif);border:solid 1px #000080;”
        SelectedStyle=”background-image:url(../images/menu/2k3OlBarDown.gif);”></iewc:ToolbarButton>
       <iewc:ToolbarSeparator></iewc:ToolbarSeparator>
                                    <iewc:ToolbarButton id=”printList” ImageUrl=”../Images/ico/print.gif” SelectedStyle=”background-image:url(../images/menu/2k3OlBarDown.gif);”
                                    HoverStyle=”background-image:url(../images/menu/2k3OlBarOver.gif);border:solid 1px #000080;”
                                    DefaultStyle=”background-image:url(../images/menu/silver.gif);” Text=”打印”>
                                    </iewc:ToolbarButton><iewc:ToolbarSeparator></iewc:ToolbarSeparator>
                                    <iewc:ToolbarLabel DefaultStyle=”background-image:url(../images/menu/silver.gif);width:100%;”></iewc:ToolbarLabel></iewc:toolbar>
                            </td>
                        </tr>
                        <tr>
                            <td align=”center” style=”border-right: #000099 1px solid; border-top: #000099 1px solid;
                                border-left: #000099 1px solid; width: 961px; border-bottom: #000099 1px solid;
                                height: 371px” valign=”top”>
                                <asp:GridView ID=”GridView1″ runat=”server” AllowPaging=”false” AutoGenerateColumns=”False”
                                    CellPadding=”4″ CssClass=”Grid” EnableTheming=”False”
                                    ForeColor=”#333333″ GridLines=”None”
                                    Style=”word-break: keep-all” Width=”100%” OnRowCreated=”GridView1_RowCreated”>
                                    <FooterStyle BackColor=”#507CD1″ Font-Bold=”True” ForeColor=”White” />
                                    <Columns>
                                    <asp:BoundField DataField=”SELLDATE” HeaderText=”日期” >
                                            <HeaderStyle Wrap=”False” />
                                            <ItemStyle />
                                        </asp:BoundField>
                                    <asp:BoundField DataField=”MONEYSUM” HeaderText=”销售金额” DataFormatString=”{0:N}” HtmlEncode=”false” >
                                            <HeaderStyle Wrap=”False” />
                                            <ItemStyle HorizontalAlign=Center/>
                                        </asp:BoundField>
                                        <asp:BoundField DataField=”ALLNUM” HeaderText=”数量” >
                                            <HeaderStyle Wrap=”False” />
                                            <ItemStyle HorizontalAlign=Center/>
                                        </asp:BoundField>
                                    </Columns>
                                    <RowStyle BackColor=”#EFF3FB” />
                                    <EditRowStyle BackColor=”#2461BF” />
                                    <SelectedRowStyle BackColor=”#D1DDF1″ Font-Bold=”True” ForeColor=”#333333″ />
                                    <PagerStyle BackColor=”#2461BF” ForeColor=”White” HorizontalAlign=”Center” />
                                    <HeaderStyle BackColor=”#507CD1″ Font-Bold=”True” ForeColor=”White” />
                                    <AlternatingRowStyle BackColor=”White” />
                                    <PagerSettings Visible=”False” />
                                    <EmptyDataTemplate>
                                        <font color=”Navy”>暂时无数据内容。</font>
                                    </EmptyDataTemplate>
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style=”width: 88px; height: 23px;”>
                </td>
                <td colspan=”3″ style=”width: 235px; height: 23px;”>
                </td>
                <td style=”width: 42px; height: 23px;”>
                </td>
                <td style=”width: 3px; height: 23px;”>
                </td>
            </tr>
        </table>
   
    </div>
    </form>
</body>
</html>

发表于
2006-08-08 18:56 
夜飞 
阅读(580
评论(0
编辑 
收藏 
举报

 
原文链接:https://www.cnblogs.com/yefei520/articles/471454.html
本文来源 爱码网,其版权均为 原网址 所有 与本站无关,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源。

© 版权声明

相关文章