没有合适的资源?快使用搜索试试~ 我知道了~
c#图书管理系统源代码(仿真实现).pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 184 浏览量
2021-12-18
10:57:52
上传
评论
收藏 652KB PDF 举报
温馨提示
试读
50页
c#图书管理系统源代码(仿真实现).pdf
资源推荐
资源详情
资源评论
成功信息网 www.020chenggong.com
摘要: 图书馆作为一种信息资源的集散地, 图书借阅频繁, 用户管理多变, 包含大量的信息
数据。对于这些数据的管理, 需要一个完善的图书管理系统来实现对图书, 用户的实时管理。
系统的主要任务就是对图书书目、 图书借阅、 图书用户查询进行统一管理, 达到各类用户的
需求。管理员对数据库进行操作,完成借阅、添加、删除、统计等各功能。
关键词:图书馆;信息管理;图书管理
(1)C#图书管理系统, 一般来说, 其开发环境应该为 Windows 系统下安装的 Visual Studio ,
最新版是 2010 版。
(2)如果系统需要使用数据库系统,还应该根据图书系统使用的数据库,安装相应的数据
库系统。如 SQL 的话,应该安装微软的 SQL Server 2005/2008;还可以使用其它的数据库,
如 access、oracle 等等。 1.登陆界面
主要代码:
public partial class LoginForm : Form{
public static string uacc;
public static string upsw;
public static string uname;
public static string usex;
public static string upart;
public static string uright;
public LoginForm()
{
InitializeComponent();
}
private void loginbtn_Click( object sender, EventArgs e)
{
if ( this .useracctxt.Text.Trim() == "" && this .pswtxt.Text == "" )
{
MessageBox.Show( " 请输入您的用户名和密码! " , " 提示! " );
return ;
}
try
{
string sql;
sql = "select * from tb_user where uacc='" + this .useracctxt.Text + "' and upsw='"
+ this .pswtxt.Text + "'www.feipin100.com" ;
成功信息网 www.020chenggong.com
OleDbDataReader dr = DBHelp.OleReader(sql);
dr.Read();
if (dr.HasRows)
{
uacc = this .useracctxt.Text;
upsw = this .pswtxt.Text;
uname = dr[ "uname"].ToString();
usex = dr[ "usex" ].ToString();
upart = dr[ "upart" ].ToString();
uright = dr[ "uright" ].ToString();
MainForm af = new MainForm(this );
this .Hide();
this .useracctxt.Clear();
this .pswtxt.Clear();
af.Show();
}
else
{
MessageBox.Show( " 账号或密码错误! " , " 提示! " );
this .useracctxt.Clear();
this .pswtxt.Clear();
this .useracctxt.Focus();
}
}
catch ( Exception )
{
MessageBox.Show( " 数据库无法连接! " , " 警告! " );
}
}
private void cancelbtn_Click( object sender, EventArgs e)
{
Application .Exit();
}
private void LoginForm_Closing( object sender, FormClosingEventArgs e)
{
Application .Exit();
}
}
2. 主界面(图较小,自己可以拉大点)
成功信息网 www.020chenggong.com
主要代码就不写了,很简单。
3. 权限设置
主要代码:
public partial class RightSet : Form
{
public RightSet()
{
InitializeComponent();
}
private void RightSet_Load( object sender, EventArgs e)
{
this .rightbox.SelectedIndex = 0;
//this.treeright.ExpandAll();
Fill();
}
private void okbtn_Click( object sender, EventArgs e)
{
if ( this .txtnum.Text == string .Empty)
{
MessageBox.Show( " 请输入最大借阅图书数量! " , " 提示! " );
成功信息网 www.020chenggong.com
return ;
}
if ( this .txtday.Text == string .Empty)
{
MessageBox.Show( " 请输入最大借阅图书时间! " , " 提示! " );
return ;
}
if ( this .txtcost.Text == string .Empty)
{
MessageBox.Show( " 请输入借书押金金额! " , " 提示! " );
return ;
}
if ( this .txtfine.Text == string .Empty)
{
MessageBox.Show( " 请输入超期罚款金额! " , " 提示! " );
return ;
}
if ( this .txttim.Text == string .Empty)
{
MessageBox.Show( " 请输入图书遗失罚款倍数! " , " 提示! " );
return ;
}
ArrayList arr = new ArrayList ();
foreach ( TreeNode nodes in this .treeright.Nodes)
{
if (nodes.Checked)
{
arr.Add( "1" );
}
else
{
arr.Add( "0" );
}
foreach ( TreeNode node in nodes.Nodes)
{
if (node.Checked)
{
arr.Add( "1" );
}
else
{
arr.Add( "0" );
}
成功信息网 www.020chenggong.com
}
}
string [] a= new string [11];
for ( int i = 0; i < arr.Count; i++)
{
if (arr[i].ToString().Trim() == "1" )
{
a[i] = "yes" ;
}
else
{
a[i] = "no" ;
}
}
string sql = string .Empty;
sql += "select * from tb_right where uright='" + this .rightbox.Text + "'" ;
DataTable dt = DBHelp.ExeOleCommand(sql);
bool b = false ;
while (dt.Rows.Count != 0)
{
b = true ;
break ;
}
string sql1;
if (b)
{
sql1 = "update tb_right set " ;
sql1 += "maxbook='" + this .txtnum.Text + "'," ;
sql1 += "maxdate='" + this .txtday.Text + "'," ;
sql1 += "rcost='" + this .txtcost.Text + "'," ;
sql1 += "rfine='" + this .txtfine.Text + "'," ;
sql1 += "rtim='" + this .txttim.Text + "'," ;
sql1 += "rbm='" + a[0] + "'," ;
sql1 += "rum='" + a[1] + "'," ;
sql1 += "rrm='" + a[2] + "'," ;
sql1 += "rborm='" + a[3] + "'," ;
sql1 += "ris='" + a[4] + "'," ;
sql1 += "rbis='" + a[5] + "'," ;
剩余49页未读,继续阅读
资源评论
屈子1
- 粉丝: 14
- 资源: 7万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 知识蒸馏-基于Pytorch通过匹配训练轨迹进行数据集蒸馏-附项目源码+流程教程-优质项目实战.zip
- 儿童节 python庆祝代码简要介绍-20240601.docx
- 知识蒸馏-基于Pytorch实现的语义分割结构化知识蒸馏算法-附项目源码+流程教程-优质项目实战.zip
- 小白物联网智能家居毕设参考STM32+ESP8266/MQTT+OneNet+UniApp
- BeanUtil.java,对象属性拷贝工具
- 糖尿病肾病检测数据集VOC+YOLO格式4122张5类别.7z
- win10/11 更新禁用/开启
- IMG_3534.CR2.cr2
- FileZilla客户端
- 删除win10/11安全中心
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功