简单的图书前后台管理系统
实现简单的图书管理系统,完成前台的借阅,与后台的图书管理
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 403 2009-06-08 10:50 librarySystemlibrarySystemapp.config
文件 495616 2009-06-23 08:47 librarySystemlibrarySysteminDebuglibrary.mdb
文件 294912 2009-06-23 11:31 librarySystemlibrarySysteminDebuglibrarySystem.exe
文件 403 2009-06-08 10:50 librarySystemlibrarySysteminDebuglibrarySystem.exe.config
文件 114176 2009-06-23 11:31 librarySystemlibrarySysteminDebuglibrarySystem.pdb
文件 5632 2005-12-08 14:51 librarySystemlibrarySysteminDebuglibrarySystem.vshost.exe
文件 403 2009-06-08 10:50 librarySystemlibrarySysteminDebuglibrarySystem.vshost.exe.config
文件 4362 2009-06-23 11:29 librarySystemlibrarySystemorrow.cs
文件 11416 2009-06-23 11:29 librarySystemlibrarySystemorrow.Designer.cs
文件 42295 2009-06-23 11:29 librarySystemlibrarySystemorrow.resx
文件 4034 2009-06-22 18:06 librarySystemlibrarySystemcontr.cs
文件 15735 2009-06-22 18:06 librarySystemlibrarySystemcontr.Designer.cs
文件 10574 2009-06-22 18:06 librarySystemlibrarySystemcontr.resx
文件 441 2009-06-22 17:34 librarySystemlibrarySystemdools.cs
文件 61441 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.Designer.cs
文件 3 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.xsc
文件 19942 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.xsd
文件 3 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.xss
文件 5388 2009-06-23 11:29 librarySystemlibrarySystemlibrarySystem.csproj
文件 2343 2009-06-22 18:06 librarySystemlibrarySystemlogin.cs
文件 8090 2009-06-23 10:36 librarySystemlibrarySystemlogin.Designer.cs
文件 133749 2009-06-23 10:36 librarySystemlibrarySystemlogin.resx
文件 791 2009-06-23 11:29 librarySystemlibrarySystemlogin2.cs
文件 4419 2009-06-23 11:29 librarySystemlibrarySystemlogin2.Designer.cs
文件 134099 2009-06-23 11:29 librarySystemlibrarySystemlogin2.resx
文件 24616 2009-06-23 11:29 librarySystemlibrarySystemobjDebuglibrarySystem.borrow.resources
文件 3058 2009-06-23 10:07 librarySystemlibrarySystemobjDebuglibrarySystem.contr.resources
文件 1140 2009-06-23 11:31 librarySystemlibrarySystemobjDebuglibrarySystem.csproj.GenerateResource.Cache
文件 294912 2009-06-23 11:31 librarySystemlibrarySystemobjDebuglibrarySystem.exe
文件 85772 2009-06-23 10:36 librarySystemlibrarySystemobjDebuglibrarySystem.login.resources
............此处省略31个文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Timers;
using System.Data.OleDb;
namespace librarySystem
{
public partial class borrow : Form
{
public borrow()
{
InitializeComponent();
}
private void borrowBt1_Click(object sender EventArgs e)
{
readers readers=new readers();
DateTime td=new DateTime();
td=System.DateTime.Now;
if (txtBookid.Text == ““ || txtBookname.Text == ““ || txtReaderid.Text == ““ || txtReadername.Text == ““)
{
MessageBox.Show(“信息不完整!请完善信息......“);
}
else
{
readers.setbookid(Convert.ToInt32(this.txtBookid.Text));
readers.setbookname(this.txtBookname.Text);
readers.setreaderid(Convert.ToInt32( this.txtReaderid.Text));
readers.setreadername(this.txtReadername.Text);
readers.setborrowdata(td);
readers.setreturndata(td.AddDays(30));
string strConnection = “Provider=Microsoft.Jet.OleDb.4.0;Data Source=library.mdb“;
OleDbConnection mycon = new OleDbConnection(strConnection);
try
{
mycon.Open();
}
catch (OleDbException oledbe)
{
MessageBox.Show(oledbe.Message “连接失败对话框“);
return;
}
string sqlstr1 =“select * from reader where readerid=“ + readers.getreaderid() + “ and readername=‘“+readers.getreadername()+“‘“;
string sqlstr2 = “select * from book where bookid=“ + readers.getbookid() + “ and bookname=‘“+readers.getbookname()+“‘“;
string sqlstr3 = “select * from records where bookid=“ + readers.getbookid() + “ and readerid=“+readers.getreaderid()+““;
OleDbCommand cmd1 = new OleDbCommand(sqlstr1 mycon);
OleDbCommand cmd2 = new OleDbCommand(sqlstr2 mycon);
OleDbCommand cmd3 = new OleDbCommand(sqlstr3 mycon);
int count1 = Convert.ToInt32(cmd1.ExecuteScalar());
int count2 = Convert.ToInt32(cmd2.ExecuteScalar());
int count3 = Convert.ToInt32(cmd3.ExecuteScalar());
if (count1 <= 0)
{
MessageBox.Show(“读者信息库没有该学生信息,或者你输入的学好与用户名不一致,您无法借阅“);
}
if (count2 <= 0)
{
MessageBox.Show(“书库没有您要借阅的书目ID,或者你输入的数目编号与书名不一致,请查证后再借阅“);
}
else
{
if (count3 > 0)
{
MessageBox.Show(“您已经借阅了本书,不能再借“);
}
else
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 403 2009-06-08 10:50 librarySystemlibrarySystemapp.config
文件 495616 2009-06-23 08:47 librarySystemlibrarySysteminDebuglibrary.mdb
文件 294912 2009-06-23 11:31 librarySystemlibrarySysteminDebuglibrarySystem.exe
文件 403 2009-06-08 10:50 librarySystemlibrarySysteminDebuglibrarySystem.exe.config
文件 114176 2009-06-23 11:31 librarySystemlibrarySysteminDebuglibrarySystem.pdb
文件 5632 2005-12-08 14:51 librarySystemlibrarySysteminDebuglibrarySystem.vshost.exe
文件 403 2009-06-08 10:50 librarySystemlibrarySysteminDebuglibrarySystem.vshost.exe.config
文件 4362 2009-06-23 11:29 librarySystemlibrarySystemorrow.cs
文件 11416 2009-06-23 11:29 librarySystemlibrarySystemorrow.Designer.cs
文件 42295 2009-06-23 11:29 librarySystemlibrarySystemorrow.resx
文件 4034 2009-06-22 18:06 librarySystemlibrarySystemcontr.cs
文件 15735 2009-06-22 18:06 librarySystemlibrarySystemcontr.Designer.cs
文件 10574 2009-06-22 18:06 librarySystemlibrarySystemcontr.resx
文件 441 2009-06-22 17:34 librarySystemlibrarySystemdools.cs
文件 61441 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.Designer.cs
文件 3 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.xsc
文件 19942 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.xsd
文件 3 2009-06-08 10:50 librarySystemlibrarySystemlibraryDataSet.xss
文件 5388 2009-06-23 11:29 librarySystemlibrarySystemlibrarySystem.csproj
文件 2343 2009-06-22 18:06 librarySystemlibrarySystemlogin.cs
文件 8090 2009-06-23 10:36 librarySystemlibrarySystemlogin.Designer.cs
文件 133749 2009-06-23 10:36 librarySystemlibrarySystemlogin.resx
文件 791 2009-06-23 11:29 librarySystemlibrarySystemlogin2.cs
文件 4419 2009-06-23 11:29 librarySystemlibrarySystemlogin2.Designer.cs
文件 134099 2009-06-23 11:29 librarySystemlibrarySystemlogin2.resx
文件 24616 2009-06-23 11:29 librarySystemlibrarySystemobjDebuglibrarySystem.borrow.resources
文件 3058 2009-06-23 10:07 librarySystemlibrarySystemobjDebuglibrarySystem.contr.resources
文件 1140 2009-06-23 11:31 librarySystemlibrarySystemobjDebuglibrarySystem.csproj.GenerateResource.Cache
文件 294912 2009-06-23 11:31 librarySystemlibrarySystemobjDebuglibrarySystem.exe
文件 85772 2009-06-23 10:36 librarySystemlibrarySystemobjDebuglibrarySystem.login.resources
............此处省略31个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)