资源简介
基于VS2010+C#+SQL Server 开发的图书管理系统 用户账户:lp 密码:lp 管理员:admin 密码:admin 附数据库 sql server 2008 此资源仅供学习!
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public static class Pub
{
public static int id = 0;
public static string Server = “DESKTOP-R11QIRD\\LPIECES“;
public static string Database = “D:\\VS\\期末作品\\WINDOWSFORMSAPPLICATION1\\WINDOWSFORMSAPPLICATION1\\DATAbase1.MDF“;
public static string Uid = “sa“;
public static string Pwd = “18344103923“;
}
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender EventArgs e)
{
int count = 0;
if (count > 3)
{
MessageBox.Show(“你输入的次数超过3次程序马上关闭!“);
Application.Exit();
}
else if ( yhm.Text.Trim() == ““ || mm.Text.Trim() == ““)
{
MessageBox.Show(“用户名或密码不能为空!“);
yhm.Focus();
return;
}
else {
if (this.radioButton2.Checked == true)
{
SqlConnection conn = new SqlConnection(“server=“ + Form1.Pub.Server + “;database=“ + Form1.Pub.Database + “;uid=“ + Form1.Pub.Uid + “;pwd=“ + Form1.Pub.Pwd);
string strsql = “select * from yh where yhxm=‘“ + yhm.Text + “‘ and yhmm=‘“ + mm.Text + “‘“;
string select = “select yhid from yh where yhxm=‘“ + yhm.Text + “‘“;
conn.Open();
SqlCommand com = new SqlCommand(strsql conn);
if (com.ExecuteScalar() == null)
{
MessageBox.Show(“登录失败!用户名或密码错误!“);
}
else
{
SqlCommand comm = new SqlCommand(select conn);
string Id = comm.ExecuteScalar().ToString();
MessageBox.Show(“登录成功!“);
Form1.Pub.id = Convert.ToInt32(Id);
comm.Clone();
this.Hide();
Form2 f1 = new Form2();
f1.Show();
}
com.Clone();
conn.Close();
}
else if (this.radioButton1.Checked == true)
{
SqlConnection conn = new SqlConnection(“server=“ + Form1.Pub.Server + “;database=“ + Form1.Pub.Database + “;uid=“ + Form1.Pub.Uid + “;pwd=“ + Form1.Pub.Pwd);
string strsql = “select * from gly where glyxm=‘“ + yhm.Text + “‘ and glymm=‘“ + mm.Text + “‘“;
string select = “select glyid from gly whe
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-03-16 14:37 图书管理系统\
文件 2359296 2019-01-10 17:37 图书管理系统\Databa
文件 851968 2019-01-10 17:37 图书管理系统\Databa
目录 0 2019-03-16 14:37 图书管理系统\WindowsFormsApplication1\
目录 0 2019-03-16 14:37 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\
文件 878 2018-12-31 14:14 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1.sln
文件 48640 2019-01-10 22:16 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1.suo
目录 0 2019-03-16 14:37 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\bin\
目录 0 2019-03-16 14:37 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\
文件 57344 2019-01-10 22:16 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 153088 2019-01-10 22:16 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 11600 2019-01-10 22:16 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2018-09-15 15:29 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
目录 0 2018-12-31 14:14 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\
文件 4252 2019-01-10 00:39 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
文件 6146 2019-01-10 00:39 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
文件 5817 2019-01-10 00:39 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
文件 1754 2019-01-10 00:21 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs
文件 5783 2019-01-10 00:21 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form2.Designer.cs
文件 6015 2019-01-10 00:21 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form2.resx
文件 1772 2019-01-10 17:07 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form3.cs
文件 6051 2019-01-10 17:07 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form3.Designer.cs
文件 6015 2019-01-10 17:07 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form3.resx
文件 1806 2019-01-09 21:12 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form4.cs
文件 3989 2019-01-09 21:12 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form4.Designer.cs
文件 5817 2019-01-09 21:12 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form4.resx
文件 2712 2019-01-09 15:04 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form5.cs
文件 5679 2019-01-09 14:45 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form5.Designer.cs
文件 5817 2019-01-09 14:45 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form5.resx
文件 8565 2019-01-10 22:16 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form6.cs
文件 12334 2019-01-10 00:01 图书管理系统\WindowsFormsApplication1\WindowsFormsApplication1\Form6.Designer.cs
............此处省略48个文件信息
相关资源
- C#+SQL Server的简单银行管理系统
- C# 考试管理系统
- c#实现K均值聚类算法,使用mysql数据库
- ArcEngine+C#缓冲区分析(GP工具+ITopolo
- C#版protobuf如何实现http方式二进制传输
- c# 制作的加强型音乐播放器实现了音
- C#版海康客户端API封装
- C#绘制实时曲线,可放大局部图像
- c#读取txt文档中的代码源程序
- C#从现象到本质,随书源码。
- 简易的答题系统
- PCA主成分分析winform实现
- C# Winform Sockets收发Json样例
- C#串口通信工具源代码
- 自写C#蜘蛛爬虫源代码
- USB检测,移除|UsbEject
- 基于ASP.NET SQL2008的在线考试系统源代
- C#.kgtemp转换.mp3文件源码请勿商用
- C#校园卡信息管理系统
- ASP.NET C# 教师工作量管理系统 代码 论
- 基于c#的层次分析法
- C#实现歌词显示.LRC歌词
- C# 层次分析法
- 8 基于两步移动搜索法的可达性分析
- 基于MapX的二次开发
- asp.net +sql server 图书管理系统
- c# 上位机 数据波形显示 程序
- C# 先检测出指定磁盘的容量,然后根
- LL1 语法分析器 C#
- C#开发大全提高卷随书光盘
评论
共有 条评论