收藏 分销(赏)

图书馆管理系统(用c#做系统-根据.net所学内容-软件是vs).doc

上传人:仙人****88 文档编号:12012652 上传时间:2025-08-27 格式:DOC 页数:5 大小:394KB 下载积分:10 金币
下载 相关 举报
图书馆管理系统(用c#做系统-根据.net所学内容-软件是vs).doc_第1页
第1页 / 共5页
图书馆管理系统(用c#做系统-根据.net所学内容-软件是vs).doc_第2页
第2页 / 共5页


点击查看更多>>
资源描述
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-201209212054\\SQLEXPRESS;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.图书归还:CSS样式: body{margin:0px; padding:0px; text-align:center; background-color:#CCFFFF;} #page{margin-left:auto; margin-right:auto; width:778px;} #left{margin:0px; padding:0px; } #left ul{margin:0px; list-style:none;} #left ul li{font-family:Arial, Helvetica, sans-serif; float:left; width:140px; height:30px;} #head{width:778px;margin-left:auto; margin-right:auto;} #text{width:778px;margin-left:auto; margin-right:auto; line-height:130%;} 4.读书信息添加: { SqlConnection con = new SqlConnection(); con.ConnectionString = "Data Source=XP-201209212054\\SQLEXPRESS;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.图书信息添加:
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服