毕业设计:图书管理系统q(终稿)-精品(7)

2019-05-24 09:40

www.hnsoftedu.com2727

南软件职业学院

string sql = @\v5.115.810.9015) */

SELECT 'FALSE' 选择,

b.bookname 图书名称, a.cardno 借阅证编号, a.bookno 图书编号, a.borrowdate 借阅日期, a.fine 罚金,

a.renewdate 续借日期, a.returndate 归还日期, a.borrowstate 状态

FROM borrowinfo a, bookinfo b WHERE a.bookno = b.bookno\; this.ug00_Borrow.DataSource = ConnectSqlServer.ExecuteSelect(sql);

//GabrielTool.standardizationUltraGrid(this.ug00_Borrow); }

//借书

private void b02_borrow_Click(object sender, EventArgs e) {

string sql1 = @\v5.115.810.9015) */

INSERT INTO borrowinfo values(':cardno', ':bookno', convert (datetime,':borrowdate'),

CONVERT (datetime,':borrowdate'),

NULL, 0,

'借阅中')\;

sql1 = sql1.Replace(\, this.t02_cardno.Text); sql1 = sql1.Replace(\, GabrielTool.getValue(this.t00_bookname));

sql1 = sql1.Replace(\,

this.t03_BorrDatetime.DateTime.ToString(\));

if (ConnectSqlServer.ExecuteChange(sql1) == 1) {

知识改变命运 - 27 - 软件成就未来

www.hnsoftedu.com2828

南软件职业学院

MessageBox.Show(\添加成功!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information);

this.b00_borrowInfoSelect_Click(null, null); this.Bind_t00_bookname(); } else {

MessageBox.Show(\插入数据出错,请检查后重试!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }

//还书

private void b03_return_Click(object sender, EventArgs e) {

string sql2 = @\v5.115.810.9015) */

UPDATE borrowinfo

SET RETURNDATE = GETDATE(), FINE = FINE + :fine, BORROWSTATE = '已还' WHERE bookno = ':bookno'\;

sql2 = sql2.Replace(\, GabrielTool.getValue(this.t00_bookname)); sql2 = sql2.Replace(\, GabrielTool.getValue(this.t04_fine));

if (ConnectSqlServer.ExecuteChange(sql2) == 1) {

MessageBox.Show(\还书成功!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information);

this.b00_borrowInfoSelect_Click(null, null); } else {

MessageBox.Show(\还书出错,请检查后重试!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }

//续借

知识改变命运 - 28 - 软件成就未来

www.hnsoftedu.com2929

南软件职业学院

private void b04_continue_Click(object sender, EventArgs e) {

string sql2 = @\

SET RENEWDATE = GETDATE(), FINE = FINE + :fine WHERE bookno = ':bookno'\;

sql2 = sql2.Replace(\, GabrielTool.getValue(this.t00_bookname)); sql2 = sql2.Replace(\, GabrielTool.getValue(this.t04_fine));

if (ConnectSqlServer.ExecuteChange(sql2) == 1) {

MessageBox.Show(\续借成功!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information);

this.b00_borrowInfoSelect_Click(null, null); } else {

MessageBox.Show(\续借出错,请检查后重试!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }

//获得当前行信息

private void ug00_Borrow_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e) {

try {

GabrielTool.setValue(this.t00_bookname,

this.ug00_Borrow.ActiveRow.Cells[\图书编号\].Value.ToString()); this.t02_cardno.Text =

this.ug00_Borrow.ActiveRow.Cells[\借阅证编号\].Value.ToString(); this.t03_BorrDatetime.Value =

this.ug00_Borrow.ActiveRow.Cells[\借阅日期\].Value; GabrielTool.setValue(this.t04_fine,

this.ug00_Borrow.ActiveRow.Cells[\罚金\].Value.ToString()); }

catch (Exception ex)

知识改变命运 - 29 - 软件成就未来

www.hnsoftedu.com3030

南软件职业学院

{

MessageBox.Show(\获得当前行信息出错!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }

//删除

private void b01_delete_Click(object sender, EventArgs e) {

string sql2 = @\v5.115.810.9015) */

delete from borrowinfo

WHERE bookno = ':bookno'\;

sql2 = sql2.Replace(\, GabrielTool.getValue(this.t00_bookname));

if (ConnectSqlServer.ExecuteChange(sql2) == 1) {

MessageBox.Show(\删除成功!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information);

this.b00_borrowInfoSelect_Click(null, null); } else {

MessageBox.Show(\删除出错,请检查后重试!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } 其他模块省略

知识改变命运 - 30 - 软件成就未来


毕业设计:图书管理系统q(终稿)-精品(7).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:物探新方法、新技术

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: