Asp.net源码专业站
首页->商务办公->Asp.net简单会议事务系统>>Default.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Asp.net简单会议事务系统
当前文件:文件类型 SimpleMeeting/Default.aspx.cs[3K,2009-6-12 11:54:08]打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using System.Data.SqlClient; 12public partial class _Default : System.Web.UI.Page 13{ 14 protected void Page_Load(object sender, EventArgs e) 15 { 16 if (!this.IsPostBack) 17 { 18 string admin = "管理员"; 19 string user = "普通用户"; 20 string username = Convert.ToString(Session ["username"]); 21 SqlConnection cn = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["cn"]); 22 cn.Open(); 23 SqlCommand cmd = new SqlCommand("select count(*) from userinfo where role='" +admin+"'", cn); 24 this.Labadmincount.Text = Convert.ToString(cmd.ExecuteScalar ()); 25 SqlCommand cmd1 = new SqlCommand("select count(*) from userinfo where role='"+user+"'", cn); 26 this.Labusercount .Text = Convert.ToString(cmd1.ExecuteScalar()); 27 SqlCommand cmd2 = new SqlCommand("select count(*) from room", cn); 28 this.Labroomcount.Text = Convert.ToString(cmd2.ExecuteScalar()); 29 SqlCommand cmd3 = new SqlCommand("select count(*) from meeting", cn); 30 this.Labmeetingcount .Text = Convert.ToString(cmd3.ExecuteScalar()); 31 SqlCommand cmd4 = new SqlCommand("select count(*) from meeting where builder='" +Convert .ToString (Session ["username"])+"'", cn); 32 this.Labmymeetingcount .Text = Convert.ToString(cmd4.ExecuteScalar()); 33 SqlCommand cmd5 = new SqlCommand("select count(*) from meeting where person like'%" +username+"%'", cn); 34 this.Labmyjionmeetingcount .Text = Convert.ToString(cmd5.ExecuteScalar()); 35 SqlCommand cmd6 = new SqlCommand("select count(*) from userinfo where attr='在线'", cn); 36 this.Labonlinecount.Text = Convert.ToString(cmd6.ExecuteScalar()); 37 38 SqlCommand cmd7 = new SqlCommand("select count(*) from meeting where attr='待审批'", cn); 39 this.Label1 .Text = Convert.ToString(cmd7.ExecuteScalar()); 40 SqlCommand cmd8 = new SqlCommand("select count(*) from meeting where attr='已审批'", cn); 41 this.Label2.Text = Convert.ToString(cmd8.ExecuteScalar()); 42 SqlCommand cmd9= new SqlCommand("select count(*) from meeting where attr='已完成'", cn); 43 this.Label3.Text = Convert.ToString(cmd9.ExecuteScalar()); 44 SqlCommand cmd10 = new SqlCommand("select count(*) from userinfo", cn); 45 this.Labcount.Text = Convert.ToString(cmd10.ExecuteScalar()); 46 SqlCommand cmd11 = new SqlCommand("select count(*) from message where touser='"+Convert.ToString (Session ["username"])+"'", cn); 47 this.Labmessagecount .Text = Convert.ToString(cmd11.ExecuteScalar()); 48 this.PopupWin1.Message = "欢迎您!" + Session["username"] + "<br>" + "身&nbsp;份:" + Session["role"] + "<br>" + "上站次数:" + Session["loginnum"] + "<br>" + "最近访问:" + Session["loginouttime"] + "<br>" + "注册时间:" + Session["entertime"] + "<br>"; 49 50 cn.Close (); 51 } 52 } 53} 54
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net简单会议事务系统
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146