maindl.ascx.cs

来自「勇敢者论坛全部源代码。 支持SQL2000/Access数据库」· CS 代码 · 共 51 行

CS
51
字号
namespace doughty_cn
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;

	/// <summary>
	///		MainDL 的摘要说明。
	/// </summary>
	public partial class MainDL : System.Web.UI.UserControl
	{

		protected void Page_Load(object sender, System.EventArgs e)
		{
            //从web.config中读取显示条数。
			int PageSize=System.Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["MainList"]);
            //查询数据
            this.DataList1.DataSource = DBOperate.SelectFormForum("SELECT A.Q_ID,A.solved, A.author, A.ImageName, A.HiteCounter, A.AnsCounter, A.ReleaseTime, A.ReferTime, A.BigClass_ID, A.SmallClass_ID, A.kind, A.ReleaseTime, A.ReferTime, A.BigClass_ID, A.SmallClass_ID, A.kind, A.pith, Big_Class.BigClass_Name, Small_Class.SmallClass_Name, A.Q_content,A.Q_Note FROM Questions A,Small_Class, Big_Class WHERE A.SmallClass_ID = Small_Class.SmallClass_ID and A.BigClass_ID = Big_Class.BigClass_ID and (A.kind =4) AND( A.solved = 0) ORDER BY A.ReleaseTime DESC", 0, PageSize, "Questions");
            //绑定数据
            this.DataList1.DataBind();
            //查询数据
            this.DataList2.DataSource = DBOperate.SelectFormForum("SELECT A.Q_ID,A.solved, A.author, A.ImageName, A.HiteCounter, A.AnsCounter, A.ReleaseTime, A.ReferTime, A.BigClass_ID, A.SmallClass_ID, A.kind, A.ReleaseTime, A.ReferTime, A.BigClass_ID, A.SmallClass_ID, A.kind, A.pith, Big_Class.BigClass_Name, Small_Class.SmallClass_Name, A.Q_content,A.Q_Note FROM Questions A,Small_Class, Big_Class WHERE A.SmallClass_ID = Small_Class.SmallClass_ID and A.BigClass_ID = Big_Class.BigClass_ID and (A.kind > 0) AND (A.kind < 4) AND( A.solved = 0) ORDER BY A.ReleaseTime DESC", 0, PageSize, "Questions");
            //绑定数据
            this.DataList2.DataBind();
        }

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

		}
		#endregion
	}
}

⌨️ 快捷键说明

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