2023年图书馆管理系统(用c#做系统,根据.net所学内容,软件是vs).docx
2023年图书馆管理系统(用c#做系统,根据.net所学内容,软件是vs)下面是我为大家整理的图书馆管理系统(用c#做系统,根据.net所学内容,软件是vs),供大家参考。1. 登录界面 :using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls;public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e) string Name = TextBox1.Text; string Pwd = TextBox2.Text; if (Name= admin Pwd= 123) Response.Redirect(mainpage.aspx); 2. 图书信息添加: protected void Button1_Click(object sender, EventArgs e) SqlConnection sqlCon = new SqlConnection(); sqlCon.ConnectionString = Data Source=XP-202309212054SQLEXPRESS;Initial Catalog=LibraryM;Integrated Security=True; sqlCon.Open(); string bkId = this.TextBox1.Text; string bkName = this.TextBox2.Text; string bkType = this.DropDownList1.Text; string writer = this.TextBox3.Text; string storage = this.TextBox4.Text; string s = insert into bookInfo(bookId,bookName,bookType,writer,storage) values(" + bkId + "," +bkName + "," + bkType + "," + writer + ", + storage + ); SqlCommand com = new SqlCommand(s, sqlCon); int i = com.ExecuteNonQuery(); Response.Redirect(bookInformation.aspx); protected void Button2_Click(object sender, EventArgs e) this.TextBox1.Text = ; this.TextBox2.Text = ; this.DropDownList1.Text = ; this.TextBox3.Text = ; 3. 图书归还:样式:bodymargin:0px; padding:0px; text-align:center; background-color:#CCFFFF; #pagemargin-left:auto; margin-right:auto; width:778px; #leftmargin:0px; padding:0px; #left ulmargin:0px; list-style:none; #left ul lifont-family:Arial, Helvetica, sans-serif; float:left; width:140px; height:30px; #headwidth:778px;margin-left:auto; margin-right:auto; #textwidth:778px;margin-left:auto; margin-right:auto; line-height:130%;4. 读书信息添加: SqlConnection con = new SqlConnection(); con.ConnectionString = Data Source=XP-202309212054SQLEXPRESS;Initial Catalog=LibraryM;Integrated Security=True; con.Open(); string s = insert into readInfo(ID ,name, Dpartment,class) values(" + this.TextBox1.Text + "," + this.TextBox2.Text + ","+ this.DropDownList1.Text + "," + this.TextBox3.Text + "); SqlCommand com = new SqlCommand(s, con); int j = com.ExecuteNonQuery(); Response.Redirect(readerInformation.aspx);protected void Button2_Click(object sender, EventArgs e) this.TextBox1.Text = ; this.TextBox2.Text = ; this.DropDownList1.Text = ; this.TextBox3.Text = ; 1. 登陆界面和首页两个界面: 2. 图书信息添加: