📄 surgeriesbydatereport.aspx.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Caisis.DataAccess;
using Caisis.UI.Core.Classes;
namespace Caisis.UI.Modules.All.Reports
{
/// <summary>
/// Summary description for SurgeriesByDateReport.
/// </summary>
public class SurgeriesByDateReport : BasePage
{
protected Repeater reportResults;
protected System.Web.UI.HtmlControls.HtmlSelect year;
protected bool displayDate;
protected string resultMessage = "";
protected System.Web.UI.HtmlControls.HtmlContainerControl ReportContentBody;
protected string reportTitle;
protected Label SelectYearLabel;
override protected void Page_Load(object sender, System.EventArgs e)
{
displayDate = false;
year.Attributes.Add("onChange", "document.Form1.submit();");
if(Page.IsPostBack)
{
SelectYearLabel.Text = "<br/><br/><strong>Surgeries for the year:</strong> ";
ReportDa da = new ReportDa();
DataSet ds = da.GetSurgeriesByDate(year.Value);
if (ds.Tables.Count != 0)
{
reportResults.DataSource = ds.Tables[0].DefaultView;
reportResults.DataBind();
if (ds.Tables[0].Rows.Count == 0)
{
resultMessage = "There are no records for " + year.Value +".";
}
}
if (year.Value.Equals("All") || year.Value.Equals(""))
{
displayDate = true;
}
}
else
{
year.Items.Insert(0,new ListItem("1998"));
year.Items.Insert(0,new ListItem("1999"));
year.Items.Insert(0,new ListItem("2000"));
year.Items.Insert(0,new ListItem("2001"));
year.Items.Insert(0,new ListItem("2002"));
year.Items.Insert(0,new ListItem("2003"));
year.Items.Insert(0,new ListItem("2004"));
year.Items.Insert(0,new ListItem("2005"));
year.Items.Insert(0,new ListItem("All"));
year.Items.Insert(0,new ListItem(""));
}
reportTitle = "Surgeries by Date";
ReportContentBody.Attributes.Add("onLoad","top.DataAnalysisContainer.setFormTitle('"+this.reportTitle+"');top.DataAnalysisContainer.MM_showHideLayers('buttonsLayer','','show');");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -