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

📄 sample.aspx

📁 掌握学习.net开发的非常好的资料
💻 ASPX
📖 第 1 页 / 共 3 页
字号:
         End If
         If Mode.Checked Then
            Chart.Series.Elements.Add(Calculation.Mode, "Mode")
         End If
         If Median.Checked Then
            Chart.Series.Elements.Add(Calculation.Median, "Median")
         End If
         If Min.Checked Then
            Chart.Series.Elements.Add(Calculation.Minimum, "Min")
         End If
         If Max.Checked Then
            Chart.Series.Elements.Add(Calculation.Maximum, "Max")
         End If 
         
         If ByCustomer <> "" Then
            Chart.XAxis.Label.Text = "Customers"
         Else
            If myChartType = dotnetCHARTING.ChartType.Combo Then
               Chart.XAxis.Label.Text = myDategrouping.ToString()
            End If
         End If
         Chart.Series.Name = DropDownShow.SelectedItem.Value
         Chart.DefaultSeries.SplitByLimit = splitByLimit
         
         Select Case reportType.ToLower()
            Case "salesbyday", "salesbyday/hour", "salesbyhours", "salesbyweek", "salesbyweeks", "salesbyweek/day", "salesbymonth/day", "salesbymonth", "salesbydays", "salesbyyear", "salesbyquarter", "salesbyyear/month", "salesbymonths", "salesbyquarters", "salesbyyears"
               If (True) Then
                  Select Case splitBy.ToLower()
                     Case "customer"
                        Chart.Title = "Sales By customer"
                        SqlSelect = New StringBuilder("SELECT  OrderDate,Total, Name FROM Orders ", 128)
                        If Not (where Is Nothing) Then
                           SqlSelect.Append(where)
                        End If
                        SqlSelect.Append(" ORDER BY Orders.OrderDate")
                        Chart.Series.SqlStatement = SqlSelect.ToString()
                        Chart.SeriesCollection.Add()
                     Case Else
                        Chart.Title = "Sales"
                        SqlSelect = New StringBuilder("SELECT OrderDate,Total FROM Orders ")
                        If Not (where Is Nothing) Then
                           SqlSelect.Append(where)
                        End If
                        SqlSelect.Append(" ORDER BY OrderDate")
                        Chart.Series.SqlStatement = SqlSelect.ToString()
                        Chart.SeriesCollection.Add()
                  End Select
               End If
            Case "ordersbyday/hour", "ordersbyday", "ordersbyhours", "ordersbyweek", "ordersbyweek/day", "ordersbymonth/day", "ordersbymonth", "ordersbydays", "ordersbyyear", "ordersbyquarter", "ordersbyyear/month", "ordersbymonths", "ordersbyweeks", "ordersbyyears", "ordersbyquarters"
               If (True) Then
                  Select Case splitBy.ToLower()
                     
                     Case "customer"
                        Chart.Title = "Orders by customer"
                        SqlSelect = New StringBuilder("SELECT  OrderDate,1 AS q, Name FROM Orders ", 128)
                        If Not (where Is Nothing) Then
                           SqlSelect.Append(where)
                        End If
                        SqlSelect.Append(" ORDER BY Orders.OrderDate")
                        Chart.Series.SqlStatement = SqlSelect.ToString()
                        Chart.SeriesCollection.Add()
                     Case Else
                        Chart.Title = "Orders"
                        SqlSelect = New StringBuilder("SELECT OrderDate,1 AS q FROM Orders ")
                        If Not (where Is Nothing) Then
                           SqlSelect.Append(where)
                        End If
                        SqlSelect.Append(" ORDER BY OrderDate")
                        Chart.Series.SqlStatement = SqlSelect.ToString()
                        Chart.SeriesCollection.Add()
                  End Select
               End If
            
            Case "itemsbyday/hour", "itemsbyday", "itemsbyhours", "itemsbyweek/day", "itemsbyweek", "itemsbymonth/day", "itemsbymonth", "itemsbyweeks", "itemsbydays", "itemsbyyear", "itemsbyquarter", "itemsbyyear/month", "itemsbymonths", "itemsbyyears", "itemsbyquarters"
               If (True) Then
                  Select Case splitBy.ToLower()
                     
                     Case "customer"
                        Chart.Title = "Items by customer"
                        SqlSelect = New StringBuilder("SELECT  OrderDate,Sum(Quantity) AS CountOfQuantity, Name FROM Orders", 128)
                        If Not (where Is Nothing) Then
                           SqlSelect.Append(where)
                        End If
                        SqlSelect.Append(" GROUP BY Orders.OrderDate, Orders.Name ORDER BY Orders.OrderDate")
                        Chart.Series.SqlStatement = SqlSelect.ToString()
                        Chart.SeriesCollection.Add()
                     Case Else
                        Chart.Title = "Items"
                        SqlSelect = New StringBuilder("SELECT  OrderDate,Sum(Quantity) FROM Orders ", 128)
                        If Not (where Is Nothing) Then
                           SqlSelect.Append(where)
                        End If
                        SqlSelect.Append(" GROUP BY Orders.OrderDate ORDER BY Orders.OrderDate")
                        Chart.Series.SqlStatement = SqlSelect.ToString()
                        Chart.SeriesCollection.Add()
                  End Select
               End If
            
            Case "salesbycustomer"
               Chart.Title = "Sales by customer"
               SqlSelect = New StringBuilder("SELECT  Orders.Name,Sum(Orders.Total) AS TotalOrders FROM Orders ")
               If Not (where Is Nothing) Then
                  SqlSelect.Append(where)
               End If
               SqlSelect.Append(" GROUP BY Orders.Name ORDER BY Count(Orders.Total) DESC")
               Chart.Series.SqlStatement = SqlSelect.ToString()
               Chart.SeriesCollection.Add()
            Case "itemsbycustomer"
               Chart.Title = "Items by customer"
               SqlSelect = New StringBuilder("SELECT Name,Sum(Quantity) FROM Orders ")
               If Not (where Is Nothing) Then
                  SqlSelect.Append(where)
               End If
               SqlSelect.Append(" GROUP BY Name ORDER BY Sum(Quantity) DESC")
               Chart.Series.SqlStatement = SqlSelect.ToString()
               Chart.SeriesCollection.Add()
            
            Case "ordersbycustomer"
               Chart.Title = "Orders by customer"
               SqlSelect = New StringBuilder("SELECT Name,Count(1) FROM Orders ", 128)
               If Not (where Is Nothing) Then
                  SqlSelect.Append(where)
               End If
               SqlSelect.Append(" GROUP BY Name ORDER BY Count(1) DESC")
               Chart.Series.SqlStatement = SqlSelect.ToString()
               Chart.SeriesCollection.Add()
         End Select
      End If 
   End If '**************************************************************************    
   If seriesAggregation <> "" Then
      
      Chart.Series.Name = seriesAggregation
      Chart.Series.Type = CType([Enum].Parse(GetType(dotnetCHARTING.SeriesType), SummerySeriesType.SelectedItem.Value, True), dotnetCHARTING.SeriesType)
      Chart.SeriesCollection.Add(CType([Enum].Parse(GetType(dotnetCHARTING.Calculation), seriesAggregation, True), dotnetCHARTING.Calculation))
   End If 
End Sub 'ButtonDisplay_Click


</script>
<html>
<head>
    <title>Report Options</title>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
    <form runat="server">
        <div align="center">
            <table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">
                <tbody>
                <tr>
    <td width="1%">
<img border="0" src="../../images/dotnetCharting.gif" width="230" height="94"></td>
    <td width="99%" bgcolor="#BFC0DB">Report: 
 <ASP:DropDownList id=DropDownShow runat="server" name="DropDownShow" size="1">
    </ASP:DropDownList>&nbsp;By:&nbsp; 
<ASP:DropDownList id="DropDownBy" runat="server" name="DropDownBy" size="1">
    </ASP:DropDownList>
<ASP:DropDownList id="Month" runat="server" name="Month" size="1">
    </ASP:DropDownList>/
<ASP:DropDownList id="Day" runat="server" name="Day" size="1">
    </ASP:DropDownList>/
<ASP:DropDownList id="Year" runat="server" name="Year" size="1">
    </ASP:DropDownList>
Split By: 
    <ASP:DropDownList id="SplitByDropdown" runat="server" size="1"/>
 Limit Series:
 <asp:TextBox id="SplitByLimitTextbox" Width=25 runat="server" /> 
        <br>From Date: 
    <ASP:DropDownList id="MonthFrom" runat="server" name="MonthFrom" size="1">
    </ASP:DropDownList>/
<ASP:DropDownList id="DayFrom" runat="server" name="DayFrom" size="1">
    </ASP:DropDownList>/
<ASP:DropDownList id="YearFrom" runat="server" name="YearFrom" size="1">
    </ASP:DropDownList>
&nbsp;To Date: 
      <ASP:DropDownList id="MonthTo" runat="server" name="MonthTo" size="1">
    </ASP:DropDownList>/
<ASP:DropDownList id="DayTo" runat="server" name="DayTo" size="1">
    </ASP:DropDownList>/
<ASP:DropDownList id="YearTo" runat="server" name="YearTo" size="1">
    </ASP:DropDownList>
&nbsp;Limit Elements: <asp:TextBox id="TextBoxLimit" Width=25 runat="server" ></asp:TextBox>
Limit Mode:<ASP:DropDownList id="DropDownLimitMode" runat="server" name="DropDownLimitMode" size="1"> 
    </ASP:DropDownList>
	<asp:CheckBox id="ShowOther" Text="Show other" value="showOther" runat="server"/>
      <asp:CheckBox id="ShowValues" Text="Show Values" runat="server"/>
        <asp:CheckBox id="Average" Text="Average" runat="server"/>
      	<asp:CheckBox id="Sum" Text="Sum" runat="server"/>
      	<asp:CheckBox id="Mode" Text="Mode" runat="server"/>
		<asp:CheckBox id="Median" Text="Median" runat="server"/>
		<asp:CheckBox id="Min" Text="Minimum" runat="server"/>
		<asp:CheckBox id="Max" Text="Maximum" runat="server"/>
	
of series. Chart Type: 
    <ASP:DropDownList id="DropDownChartType" runat="server" name="DropDownChartType" size="1">
    </ASP:DropDownList>&nbsp; 
     Axis Scale:<ASP:DropDownList id="DropDownScale" runat="server" name="DropDownScale" size="1">
    </ASP:DropDownList>&nbsp;
    Transpose:
		<asp:CheckBox id="Transpose" runat="server"/>

<ASP:DropDownList id=Chart3D runat="server" name="Chart3D" size="1">
    </ASP:DropDownList>&nbsp; 
<ASP:DropDownList id=DropDownSeriesType runat="server" name="DropDownSeriesType" size="1">
    </ASP:DropDownList>
    &nbsp;Summary series: 
    <ASP:DropDownList id="DropDownSeriesAggregation" runat="server" name="DropDownSeriesAggregation" size="1">
    </ASP:DropDownList>
    <ASP:DropDownList id="SummerySeriesType" runat="server" name="SummerySeriesType" size="1">
    </ASP:DropDownList>
    <asp:Button id="ButtonDisplay" onclick="ButtonDisplay_Click" runat="server" Text="Display">
    </asp:Button>
                  </td>
  
                                        
                </tbody>
            </table>
            <DOTNET:Chart id="Chart" runat="server" ShowDataGrid="true" Visible="false" />
        </div>
    </form></body>
</html>

⌨️ 快捷键说明

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