#2
wube2019-07-01 15:35
|
程序代码:
<%@ Page Title="研发处" Language="VB" AutoEventWireup="false" CodeFile="WeekReport.aspx.vb" Inherits="SD_PM_WeekReport" %>
<head><title>周报表</title></head>
<body>
<asp:Label ID="lblDate" runat="server" Width="100%" Font-Size="Large" Font-Bold="true" BackColor="Yellow" ></asp:Label><br />
</body>
ASP.VB :
程序代码:
lblDate.Text = StartDate & " " & System.DateTime.Parse(StartDate).DayOfWeek.ToString() & " <===> " & EndDate & " " & System.DateTime.Parse(EndDate).DayOfWeek.ToString()
Dim chtTitle1 As New Web.UI.DataVisualization.Charting.Title("本周统计数量")
Chart1.Titles.Add(chtTitle1)
Chart1.Width = C_Width
Chart1.Height = C_Height
Chart1.BackColor = Drawing.Color.AliceBlue
Chart1.Series.Add("Series1")
Chart1.Series("Series1").LabelForeColor = Drawing.Color.Red
Chart1.Series("Series1").IsValueShownAsLabel = True
Chart1.Series("Series1")("DrawingStyle") = "Cylinder"
Chart1.Series("Series1").Points.DataBindXY(xValues1, yValues1)
Chart1.ChartAreas.Add("ChartArea1")
Chart1.ChartAreas("ChartArea1").BackColor = Drawing.Color.LightBlue
Chart1.ChartAreas("ChartArea1").AxisX.IntervalAutoMode = System.Web.UI.DataVisualization.Charting.IntervalAutoMode.VariableCount
Chart1.ChartAreas("ChartArea1").AxisX.IsLabelAutoFit = False
Chart1.ChartAreas("ChartArea1").AxisX.LabelStyle.Font = New System.Drawing.Font("Microsoft Sans Serif", 10, Drawing.FontStyle.Bold)
Chart1.ChartAreas("ChartArea1").AxisX.LabelAutoFitStyle = DataVisualization.Charting.LabelAutoFitStyles.None
Chart1.ChartAreas("ChartArea1").AxisX.Title = "人名"
Chart1.ChartAreas("ChartArea1").AxisY.Title = "件数"
Page.Controls.Add(Chart1)
Client IE HTML :
程序代码:
<html>
<head><title>周报表</title></head>
<body>
<span id="lblDate" style="display:inline-block;background-color:Yellow;font-size:Large;font-weight:bold;width:100%;">2019-06-03 Monday <===> 2019-06-09 Sunday</span>
<br />
<img id="ctl00" style="height:300px;width:1900px;border-width:0px;" alt="" src="/rdc/sd/pm/ChartImg.axd?i=charts_1/chart_1_12.png&g=cdf76a9cb70945a19045970896e7c284">
</body>
</html>
因为图片是动态及时产生的,要怎么将图片放到邮件中寄出?