文档详情

程序设计图书馆管理系统.doc

发布:2016-11-25约6.08千字共8页下载文档
文本预览下载声明
泉州师范学院 《ASP.NET程序设计》 图书馆管理系统 学 号: 111303048 姓 名: 刘佳 学 院: 数计学院 专 业: 信息管理与信息系统 班 级: 11级 成 绩: 1 背景与目的 《ASP.NET课程设计》是本学期的一本很重要的专业课,本次课程设计就是为了检测本学期对这本书的掌握情况。本次课程设计也将作为期末考评。 2 开发环境与开发工具 网站开发环境:Microsoft Visual Studio 2008集成开发环境。 网站开发语言:C#。 数据库:Microsoft Visual Studio 2008内置数据库。 开发环境运行平台:Windows xp。 3 主要功能 主要实现了简单的登录功能、注册功能和基本的增删查改的功能。 4 设计与实现 4.1 数据库设计与实现 表1 管理员表 表2 读者信息表 表3图书信息表 表4借还表 表5 4.2 系统设计与实现 4.2.1构建网站配置文件、全局文件。 配置文件关键代码: appSettings add key=conn value=Data Source=S47;Initial Catalog=LibraryManage;Integrated Security=True/ /appSettings 4.2.2读者页面设计 代码 public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) this.Get_Connection(); } protected void Get_Connection() { string s_conn = System.Configuration.ConfigurationManager.AppSettings[conn].ToString(); SqlConnection conn = new SqlConnection(s_conn); string sql = select * from BookInfo,Reader,lendinfo where reader.readerid =lendinfo.rid and bookinfo.id=lendinfo.bid and readerid=+Session[readerid].ToString()+; SqlDataAdapter adp = new SqlDataAdapter(sql, conn); DataSet ds = new DataSet(); adp.Fill(ds); DataView dv = ds.Tables[0].DefaultView; //dv.Sort = ViewState[sort].ToString() + + ViewState[dire].ToString(); this.GridView1.DataSource = ds; this.GridView1.DataBind(); } protected void bindReader() { string s_conn = System.Configuration.ConfigurationManager.AppSettings[conn].ToString(); SqlConnection conn = new SqlConnection(s_conn); string BookID = TextBox1.Text.ToString(); string bookSql = select * from bookinfo where ID= + BookID + ; SqlDataAdapter adp = new SqlDataAd
显示全部
相似文档