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

📄 desktop.aspx.cs

📁 ASP.NET的一些开发实例,有论坛管理系统等
💻 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;

namespace BDStudioBase.syssoft
{
	/// <summary>
	/// desktop 的摘要说明。
	/// </summary>
	public class desktop : FormBase
	{
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Label Label2;
		protected System.Web.UI.WebControls.Label Label3;
		protected System.Web.UI.WebControls.Table Table1;
 		protected Gfunction Gfunction=new Gfunction();
	    protected COM_Message COM_Message=new COM_Message();
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			this.Label1.Text=(string)Session["username"];
			this.Label3.Text=Gfunction.DataTimeValue(0,0);
			TableInit1();
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void TableInit1()
		{
			TableRow tRow;
			TableCell tCell;
			//生成标题
			tRow= new TableRow();
			tRow.Height=20;
			tRow.CssClass="txt_box6";
			tCell=new TableCell();
			tCell.Text="收到的消息";
			tCell.ColumnSpan=3;
			tRow.Cells.Add(tCell);
			Table1.Rows.Add(tRow);

			string sEmp="["+(string)Session["userid"]+"]";
			string[] fieldValue={sEmp,""};
			DataSet dsForAll=COM_Message.DsMainListForAll(fieldValue);
			//dsInfor=drop.DsInformation("ScheType");
			foreach(DataRow row in dsForAll.Tables[0].Rows)
			{
				tRow= new TableRow();
				tRow.Height=25;
				tRow.CssClass="dbtable_data1";
				//标题
				tCell = new TableCell();
				System.Web.UI.WebControls.HyperLink hlk = new System.Web.UI.WebControls.HyperLink();
				hlk.Text=row["m_title"].ToString();
				hlk.NavigateUrl="MessageDisplay.aspx?as_pk="+row["ms_num"].ToString()+"&parentwindow=desktop";
				tCell.Controls.Add(hlk);
				tCell.Width=new Unit(350);
				tCell.CssClass="dbtable_data4";
				tRow.Cells.Add(tCell);

				//发送人
				tCell = new TableCell();
				tCell.Text=row["start_emp"].ToString();
				tCell.Width=new Unit(50);
				tRow.Cells.Add(tCell);

				//发送时间
				tCell = new TableCell();
				tCell.Text=row["m_date"].ToString();
				tCell.Width=new Unit(300);
				tRow.Cells.Add(tCell);

				Table1.Rows.Add(tRow);
			}
		}
	}
}

⌨️ 快捷键说明

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