📄 convocationwatchtowerview.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;
namespace OI.convocation
{
/// <summary>
/// convocationwatchtowerView 的摘要说明。
/// </summary>
public class convocationwatchtowerView : OI.PageBase
{
protected System.Web.UI.WebControls.Label LabelTitle;
protected System.Web.UI.WebControls.Label LabelSpeaker;
protected System.Web.UI.WebControls.Label LabelAudience;
protected System.Web.UI.WebControls.Label LabelLocation;
protected System.Web.UI.WebControls.Label LabelContent;
protected System.Web.UI.WebControls.Label Labelusername;
protected System.Web.UI.WebControls.Label LabelTalkDate;
protected System.Web.UI.WebControls.Label LabelMemo;
protected OI.DatabaseOper .DatabaseConnect Dbc=new OI.DatabaseOper.DatabaseConnect ();
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if (Session["userid"]==null)
{
Response.Write ("<script>alert('超时,请重新登录');top.location.href='../userpass.aspx';</script>");
return ;
}
if (!Page.IsPostBack )
{
string id=Request.QueryString ["id"].ToString ();
CreateDataSource(id);
}
}
private void CreateDataSource(string talkid)
{
string str=" select m.*,au.username from meetrecord m ,accounts_users au ";
str += " where m.userid=au.userid and m.talkid="+talkid;
DataSet ds=new DataSet ();
ds=Dbc.getBinding (str,"t");
DataRow dr=ds.Tables[0].Rows[0];
LabelSpeaker.Text =dr["Speaker"].ToString ();
LabelTitle.Text =dr["Title"].ToString ();
LabelAudience.Text =dr["Audience"].ToString ();
LabelLocation.Text =dr["Location"].ToString ();
LabelContent.Text =dr["Content"].ToString ().Replace ("\r\n","<br/>");
Labelusername.Text =dr["username"].ToString ();
LabelTalkDate.Text =dr["TalkDate"].ToString ();
LabelMemo.Text =dr["Memo"].ToString ().Replace ("\r\n","<br>");
}
#region Web 窗体设计器生成的代码
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
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -