77范文网 - 专业文章范例文档资料分享平台

C#图书管理系统 C#课程设计 图书管理系统(5)

来源:网络收集 时间:2019-01-10 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

黄淮学院计算机科学系课程设计说明书

this.label1.TabIndex = 0;

this.label1.Text = \图书管理系统\; // // label2 //

this.label2.AutoSize = true;

this.label2.Font = new System.Drawing.Font(\宋体\, 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));

this.label2.Location = new System.Drawing.Point(34, 78); this.label2.Name = \;

this.label2.Size = new System.Drawing.Size(368, 32); this.label2.TabIndex = 1;

this.label2.Text = \打开SQL Server企业管理器,启动SQL相关服务,\\r\\n连接数据库。\\r\\n\; // // label3 //

this.label3.AutoSize = true;

this.label3.Font = new System.Drawing.Font(\宋体\, 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));

this.label3.Location = new System.Drawing.Point(34, 140); this.label3.Name = \;

this.label3.Size = new System.Drawing.Size(400, 64); this.label3.TabIndex = 2;

this.label3.Text = \鼠标右键点击【数据库】->【附加(A)...】,然后\\r\\n单击【...】按钮,选择本程序所在文件夹下的中的\\r\\nDataBase文件夹下的Library.mdf文\ + \件,其他采用默认设\\r\\n置,然后单击【确定】按钮\; // // label4 //

this.label4.AutoSize = true;

this.label4.Font = new System.Drawing.Font(\宋体\, 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));

this.label4.Location = new System.Drawing.Point(34, 233); this.label4.Name = \;

this.label4.Size = new System.Drawing.Size(272, 16); this.label4.TabIndex = 3;

this.label4.Text = \如需帮助请登http://www.google.com\;

this.label4.Click += new System.EventHandler(this.label4_Click); // // Help //

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Olive;

21

this.ClientSize = new System.Drawing.Size(472, 349); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = \; this.Text = \; this.ResumeLayout(false); this.PerformLayout();

}

#endregion

private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; }

}

6.2图书信息模块

图书信息模块包含图书入库和图书查询两个子模块 图书入库:添加新的图书并保存信息。

图书查询:可按图书代码,图书名称,作者,出版日期,出版社五项进行查询,可删除一些废弃图书的信息,并将修改后的数据入库保存,如图6.2。

图书信息 图书入库 图书查询 添加 重置 查询 删除 重置 退出

图6.2 图书信息 代码:namespace 登陆

22

黄淮学院计算机科学系课程设计说明书

{

class LibraryManage {

private SqlConnection sqlConnection1 = null; private SqlCommand sqlCommand1 = null; private string strSql = null; public LibraryManage() {

this.sqlConnection1 = new SqlConnection(dbconnection.connection); this.sqlCommand1 = new SqlCommand();

this.sqlCommand1.CommandType = CommandType.Text; this.sqlCommand1.Connection = this.sqlConnection1;

// TODO: 在此处添加构造函数逻辑 // }

public void Library_add(string Lno, string Lname, string Wr, string Lpress, string Lbz) {

DateTime Ldate = Convert.ToDateTime(DateTime.Now.ToString(\)); this.strSql = \ +

\ + Lno + \ + Lname + \ + Wr + \ + Ldate + \ + Lpress + \ + Lbz + \;

this.sqlCommand1.CommandText = this.strSql; try {

this.sqlConnection1.Open(); this.sqlCommand1.ExecuteNonQuery(); //Lno_add(Lno); }

catch (System.Exception E) {

Console.WriteLine(E.ToString()); } finally {

this.sqlConnection1.Close(); } }

public void ts_del(string Lno) {

this.strSql = \ + \ + Lno + \; this.sqlCommand1.CommandText = this.strSql; try

23

{

this.sqlConnection1.Open(); this.sqlCommand1.ExecuteNonQuery(); }

catch (System.Exception E) {

Console.WriteLine(E.ToString()); } finally {

this.sqlConnection1.Close(); } } }

}

6.3 借阅信息模块

图书信息模块包含借阅情况和借阅查询两个子模块。

借阅情况:添加新的借阅信息,将读者号,图书号,借书日期和应还书日期保存。 借阅查询:可更具读者号和图书编号进行查询,还书时在此模块中删除该读者的借阅信息,并将修改后的信息保存,如图6.3。

借阅信息 借阅情况 借阅查询 添加 重置 查询 重置 全部 删除 退出

图6.3 图书信息 代码:namespace 登陆

{

class jieyue

24

黄淮学院计算机科学系课程设计说明书

{

private SqlConnection sqlConnection1 = null; private SqlCommand sqlCommand1 = null; private string strSql = null; public jieyue() {

this.sqlConnection1 = new SqlConnection(dbconnection.connection); this.sqlCommand1 = new SqlCommand();

this.sqlCommand1.CommandType = CommandType.Text; this.sqlCommand1.Connection = this.sqlConnection1;

// TODO: 在此处添加构造函数逻辑 // }

public void Jieyue_add(string Rno, string Lno) {

DateTime Date = Convert.ToDateTime(DateTime.Now.ToString(\)); DateTime Redate = Convert.ToDateTime(DateTime.Now.ToString(\)); this.strSql = \ +

\ + Rno + \ + Lno + \ + Date + \ + Redate + \; this.sqlCommand1.CommandText = this.strSql; try {

this.sqlConnection1.Open(); this.sqlCommand1.ExecuteNonQuery(); //Lno_add(Lno); }

catch (System.Exception E) {

Console.WriteLine(E.ToString()); } finally {

this.sqlConnection1.Close(); } }

public void jieyue_del(string Lno)

{

this.strSql = \ + \ + Lno + \; //this.strSql = \

this.sqlCommand1.CommandText=this.strSql;

25

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库C#图书管理系统 C#课程设计 图书管理系统(5)在线全文阅读。

C#图书管理系统 C#课程设计 图书管理系统(5).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/417324.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: