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

📄 loginok.aspx.cs

📁 图书馆的书目查询
💻 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 System.Data.SqlClient;

namespace Library_BS
{
	/// <summary>
	/// Main 的摘要说明。
	/// </summary>
	public class LoginOK : System.Web.UI.Page
	{
		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.Button btnBorrowQueury;
		protected System.Web.UI.WebControls.Label Label6;
		protected System.Web.UI.WebControls.Label Label7;
		protected System.Web.UI.WebControls.Label Label8;
		protected System.Web.UI.WebControls.Label Label9;
		protected System.Web.UI.WebControls.Label Label10;
		protected System.Web.UI.WebControls.Label Label11;
		protected System.Web.UI.WebControls.Label Label12;
		protected System.Web.UI.WebControls.Button btnBorrowLogQueury;
		protected System.Web.UI.WebControls.Button btnFineQueury;
		protected System.Web.UI.WebControls.Button btnBookQueury;
		protected System.Web.UI.WebControls.Button btnLovelyBookQue;
		protected System.Web.UI.WebControls.Button btnUpdatePerInfor;
		protected System.Web.UI.WebControls.Button btnUpdatePwd;
		protected System.Web.UI.WebControls.Label Label13;
		protected System.Web.UI.WebControls.Button btnGoonBorrow;
		protected System.Web.UI.WebControls.Label Label4;

		private void Page_Load(object sender, System.EventArgs e)
		{
			Label2.Text = Request["Register"];
			string connStr = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
			SqlConnection connection = new SqlConnection(connStr);
			connection.Open();

			string str = "select 编号 from 读者信息 where 注册名 ='"+Label2.Text+"'";
			SqlCommand command = new SqlCommand(str, connection);
			Label4.Text = command.ExecuteScalar().ToString();

			connection.Close();
		}

		#region Web 窗体设计器生成的代码
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.btnBorrowLogQueury.Click += new System.EventHandler(this.btnBorrowLogQueury_Click);
			this.btnFineQueury.Click += new System.EventHandler(this.btnFineQueury_Click);
			this.btnBookQueury.Click += new System.EventHandler(this.btnBookQueury_Click);
			this.btnBorrowQueury.Click += new System.EventHandler(this.btnBorrowQueury_Click);
			this.btnLovelyBookQue.Click += new System.EventHandler(this.btnLovelyBookQue_Click);
			this.btnUpdatePerInfor.Click += new System.EventHandler(this.btnUpdatePerInfor_Click);
			this.btnUpdatePwd.Click += new System.EventHandler(this.btnUpdatePwd_Click);
			this.btnGoonBorrow.Click += new System.EventHandler(this.btnGoonBorrow_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void btnUpdatePwd_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("UpdatePwd.aspx?UserID="+this.Label4.Text);
		}

		private void btnUpdatePerInfor_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("UpdatePerInfor.aspx?UserID="+this.Label4.Text);
		}

		private void btnBookQueury_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("BookQueury.aspx");
		}

		private void btnLovelyBookQue_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("LovelyBookQueury.aspx?UserID="+this.Label4.Text);
		}

		private void btnFineQueury_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("FineQueury.aspx");
		}

		private void btnBorrowLogQueury_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("BorrowLogQueury.aspx?UserID="+this.Label4.Text);
		}

		private void btnBorrowQueury_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("BorrowQueury.aspx?UserID="+this.Label4.Text);
		}

		private void btnGoonBorrow_Click(object sender, System.EventArgs e)
		{
			Response.Redirect("GoonBorrow.aspx");
		}
	}
}

⌨️ 快捷键说明

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