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

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

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

try { }

catch(System.Exception E) { } finally { }

this.sqlConnection1.Close(); Console.WriteLine(E.ToString()); this.sqlConnection1.Open(); this.sqlCommand1.ExecuteNonQuery();

} } }

6.4 读者信息模块

读者信息模块包含了读者信息和读者信息查询两个子模块

读者信息:添加新读者的读者号,姓名,性别,所在系,年龄并将修改后的信息入库保存

读者信息查询:可按照读者号,姓名,性别,所在系,年龄五种类型进行查询,可删除读者的信息并将修改后的信息保存,如图6.4。

读者信息 读者信息 读者信息查询 添加 重置 查询 重置 全部 删除 退出

图6.4 读者信息

26

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

代码: namespace 登陆

{

class duzhe {

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

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

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

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

public void dz_add(string Rno, string Rname, string Rsex, string Rdep, int Rage) {

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

\ + Rno + \ + Rname + \ + Rsex + \ + Rdep + \ + Rage + \; 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 dz_del(string Rno) {

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

27

{

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

catch (System.Exception E) {

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

this.sqlConnection1.Close(); } } } }

7 系统测试

具体操作如下:

(1)打开数据库SQL Service 2005,数据库右键选择‘附加’,选择要添加的数据库,如图

图1 添加数据库

28

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

(2)打开VS 2008 选择 文件>打开->文件,如图2

图2 用VS 2008打开登陆文件

(3)编译后可进入登陆界面,输入用户名及密码就可以进入图书管理系统了见图3和图4

29

图3 登陆界面

图4 图书借阅管理界面

(4)进人 图书信息->图书入库 界面,可以向管理系统中添加新的图书,如图5-1

30

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

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