├── 图书管理系统.suo ├── sqlserver ├── library.mdf └── library_log.ldf ├── 图书管理系统 ├── bin │ └── Debug │ │ ├── 图书管理系统.exe │ │ ├── 图书管理系统.pdb │ │ ├── 图书管理系统.vshost.exe │ │ ├── 图书管理系统.exe.config │ │ ├── 图书管理系统.vshost.exe.config │ │ └── 图书管理系统.vshost.exe.manifest ├── obj │ └── x86 │ │ └── Debug │ │ ├── 图书管理系统.exe │ │ ├── 图书管理系统.pdb │ │ ├── 图书管理系统.LoginForm.resources │ │ ├── 图书管理系统.MainForm.resources │ │ ├── 图书管理系统.新书入库Form.resources │ │ ├── GenerateResource.read.1.tlog │ │ ├── GenerateResource.write.1.tlog │ │ ├── 图书管理系统.AlterPwdForm.resources │ │ ├── 图书管理系统.BorrowBooks.resources │ │ ├── 图书管理系统.FindBookForm.resources │ │ ├── 图书管理系统.ReturnBooks.resources │ │ ├── ResolveAssemblyReference.cache │ │ ├── 图书管理系统.UpdateIndivForm.resources │ │ ├── 图书管理系统.Properties.Resources.resources │ │ ├── 图书管理系统.csproj.GenerateResource.Cache │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── 图书管理系统.csprojResolveAssemblyReference.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ └── 图书管理系统.csproj.FileListAbsolute.txt ├── App.config ├── 图书管理系统.csproj.user ├── Properties │ ├── Settings.settings │ ├── AssemblyInfo.cs │ ├── Settings.Designer.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── MyDictionary.cs ├── Program.cs ├── AlterPwdForm.cs ├── LoginForm.cs ├── InsertNewBook.cs ├── BorrowBooks.cs ├── AlterPwdForm.Designer.cs ├── ReturnBooks.cs ├── AlterPwdForm.resx ├── UpdateIndivForm.resx ├── LoginForm.Designer.cs ├── InsertNewBook.resx ├── SqlHelper.cs ├── 图书管理系统.csproj ├── MainForm.cs ├── BorrowBooks.resx ├── ReturnBooks.resx ├── FindBookForm.cs ├── UpdateIndivForm.cs ├── InsertNewBook.Designer.cs ├── BorrowBooks.Designer.cs ├── UpdateIndivForm.Designer.cs ├── ReturnBooks.Designer.cs └── FindBookForm.Designer.cs ├── README.md └── 图书管理系统.sln /图书管理系统.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统.suo -------------------------------------------------------------------------------- /sqlserver/library.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/sqlserver/library.mdf -------------------------------------------------------------------------------- /sqlserver/library_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/sqlserver/library_log.ldf -------------------------------------------------------------------------------- /图书管理系统/bin/Debug/图书管理系统.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/bin/Debug/图书管理系统.exe -------------------------------------------------------------------------------- /图书管理系统/bin/Debug/图书管理系统.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/bin/Debug/图书管理系统.pdb -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.exe -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.pdb -------------------------------------------------------------------------------- /图书管理系统/bin/Debug/图书管理系统.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/bin/Debug/图书管理系统.vshost.exe -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.LoginForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.LoginForm.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.MainForm.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.新书入库Form.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.新书入库Form.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/GenerateResource.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/GenerateResource.read.1.tlog -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/GenerateResource.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/GenerateResource.write.1.tlog -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.AlterPwdForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.AlterPwdForm.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.BorrowBooks.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.BorrowBooks.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.FindBookForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.FindBookForm.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.ReturnBooks.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.ReturnBooks.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/ResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/ResolveAssemblyReference.cache -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.UpdateIndivForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.UpdateIndivForm.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.Properties.Resources.resources -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/图书管理系统.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ygsama/BooK-Library-System/HEAD/图书管理系统/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /图书管理系统/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /图书管理系统/图书管理系统.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ProjectFiles 5 | 6 | -------------------------------------------------------------------------------- /图书管理系统/bin/Debug/图书管理系统.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /图书管理系统/bin/Debug/图书管理系统.vshost.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /图书管理系统/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /图书管理系统/MyDictionary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace 图书管理系统 7 | { 8 | // 因为要频繁使用Dictionary 9 | // 所以用一个自定义类MyDictionary继承Dictionary 10 | public class MyDictionary : Dictionary 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BooK-Library-System 2 | 用C#(sharp)实现的一个简单的图书管理系统 3 | 4 | 请将源代码中的app.config配置文件中的“Data Source”改为当前使用机器的sqlserver账号和实例名称,并更改相应的“User Id=sa;Password=123” 5 | 6 | sqlserver文件夹下是sqlserver2005版本下创建的数据库文件 7 | 8 | 代码写的时间比较早,那时候敲的代码跟屎一样,仅供参考.....(逃 9 | 10 | 11 | 项目介绍见博客:https://blog.csdn.net/zimou5581/article/details/51646238 12 | 13 |
14 |
15 |
16 | 17 | > 数据库配置可以看app.config配置文件,因为是很早的sql-server版本,所以很可能出现不兼容或者未知的错误。各位自己研究一下,成功了的话可以反馈一下经验 18 | -------------------------------------------------------------------------------- /图书管理系统/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace 图书管理系统 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// 应用程序的主入口点。 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new LoginForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /图书管理系统/bin/Debug/图书管理系统.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /图书管理系统.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "图书管理系统", "图书管理系统\图书管理系统.csproj", "{2666F70D-9808-43FA-8D39-2AE9F02C317E}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {2666F70D-9808-43FA-8D39-2AE9F02C317E}.Debug|x86.ActiveCfg = Debug|x86 13 | {2666F70D-9808-43FA-8D39-2AE9F02C317E}.Debug|x86.Build.0 = Debug|x86 14 | {2666F70D-9808-43FA-8D39-2AE9F02C317E}.Release|x86.ActiveCfg = Release|x86 15 | {2666F70D-9808-43FA-8D39-2AE9F02C317E}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /图书管理系统/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("图书管理系统")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("图书管理系统")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("81c43274-461f-48df-b666-8c384a7471d6")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 内部版本号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /图书管理系统/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18063 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace 图书管理系统.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /图书管理系统/AlterPwdForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | namespace 图书管理系统 10 | { 11 | public partial class AlterPwdForm : Form 12 | { 13 | public AlterPwdForm() 14 | { 15 | InitializeComponent(); 16 | } 17 | private string _id; 18 | public string Id 19 | { 20 | get { return _id; } 21 | set { _id = value; } 22 | } 23 | // 权限标记 值admin为管理员 ,值为user则为普通用户 24 | private string _tag; 25 | public string _Tag 26 | { 27 | get { return _tag; } 28 | set { _tag = value; } 29 | } 30 | 31 | private void APbtn_Click(object sender, EventArgs e) 32 | { 33 | string sql; 34 | if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == "" || textBox3.Text.Trim() == "") 35 | { 36 | MessageBox.Show("请填写完整", "警告"); 37 | } 38 | else if (textBox2.Text.Trim().Length < 6 || textBox3.Text.Trim().Length < 6) 39 | { 40 | MessageBox.Show("新密码长度必须大于六位", "提示"); 41 | } 42 | else if (textBox2.Text.Trim() != textBox3.Text.Trim()) 43 | { 44 | MessageBox.Show("两次输入的新密码不一致","警告"); 45 | } 46 | else 47 | { 48 | 49 | if (_Tag == "user") 50 | { 51 | sql = "update users set uPwd =@uPwd where uId=@uId and uPwd=@uPwdd"; 52 | 53 | } 54 | else 55 | { 56 | sql = "update admin set aPwd = @uPwd where aId=@uId and aPwd=@uPwdd"; 57 | } 58 | MyDictionary dic1 = new MyDictionary(); 59 | dic1.Add("@uPwd", textBox2.Text.Trim()); 60 | dic1.Add("@uId", Id.ToString()); 61 | dic1.Add("@uPwdd", textBox1.Text.Trim()); 62 | int n = SqlHelper.ExecuteNonQuery(sql, dic1); 63 | if (n > 0) 64 | { 65 | MessageBox.Show("修改成功", "OK"); 66 | this.Close(); 67 | } 68 | else 69 | { 70 | MessageBox.Show("密码错误", "警告"); 71 | } 72 | 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /图书管理系统/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.18063 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace 图书管理系统.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的、缓存的 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("图书管理系统.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 为所有资源查找重写当前线程的 CurrentUICulture 属性, 56 | /// 方法是使用此强类型资源类。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /图书管理系统/LoginForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.Data.SqlClient; 10 | 11 | namespace 图书管理系统 12 | { 13 | public partial class LoginForm : Form 14 | { 15 | public LoginForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | 21 | private void button1_Click(object sender, EventArgs e) 22 | { 23 | // 获取账号 24 | string Id = txtId.Text.Trim(); 25 | // 获取密码 26 | string Pwd = txtPwd.Text.Trim(); 27 | 28 | if (Id == "" || Pwd == "") 29 | { 30 | MessageBox.Show("请输入账号或密码"); 31 | } 32 | else 33 | { 34 | string str = System.Configuration.ConfigurationManager.ConnectionStrings["library"].ConnectionString; 35 | // 构造sql查询语句 36 | string sql; 37 | if (rBtn1.Checked == true) 38 | { 39 | sql = "select uName from users where uId='" + Id + "' and uPwd='" + Pwd + "'"; 40 | } 41 | else 42 | { 43 | sql = "select aName from admin where aId='" + Id + "' and aPwd='" + Pwd + "'"; 44 | } 45 | // 构造连接对象 46 | using (SqlConnection conn = new SqlConnection(str)) 47 | { 48 | SqlCommand cmd = new SqlCommand(sql, conn); 49 | // 打开数据库连接 50 | conn.Open(); 51 | // 执行查询语句,返回结果集第一行第一列 52 | string name = cmd.ExecuteScalar().ToString (); 53 | 54 | if (name != "") 55 | { 56 | // 登录窗体隐藏 57 | this.Hide(); 58 | // 创建主窗体 59 | MainForm mainForm = new MainForm(); 60 | // 将账号传给主窗体MainForm 61 | mainForm.Id = Id; 62 | // 用主窗体MainForm下的_Tag标记登陆的是用户还是管理员 63 | if (rBtn1.Checked == true) 64 | { 65 | mainForm._Tag = "user"; 66 | mainForm.Name1 = name; 67 | 68 | sql = "select uBan from users where uId='" + Id + "' and uPwd='" + Pwd + "'"; 69 | cmd = new SqlCommand(sql, conn); 70 | string b = cmd.ExecuteScalar().ToString(); 71 | mainForm.B = b; 72 | } 73 | else 74 | { 75 | mainForm._Tag = "admin"; 76 | mainForm.Name1 = name; 77 | } 78 | // 显示主窗体 79 | mainForm.ShowDialog(); 80 | } 81 | else 82 | { 83 | MessageBox.Show("账号或密码错误!","登录失败"); 84 | } 85 | } 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /图书管理系统/InsertNewBook.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace 图书管理系统 11 | { 12 | public partial class 新书入库Form : Form 13 | { 14 | public 新书入库Form() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private string _p; // p=="1"时为书籍注销操作 20 | public string P 21 | { 22 | get { return _p; } 23 | set { _p = value; } 24 | } 25 | 26 | private void 新书入库Form_Load(object sender, EventArgs e) 27 | { 28 | if (P != "1") 29 | { 30 | 书籍注销panel.Visible = false; 31 | } 32 | } 33 | 34 | private void 新书入库Btn_Click(object sender, EventArgs e) 35 | { 36 | if (bNameTB.Text.Trim() == "" || bAuthorTB.Text.Trim() == "" || bPubComTB.Text.Trim() == "" || ISBN.Text.Trim() == "" || bTagTB.Text.Trim() == "" || bPriceTB.Text.Trim() == "" || bPubDatTB.Text.Trim() == "") 37 | { 38 | MessageBox.Show("请填写完整信息", "失败"); 39 | } 40 | else 41 | { 42 | // 自动获得图书序列号 43 | string sql = " select COUNT(*)+1 from books"; 44 | string bNum = SqlHelper.ExecuteScalar(sql).ToString(); 45 | StringBuilder sb = new StringBuilder(bNum); 46 | while (sb.Length != 6) 47 | { 48 | sb.Insert(0, "0"); 49 | } 50 | bNum = sb.ToString(); 51 | 52 | // 添加操作 53 | sql = "insert into books values(@bNum,@bName,@bAuthor,@bPubCom,@bPubDat,@ISBN,@bPrice,@bTag)"; 54 | MyDictionary dic = new MyDictionary(); 55 | dic.Add("@bNum", bNum); 56 | dic.Add("@bName", bNameTB.Text.Trim()); 57 | dic.Add("@bAuthor", bAuthorTB.Text.Trim()); 58 | dic.Add("@bPubCom", bPubComTB.Text.Trim()); 59 | dic.Add("@bPubDat", bPubDatTB.Text.Trim()); 60 | dic.Add("@ISBN", ISBN.Text.Trim()); 61 | dic.Add("@bPrice", bPriceTB.Text.Trim()); 62 | dic.Add("@bTag", bTagTB.Text.Trim()); 63 | int i = SqlHelper.ExecuteNonQuery(sql, dic); 64 | if (i == 1) 65 | { 66 | MessageBox.Show("添加成功,图书序列号为" + bNum); 67 | } 68 | } 69 | } 70 | 71 | private void 注销书籍Btn_Click(object sender, EventArgs e) 72 | { 73 | // 判断账号是否存在 74 | if (!SqlHelper.IsBookExistsWithNum(注销书籍TB.Text.Trim())) 75 | { 76 | MessageBox.Show("书籍不存在", "操作失败"); 77 | return; 78 | } 79 | else 80 | { 81 | DialogResult dt = MessageBox.Show("确定要注销此书吗", "提示", MessageBoxButtons.OKCancel); 82 | if (dt != DialogResult.OK) 83 | { 84 | return; 85 | } 86 | else 87 | { 88 | string sql = "delete from books where bNum=@bNum"; 89 | MyDictionary dic = new MyDictionary(); 90 | dic.Add("@bNum", 注销书籍TB.Text.Trim()); 91 | int i = SqlHelper.ExecuteNonQuery(sql, dic); 92 | if (i == 1) 93 | { 94 | MessageBox.Show("注销成功"); 95 | } 96 | } 97 | this.Close(); 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /图书管理系统/BorrowBooks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace 图书管理系统 11 | { 12 | public partial class BorrowBooks : Form 13 | { 14 | public BorrowBooks() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private void 查书btn_Click(object sender, EventArgs e) 20 | { 21 | if (查寻书名tB.Text.Trim() == "") 22 | { 23 | MessageBox.Show("书名不能为空"); 24 | } 25 | else 26 | { 27 | string sql = "select bNum,bName,bAuthor,bPubCom,bPrice,bTag from booksWithbookindex where bName like '%'+ @bName +'%'"; 28 | MyDictionary dic = new MyDictionary(); 29 | dic.Add("@bName", 查寻书名tB.Text.Trim()); 30 | DataTable dt = SqlHelper.GetList(sql, dic); 31 | dataGridView1.DataSource = dt; 32 | } 33 | } 34 | 35 | private void 提交借书_Click(object sender, EventArgs e) 36 | { 37 | // 是否存在该用户 38 | if (uIdTb.Text.Trim() == ""|| comboBox1.Text.ToString().Trim() == "") 39 | { 40 | MessageBox.Show("请填写用户名和借阅时间!", "警告"); 41 | return; 42 | } 43 | else if (bNumTB.Text.Trim() == "" || bNameTB.Text.Trim() == "" || bPriceTB.Text.Trim() == "") 44 | { 45 | MessageBox.Show("请选择书籍!","警告"); 46 | } 47 | else if (!SqlHelper.IsUserExists(uIdTb.Text.Trim())) 48 | { 49 | MessageBox.Show("不存在该用户!", "警告"); 50 | return; 51 | } 52 | else 53 | { 54 | // 自动获得图书序列号 55 | string sql = " select COUNT(*)+1 from borrow"; 56 | string ID = SqlHelper.ExecuteScalar(sql).ToString(); 57 | StringBuilder sb = new StringBuilder(ID); 58 | while (sb.Length != 6) 59 | { 60 | sb.Insert(0, "0"); 61 | } 62 | ID = sb.ToString(); 63 | 64 | // 查询书籍库存量 65 | sql = "select bTag from books where bNum=@bNum"; 66 | MyDictionary dic1 = new MyDictionary(); 67 | dic1.Add("@bNum", bNumTB.Text.Trim()); 68 | string n = SqlHelper.ExecuteScalar(sql, dic1).ToString(); 69 | if (n == "0") 70 | { 71 | MessageBox.Show("该书籍库存量为零!","警告"); 72 | return ; 73 | } 74 | 75 | // 插入数据到借书表(borrow) 76 | sql = "insert into borrow values(@ID,@uId,@bName,@bNum,@bPrice,convert(varchar(20),GETDATE() ,111),convert(varchar(20),dateadd(day," + comboBox1.Text.ToString().Substring(0, 2) + ",CONVERT(varchar(20),GETDATE() ,111)),111),@Tag)"; 77 | MyDictionary dic = new MyDictionary(); 78 | dic.Add("@ID", ID); 79 | dic.Add("@uId", uIdTb.Text.Trim()); 80 | dic.Add("@bName", bNameTB.Text.Trim()); 81 | dic.Add("@bNum", bNumTB.Text.Trim()); 82 | dic.Add("@bPrice", bPriceTB.Text.Trim()); 83 | dic.Add("@Tag", "0");// Tag = 0 标记该书未超归还期限 84 | int i = SqlHelper.ExecuteNonQuery(sql, dic); 85 | if (i > 0) 86 | { 87 | n = (Convert.ToInt32(n) - 1).ToString(); // 库存量-1 88 | sql = "update books set bTag=@bTag where bNum=@bNum"; 89 | MyDictionary dic2 = new MyDictionary(); 90 | dic2.Add("@bTag", n); 91 | dic2.Add("@bNum", bNumTB.Text.Trim()); 92 | SqlHelper.ExecuteScalar(sql, dic2); 93 | MessageBox.Show("提交成功"); 94 | } 95 | } 96 | } 97 | // 表格单元格鼠标MouseUp事件 98 | private void dataGridView1_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) 99 | { 100 | // 开关文本框的锁定,将表格内的数据显示到文本框内 101 | int a = dataGridView1.CurrentRow.Index; 102 | bNumTB.ReadOnly = false; 103 | bNameTB.ReadOnly = false; 104 | bPriceTB.ReadOnly = false; 105 | bNumTB.Text = dataGridView1.Rows[a].Cells["bNum"].Value.ToString(); 106 | bNameTB.Text = dataGridView1.Rows[a].Cells["bbName"].Value.ToString(); 107 | bPriceTB.Text = dataGridView1.Rows[a].Cells["bPrice"].Value.ToString(); 108 | bNumTB.ReadOnly = true; 109 | bNameTB.ReadOnly = true; 110 | bPriceTB.ReadOnly = true; 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /图书管理系统/AlterPwdForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 图书管理系统 2 | { 3 | partial class AlterPwdForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label1 = new System.Windows.Forms.Label(); 32 | this.label2 = new System.Windows.Forms.Label(); 33 | this.label3 = new System.Windows.Forms.Label(); 34 | this.APbtn = new System.Windows.Forms.Button(); 35 | this.textBox1 = new System.Windows.Forms.TextBox(); 36 | this.textBox2 = new System.Windows.Forms.TextBox(); 37 | this.textBox3 = new System.Windows.Forms.TextBox(); 38 | this.SuspendLayout(); 39 | // 40 | // label1 41 | // 42 | this.label1.AutoSize = true; 43 | this.label1.Location = new System.Drawing.Point(62, 59); 44 | this.label1.Name = "label1"; 45 | this.label1.Size = new System.Drawing.Size(53, 12); 46 | this.label1.TabIndex = 0; 47 | this.label1.Text = "旧密码:"; 48 | // 49 | // label2 50 | // 51 | this.label2.AutoSize = true; 52 | this.label2.Location = new System.Drawing.Point(62, 98); 53 | this.label2.Name = "label2"; 54 | this.label2.Size = new System.Drawing.Size(53, 12); 55 | this.label2.TabIndex = 1; 56 | this.label2.Text = "新密码:"; 57 | // 58 | // label3 59 | // 60 | this.label3.AutoSize = true; 61 | this.label3.Location = new System.Drawing.Point(30, 139); 62 | this.label3.Name = "label3"; 63 | this.label3.Size = new System.Drawing.Size(125, 12); 64 | this.label3.TabIndex = 2; 65 | this.label3.Text = "请再输入一次新密码:"; 66 | // 67 | // APbtn 68 | // 69 | this.APbtn.Location = new System.Drawing.Point(130, 205); 70 | this.APbtn.Name = "APbtn"; 71 | this.APbtn.Size = new System.Drawing.Size(75, 23); 72 | this.APbtn.TabIndex = 3; 73 | this.APbtn.Text = "提交"; 74 | this.APbtn.UseVisualStyleBackColor = true; 75 | this.APbtn.Click += new System.EventHandler(this.APbtn_Click); 76 | // 77 | // textBox1 78 | // 79 | this.textBox1.Location = new System.Drawing.Point(147, 56); 80 | this.textBox1.Name = "textBox1"; 81 | this.textBox1.PasswordChar = '*'; 82 | this.textBox1.Size = new System.Drawing.Size(148, 21); 83 | this.textBox1.TabIndex = 4; 84 | // 85 | // textBox2 86 | // 87 | this.textBox2.Location = new System.Drawing.Point(147, 95); 88 | this.textBox2.Name = "textBox2"; 89 | this.textBox2.PasswordChar = '*'; 90 | this.textBox2.Size = new System.Drawing.Size(148, 21); 91 | this.textBox2.TabIndex = 5; 92 | // 93 | // textBox3 94 | // 95 | this.textBox3.Location = new System.Drawing.Point(147, 136); 96 | this.textBox3.Name = "textBox3"; 97 | this.textBox3.PasswordChar = '*'; 98 | this.textBox3.Size = new System.Drawing.Size(148, 21); 99 | this.textBox3.TabIndex = 6; 100 | // 101 | // AlterPwdForm 102 | // 103 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 104 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 105 | this.ClientSize = new System.Drawing.Size(351, 275); 106 | this.Controls.Add(this.textBox3); 107 | this.Controls.Add(this.textBox2); 108 | this.Controls.Add(this.textBox1); 109 | this.Controls.Add(this.APbtn); 110 | this.Controls.Add(this.label3); 111 | this.Controls.Add(this.label2); 112 | this.Controls.Add(this.label1); 113 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 114 | this.Name = "AlterPwdForm"; 115 | this.Text = "修改密码"; 116 | this.ResumeLayout(false); 117 | this.PerformLayout(); 118 | 119 | } 120 | 121 | #endregion 122 | 123 | private System.Windows.Forms.Label label1; 124 | private System.Windows.Forms.Label label2; 125 | private System.Windows.Forms.Label label3; 126 | private System.Windows.Forms.Button APbtn; 127 | private System.Windows.Forms.TextBox textBox1; 128 | private System.Windows.Forms.TextBox textBox2; 129 | private System.Windows.Forms.TextBox textBox3; 130 | } 131 | } -------------------------------------------------------------------------------- /图书管理系统/ReturnBooks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace 图书管理系统 11 | { 12 | public partial class ReturnBooks : Form 13 | { 14 | public ReturnBooks() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private void Btn1_Click(object sender, EventArgs e) 20 | { 21 | if (Btn1.Text.Trim() == "") 22 | { 23 | MessageBox.Show("账号不能为空"); 24 | } 25 | else 26 | { 27 | ShowBorrowList(); 28 | } 29 | } 30 | 31 | private void ShowBorrowList() 32 | { 33 | string sql = "select ID,uId,bName,bNum,bPrice,borrowDate,returnDate,Tag from borrow where uId =@uId"; 34 | MyDictionary dic = new MyDictionary(); 35 | dic.Add("@uId", uIdTB.Text.Trim()); 36 | DataTable dt = SqlHelper.GetList(sql, dic); 37 | dataGridView1.DataSource = dt; 38 | } 39 | 40 | private void dataGridView1_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) 41 | { 42 | // 开关文本框的锁定,将表格内的数据显示到文本框内 43 | int a = dataGridView1.CurrentRow.Index; 44 | IDDTB.ReadOnly = false; 45 | bNameTB.ReadOnly = false; 46 | bPriceTB.ReadOnly = false; 47 | bNumTB.ReadOnly = false; 48 | uuIdTB.ReadOnly = false; 49 | TagTB.ReadOnly = false; 50 | borrowDateTB.ReadOnly = false; 51 | returnDateTB.ReadOnly = false; 52 | IDDTB.Text = dataGridView1.Rows[a].Cells["ID"].Value.ToString(); 53 | bNameTB.Text = dataGridView1.Rows[a].Cells["bName"].Value.ToString(); 54 | bPriceTB.Text = dataGridView1.Rows[a].Cells["bPrice"].Value.ToString(); 55 | bNumTB.Text = dataGridView1.Rows[a].Cells["bNum"].Value.ToString(); 56 | uuIdTB.Text = dataGridView1.Rows[a].Cells["uId"].Value.ToString(); 57 | TagTB.Text = (dataGridView1.Rows[a].Cells["Tag"].Value.ToString() == "1") ? "是" : "否"; 58 | borrowDateTB.Text = dataGridView1.Rows[a].Cells["borrowDate"].Value.ToString(); 59 | returnDateTB.Text = dataGridView1.Rows[a].Cells["returnDate"].Value.ToString(); 60 | IDDTB.ReadOnly = true; 61 | bNameTB.ReadOnly = true; 62 | bPriceTB.ReadOnly = true; 63 | bNumTB.ReadOnly = true; 64 | uuIdTB.ReadOnly = true; 65 | TagTB.ReadOnly = true; 66 | borrowDateTB.ReadOnly = true; 67 | returnDateTB.ReadOnly = true; 68 | } 69 | 70 | #region 处理逾期未还书的用户 71 | // 窗口加载时处理借书表内逾期的记录 72 | private void ReturnBooks_Load(object sender, EventArgs e) 73 | { 74 | // 文本框锁定 75 | IDDTB.ReadOnly = true; 76 | bNameTB.ReadOnly = true; 77 | bPriceTB.ReadOnly = true; 78 | bNumTB.ReadOnly = true; 79 | uuIdTB.ReadOnly = true; 80 | TagTB.ReadOnly = true; 81 | borrowDateTB.ReadOnly = true; 82 | returnDateTB.ReadOnly = true; 83 | 84 | // Date_Test存储过程 85 | // 将逾期未还书的标记 (Tag 置为 1) 86 | // 并将其用户冻结 (uBan 置为 1) 87 | // create proc Date_Test 88 | // as 89 | // select uId into #A from borrow where convert(varchar(20),GETDATE(),111)>= returnDate group by uId 90 | // update borrow set Tag='1' where convert(varchar(20),GETDATE(),111)>= returnDate 91 | // update users set uBan='1' where uId in(select uId from #A) 92 | // drop table #A 93 | string sql = "Date_Test"; 94 | MyDictionary dic = new MyDictionary(); 95 | SqlHelper.ExecuteNonQuery(sql, CommandType.StoredProcedure, dic); 96 | } 97 | #endregion 98 | 99 | private void button1_Click(object sender, EventArgs e) 100 | { 101 | string sql="select uBan from users where uId=@uID"; 102 | MyDictionary dic3 = new MyDictionary(); 103 | dic3.Add("@uID", uuIdTB.Text.Trim()); 104 | if (SqlHelper.ExecuteScalar(sql, dic3).ToString() == "1") 105 | { 106 | MessageBox.Show("因逾期未还书账户被锁定,请及时解锁,并缴纳罚款"); 107 | return; 108 | } 109 | else 110 | { 111 | // 办理借书手续 112 | // 删除借书记录 113 | sql = "delete from borrow where ID=@ID"; 114 | MyDictionary dic4 = new MyDictionary(); 115 | dic4.Add("@ID", IDDTB.Text.Trim()); 116 | SqlHelper.ExecuteNonQuery(sql, dic4); 117 | 118 | // 得到书籍库存量 并+1 119 | sql = "select bTag from books where bNum=@bNum"; 120 | MyDictionary dic5 = new MyDictionary(); 121 | dic5.Add("@bNum", bNumTB.Text.Trim()); 122 | int n = Convert.ToInt32(SqlHelper.ExecuteScalar(sql, dic5)) + 1; 123 | 124 | sql = "update books set bTag=@bTag where bNum=@bNum"; 125 | MyDictionary dic6 = new MyDictionary(); 126 | dic6.Add("@bTag", n.ToString()); 127 | dic6.Add("@bNum", bNumTB.Text.Trim()); 128 | SqlHelper.ExecuteNonQuery(sql, dic6); 129 | 130 | MessageBox.Show("还书提交完成"); 131 | 132 | // 刷新借书单 133 | ShowBorrowList(); 134 | 135 | } 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /图书管理系统/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /图书管理系统/AlterPwdForm.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /图书管理系统/UpdateIndivForm.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /图书管理系统/LoginForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 图书管理系统 2 | { 3 | partial class LoginForm 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.rBtn1 = new System.Windows.Forms.RadioButton(); 35 | this.rBtn2 = new System.Windows.Forms.RadioButton(); 36 | this.button1 = new System.Windows.Forms.Button(); 37 | this.txtId = new System.Windows.Forms.TextBox(); 38 | this.txtPwd = new System.Windows.Forms.TextBox(); 39 | this.SuspendLayout(); 40 | // 41 | // label1 42 | // 43 | this.label1.AutoSize = true; 44 | this.label1.BackColor = System.Drawing.Color.Transparent; 45 | this.label1.Location = new System.Drawing.Point(79, 59); 46 | this.label1.Name = "label1"; 47 | this.label1.Size = new System.Drawing.Size(35, 12); 48 | this.label1.TabIndex = 0; 49 | this.label1.Text = "账号:"; 50 | // 51 | // label2 52 | // 53 | this.label2.AutoSize = true; 54 | this.label2.BackColor = System.Drawing.Color.Transparent; 55 | this.label2.Location = new System.Drawing.Point(79, 97); 56 | this.label2.Name = "label2"; 57 | this.label2.Size = new System.Drawing.Size(35, 12); 58 | this.label2.TabIndex = 1; 59 | this.label2.Text = "密码:"; 60 | // 61 | // rBtn1 62 | // 63 | this.rBtn1.AutoSize = true; 64 | this.rBtn1.BackColor = System.Drawing.Color.Transparent; 65 | this.rBtn1.Location = new System.Drawing.Point(97, 146); 66 | this.rBtn1.Name = "rBtn1"; 67 | this.rBtn1.Size = new System.Drawing.Size(47, 16); 68 | this.rBtn1.TabIndex = 2; 69 | this.rBtn1.TabStop = true; 70 | this.rBtn1.Text = "用户"; 71 | this.rBtn1.UseVisualStyleBackColor = false; 72 | // 73 | // rBtn2 74 | // 75 | this.rBtn2.AutoSize = true; 76 | this.rBtn2.BackColor = System.Drawing.Color.Transparent; 77 | this.rBtn2.Location = new System.Drawing.Point(164, 146); 78 | this.rBtn2.Name = "rBtn2"; 79 | this.rBtn2.Size = new System.Drawing.Size(59, 16); 80 | this.rBtn2.TabIndex = 3; 81 | this.rBtn2.TabStop = true; 82 | this.rBtn2.Text = "管理员"; 83 | this.rBtn2.UseVisualStyleBackColor = false; 84 | // 85 | // button1 86 | // 87 | this.button1.Location = new System.Drawing.Point(122, 192); 88 | this.button1.Name = "button1"; 89 | this.button1.Size = new System.Drawing.Size(75, 23); 90 | this.button1.TabIndex = 4; 91 | this.button1.Text = "登录"; 92 | this.button1.UseVisualStyleBackColor = true; 93 | this.button1.Click += new System.EventHandler(this.button1_Click); 94 | // 95 | // txtId 96 | // 97 | this.txtId.Location = new System.Drawing.Point(120, 56); 98 | this.txtId.Name = "txtId"; 99 | this.txtId.Size = new System.Drawing.Size(119, 21); 100 | this.txtId.TabIndex = 6; 101 | // 102 | // txtPwd 103 | // 104 | this.txtPwd.Location = new System.Drawing.Point(122, 94); 105 | this.txtPwd.Name = "txtPwd"; 106 | this.txtPwd.PasswordChar = '*'; 107 | this.txtPwd.Size = new System.Drawing.Size(117, 21); 108 | this.txtPwd.TabIndex = 7; 109 | // 110 | // LoginForm 111 | // 112 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 113 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 114 | this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); 115 | this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; 116 | this.ClientSize = new System.Drawing.Size(308, 253); 117 | this.Controls.Add(this.txtPwd); 118 | this.Controls.Add(this.txtId); 119 | this.Controls.Add(this.button1); 120 | this.Controls.Add(this.rBtn2); 121 | this.Controls.Add(this.rBtn1); 122 | this.Controls.Add(this.label2); 123 | this.Controls.Add(this.label1); 124 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 125 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 126 | this.Name = "LoginForm"; 127 | this.Text = "图书管理系统-请登录"; 128 | this.ResumeLayout(false); 129 | this.PerformLayout(); 130 | 131 | } 132 | 133 | #endregion 134 | 135 | private System.Windows.Forms.Label label1; 136 | private System.Windows.Forms.Label label2; 137 | private System.Windows.Forms.RadioButton rBtn1; 138 | private System.Windows.Forms.RadioButton rBtn2; 139 | private System.Windows.Forms.Button button1; 140 | private System.Windows.Forms.TextBox txtId; 141 | private System.Windows.Forms.TextBox txtPwd; 142 | } 143 | } 144 | 145 | -------------------------------------------------------------------------------- /图书管理系统/InsertNewBook.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /图书管理系统/SqlHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Data.SqlClient; 6 | using System.Data; 7 | 8 | namespace 图书管理系统 9 | { 10 | public static class SqlHelper 11 | { 12 | // 获取数据库连接 返回连接对象 13 | private static SqlConnection GetConn() 14 | { 15 | return new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["library"].ConnectionString); 16 | } 17 | 18 | // 执行sql操作 返回是否存在用户 19 | public static bool IsUserExists(string uId) 20 | { 21 | bool isExists = false; 22 | 23 | using (SqlConnection conn = GetConn()) 24 | { 25 | string sql = "select count(*) from users where uId =@uId"; 26 | SqlCommand cmd = new SqlCommand(sql, conn); 27 | cmd.Parameters.Add(new SqlParameter("@uId", uId)); 28 | conn.Open(); 29 | int obj = Convert.ToInt32(cmd.ExecuteScalar());// 返回受影响的行数 30 | if (obj > 0) 31 | { 32 | isExists = true; 33 | } 34 | } 35 | return isExists; 36 | } 37 | 38 | // 执行sql操作 返回是否存在书籍 39 | 40 | public static bool IsBookExistsWithName(string bName) 41 | { 42 | bool isExists = false; 43 | 44 | using (SqlConnection conn = GetConn()) 45 | { 46 | string sql = "select count(*) from books where bName =@bName"; 47 | SqlCommand cmd = new SqlCommand(sql, conn); 48 | cmd.Parameters.Add(new SqlParameter("@bName", bName)); 49 | conn.Open(); 50 | int obj = Convert.ToInt32(cmd.ExecuteScalar());// 返回受影响的行数 51 | if (obj > 0) 52 | { 53 | isExists = true; 54 | } 55 | } 56 | return isExists; 57 | } 58 | public static bool IsBookExistsWithNum(string bNum) 59 | { 60 | bool isExists = false; 61 | 62 | using (SqlConnection conn = GetConn()) 63 | { 64 | string sql = "select count(*) from books where bNum =@bNum"; 65 | SqlCommand cmd = new SqlCommand(sql, conn); 66 | cmd.Parameters.Add(new SqlParameter("@bNum", bNum)); 67 | conn.Open(); 68 | int obj = Convert.ToInt32(cmd.ExecuteScalar());// 返回受影响的行数 69 | if (obj > 0) 70 | { 71 | isExists = true; 72 | } 73 | } 74 | return isExists; 75 | } 76 | 77 | 78 | // 执行 ... 返回受影响行数 79 | private static int ExecuteNonQuery(string sql, CommandType type, params SqlParameter[] ps) 80 | { 81 | int rows = -1; 82 | 83 | using (SqlConnection conn = GetConn()) 84 | { 85 | SqlCommand cmd = new SqlCommand(sql, conn); 86 | cmd.CommandType = type; // 存储过程 type为StoredProcedure 87 | cmd.Parameters.AddRange(ps); 88 | conn.Open(); 89 | rows = cmd.ExecuteNonQuery(); 90 | } 91 | 92 | return rows; 93 | } 94 | public static int ExecuteNonQuery(string sql, MyDictionary dic) 95 | { 96 | SqlParameter[] ps = new SqlParameter[dic.Count]; 97 | int index = 0; 98 | foreach (var item in dic) 99 | { 100 | ps[index++] = new SqlParameter(item.Key, item.Value); 101 | } 102 | return ExecuteNonQuery(sql, CommandType.Text, ps); 103 | } 104 | public static int ExecuteNonQuery(string sql, CommandType type, MyDictionary dic) 105 | { 106 | SqlParameter[] ps = new SqlParameter[dic.Count]; 107 | int index = 0; 108 | foreach (var item in dic) 109 | { 110 | ps[index++] = new SqlParameter(item.Key, item.Value); 111 | } 112 | return ExecuteNonQuery(sql, type, ps); 113 | } 114 | 115 | 116 | // 执行sql语句 返回首行首列 117 | public static object ExecuteScalar(string sql) 118 | { 119 | object obj = null; 120 | using (SqlConnection conn = GetConn()) 121 | { 122 | SqlCommand cmd = new SqlCommand(sql, conn); 123 | conn.Open(); 124 | obj = cmd.ExecuteScalar(); 125 | } 126 | return obj; 127 | } 128 | public static object ExecuteScalar(string sql, CommandType type, MyDictionary dic) 129 | { 130 | object obj = null; 131 | using (SqlConnection conn = GetConn()) 132 | { 133 | SqlCommand cmd = new SqlCommand(sql, conn); 134 | cmd.CommandType = type; 135 | 136 | //构造参数 137 | SqlParameter[] ps = new SqlParameter[dic.Count]; 138 | int index = 0; 139 | foreach (var item in dic) 140 | { 141 | ps[index++] = new SqlParameter(item.Key, item.Value); 142 | } 143 | cmd.Parameters.AddRange(ps); 144 | //执行命令 145 | conn.Open(); 146 | obj = cmd.ExecuteScalar(); 147 | } 148 | return obj; 149 | } 150 | public static object ExecuteScalar(string sql, MyDictionary dic) 151 | { 152 | return ExecuteScalar(sql, CommandType.Text, dic); 153 | } 154 | 155 | 156 | 157 | // 执行查询 返回结果集DataTable 获取列表 158 | public static DataTable GetList(string sql, MyDictionary dic) 159 | { 160 | // 构造数据表,用于存储查询的数据 161 | DataTable dt = new DataTable(); 162 | // 创建连接对象 163 | using (SqlConnection conn = GetConn()) 164 | { 165 | // 执行命令 166 | SqlCommand cmd = new SqlCommand(sql, conn); 167 | // 构造参数 168 | SqlParameter[] ps = new SqlParameter[dic.Count]; 169 | int index = 0; 170 | foreach (var item in dic) 171 | { 172 | ps[index++] = new SqlParameter(item.Key, item.Value); 173 | } 174 | cmd.Parameters.AddRange(ps); 175 | // 执行命令 176 | SqlDataAdapter adapter = new SqlDataAdapter(cmd); 177 | adapter.Fill(dt); 178 | } 179 | return dt; 180 | } 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /图书管理系统/图书管理系统.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {2666F70D-9808-43FA-8D39-2AE9F02C317E} 9 | WinExe 10 | Properties 11 | 图书管理系统 12 | 图书管理系统 13 | v4.0 14 | Client 15 | 512 16 | 17 | 18 | x86 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | x86 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | Form 54 | 55 | 56 | AlterPwdForm.cs 57 | 58 | 59 | Form 60 | 61 | 62 | BorrowBooks.cs 63 | 64 | 65 | Form 66 | 67 | 68 | FindBookForm.cs 69 | 70 | 71 | Form 72 | 73 | 74 | InsertNewBook.cs 75 | 76 | 77 | Form 78 | 79 | 80 | LoginForm.cs 81 | 82 | 83 | Form 84 | 85 | 86 | MainForm.cs 87 | 88 | 89 | 90 | 91 | 92 | Form 93 | 94 | 95 | ReturnBooks.cs 96 | 97 | 98 | 99 | Form 100 | 101 | 102 | UpdateIndivForm.cs 103 | 104 | 105 | AlterPwdForm.cs 106 | 107 | 108 | BorrowBooks.cs 109 | 110 | 111 | FindBookForm.cs 112 | 113 | 114 | InsertNewBook.cs 115 | 116 | 117 | LoginForm.cs 118 | 119 | 120 | MainForm.cs 121 | 122 | 123 | ResXFileCodeGenerator 124 | Resources.Designer.cs 125 | Designer 126 | 127 | 128 | True 129 | Resources.resx 130 | 131 | 132 | ReturnBooks.cs 133 | 134 | 135 | UpdateIndivForm.cs 136 | 137 | 138 | 139 | SettingsSingleFileGenerator 140 | Settings.Designer.cs 141 | 142 | 143 | True 144 | Settings.settings 145 | True 146 | 147 | 148 | 149 | 156 | -------------------------------------------------------------------------------- /图书管理系统/MainForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | //using System.Data.SqlClient; 10 | 11 | namespace 图书管理系统 12 | { 13 | public partial class MainForm : Form 14 | { 15 | public MainForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private string _id;// 账号 21 | public string Id 22 | { 23 | get { return _id; } 24 | set { _id = value; } 25 | } 26 | 27 | private string _name; 28 | public string Name1 // 姓名 29 | { 30 | get { return _name; } 31 | set { _name = value; } 32 | } 33 | 34 | // 权限标记 值为admin为管理员 ,值为user则为普通用户 35 | private string _tag; 36 | public string _Tag 37 | { 38 | get { return _tag; } 39 | set { _tag = value; } 40 | } 41 | 42 | // 标记账户是否被锁定 1为锁定 43 | private string _b; 44 | public string B 45 | { 46 | get { return _b; } 47 | set { _b = value; } 48 | } 49 | 50 | // 在加载窗体时设定操作权限 51 | private void MainForm_Load(object sender, EventArgs e) 52 | { 53 | 54 | if (_Tag == "user") 55 | { 56 | tSSL2.Text = "权限级别:普通用户"; 57 | tSSL5.Text = " " + Name1; 58 | 59 | 新用户注册.Enabled = false; 60 | 锁定用户.Enabled = false; 61 | 新书入库.Enabled = false; 62 | 借书.Enabled = false; 63 | 还书.Enabled = false; 64 | 书籍注销.Enabled = false; 65 | 用户信息查询.Enabled = false; 66 | 添加用户.Enabled = false; 67 | 添加书籍.Enabled = false; 68 | 借书办理.Enabled = false; 69 | 还书办理.Enabled = false; 70 | 71 | if (B == "1") 72 | { 73 | toolStripStatusLabel3.Text = " 状态:被锁定"; 74 | MessageBox.Show("账户被锁定,请尽快联系管理员", "警告"); 75 | } 76 | } 77 | else 78 | { 79 | tSSL2.Text = "权限级别:管理员"; 80 | tSSL5.Text = " " + Name1; 81 | } 82 | } 83 | 84 | #region 关于、帮助 85 | private void 关于软件ToolStripMenuItem_Click(object sender, EventArgs e) 86 | { 87 | MessageBox.Show("请联系管理员", "关于"); 88 | } 89 | 90 | private void toolStripButton6_Click(object sender, EventArgs e) 91 | { 92 | MessageBox.Show("请联系管理员", "注意"); 93 | } 94 | #endregion 95 | 96 | // 时钟 97 | private void timer1_Tick(object sender, EventArgs e) 98 | { 99 | xxx.Text = DateTime.Now.ToString(); 100 | } 101 | 102 | // 退出时关闭所有窗口(login) 103 | private void MainForm_FormClosed(object sender, FormClosedEventArgs e) 104 | { 105 | Application.Exit(); 106 | } 107 | 108 | #region 修改密码 109 | private void APF() 110 | { 111 | AlterPwdForm altPF = new AlterPwdForm(); 112 | altPF.Id = Id; 113 | altPF._Tag = _Tag; 114 | altPF.ShowDialog(); 115 | } 116 | private void 修改密码_Click(object sender, EventArgs e) 117 | { 118 | APF(); 119 | } 120 | private void toolStripButton8_Click(object sender, EventArgs e) 121 | { 122 | APF(); 123 | } 124 | #endregion 125 | 126 | #region 修改个人信息 127 | private void UIF() 128 | { 129 | UpdateIndivForm uIF = new UpdateIndivForm(); 130 | uIF.Id = Id; 131 | uIF._Tag = _Tag; 132 | uIF.ShowDialog(); 133 | } 134 | private void 修改信息_Click(object sender, EventArgs e) 135 | { 136 | UIF(); 137 | } 138 | private void toolStripButton7_Click(object sender, EventArgs e) 139 | { 140 | UIF(); 141 | } 142 | #endregion 143 | 144 | #region 添加用户 145 | private void NewUser() 146 | { 147 | UpdateIndivForm uIF = new UpdateIndivForm(); 148 | uIF.Id = Id; 149 | uIF._Tag = _Tag; 150 | uIF.P = "1"; 151 | uIF.Text = "新用户注册"; 152 | uIF.ShowDialog(); 153 | } 154 | private void 添加用户_Click(object sender, EventArgs e) 155 | { 156 | NewUser(); 157 | } 158 | private void 新用户注册_Click(object sender, EventArgs e) 159 | { 160 | NewUser(); 161 | } 162 | #endregion 163 | 164 | #region 注销用户 165 | private void 注销用户_Click(object sender, EventArgs e) 166 | { 167 | UpdateIndivForm deleteForm = new UpdateIndivForm(); 168 | deleteForm.Text = "注销用户"; 169 | deleteForm.P = "2"; 170 | deleteForm.ShowDialog(); 171 | } 172 | #endregion 173 | 174 | #region 添加书籍 175 | private static void INB() 176 | { 177 | 新书入库Form iNB = new 新书入库Form(); 178 | iNB.ShowDialog(); 179 | } 180 | private void 添加书籍_Click(object sender, EventArgs e) 181 | { 182 | INB(); 183 | } 184 | private void 新书入库_Click(object sender, EventArgs e) 185 | { 186 | INB(); 187 | } 188 | #endregion 189 | 190 | #region 书籍注销 191 | private void 书籍注销_Click(object sender, EventArgs e) 192 | { 193 | 新书入库Form iNB = new 新书入库Form(); 194 | iNB.P = "1"; 195 | iNB.Text = "注销书籍"; 196 | iNB.ShowDialog(); 197 | } 198 | #endregion 199 | 200 | #region 书籍查询 201 | private void 图书查询_Click(object sender, EventArgs e) 202 | { 203 | FindBookForm fbf = new FindBookForm(); 204 | fbf.ShowDialog(); 205 | } 206 | 207 | private void 查找书籍_Click(object sender, EventArgs e) 208 | { 209 | FindBookForm fbf = new FindBookForm(); 210 | fbf.Tag1 = this._Tag; 211 | fbf.ShowDialog(); 212 | } 213 | #endregion 214 | 215 | #region 借书办理 216 | private void 借书办理_Click(object sender, EventArgs e) 217 | { 218 | BorrowBooks bb = new BorrowBooks(); 219 | bb.ShowDialog(); 220 | } 221 | private void 借书_Click(object sender, EventArgs e) 222 | { 223 | BorrowBooks bb = new BorrowBooks(); 224 | bb.ShowDialog(); 225 | } 226 | #endregion 227 | 228 | #region 还书办理 229 | private void 还书办理_Click(object sender, EventArgs e) 230 | { 231 | ReturnBooks rb = new ReturnBooks(); 232 | rb.ShowDialog(); 233 | } 234 | private void 还书_Click(object sender, EventArgs e) 235 | { 236 | ReturnBooks rb = new ReturnBooks(); 237 | rb.ShowDialog(); 238 | } 239 | #endregion 240 | 241 | #region 借书单查询 242 | private void 借书单查询_Click(object sender, EventArgs e) 243 | { 244 | MessageBox.Show("功能暂未开放"); 245 | } 246 | private void 查询借书记录_Click(object sender, EventArgs e) 247 | { 248 | MessageBox.Show("功能暂未开放"); 249 | } 250 | #endregion 251 | 252 | 253 | private void 用户信息查询_Click(object sender, EventArgs e) 254 | { 255 | MessageBox.Show("该功能暂未开放"); 256 | } 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /图书管理系统/BorrowBooks.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | True 122 | 123 | 124 | True 125 | 126 | 127 | True 128 | 129 | 130 | True 131 | 132 | 133 | True 134 | 135 | 136 | True 137 | 138 | 139 | -2, 52, 642, 0 140 | 141 | 142 | -2, 52 143 | 144 | 145 | 642, 0 146 | 147 | -------------------------------------------------------------------------------- /图书管理系统/ReturnBooks.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | -2, 57, 844, 0 122 | 123 | 124 | -2, 57 125 | 126 | 127 | 844, 0 128 | 129 | 130 | True 131 | 132 | 133 | True 134 | 135 | 136 | True 137 | 138 | 139 | True 140 | 141 | 142 | True 143 | 144 | 145 | True 146 | 147 | 148 | True 149 | 150 | 151 | True 152 | 153 | -------------------------------------------------------------------------------- /图书管理系统/FindBookForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.Data.SqlClient; 10 | 11 | namespace 图书管理系统 12 | { 13 | public partial class FindBookForm : Form 14 | { 15 | public FindBookForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | private string _tag; 20 | public string Tag1 21 | { 22 | get { return _tag; } 23 | set { _tag = value; } 24 | } 25 | 26 | // pageIndex 标记DGV应该显示第几页 27 | private int pageIndex; 28 | // pageIndex 标记DGV的总页数 29 | int maxIndex; 30 | 31 | #region 添加书籍 32 | private static void INB() 33 | { 34 | 新书入库Form iNB = new 新书入库Form(); 35 | iNB.ShowDialog(); 36 | } 37 | private void 新书入库ToolStripMenuItem_Click(object sender, EventArgs e) 38 | { 39 | INB(); 40 | } 41 | private void 书籍入库tSBtn_Click(object sender, EventArgs e) 42 | { 43 | INB(); 44 | } 45 | 46 | #endregion 47 | 48 | #region 注销书籍 49 | private void 注销书籍ToolStripMenuItem_Click(object sender, EventArgs e) 50 | { 51 | 新书入库Form iNB = new 新书入库Form(); 52 | iNB.P = "1"; 53 | iNB.Text = "注销书籍"; 54 | iNB.ShowDialog(); 55 | } 56 | #endregion 57 | 58 | #region 查看帮助 59 | private void 查看帮助ToolStripMenuItem_Click(object sender, EventArgs e) 60 | { 61 | MessageBox.Show("请联系管理员", "帮助"); 62 | } 63 | private void 查看帮助tSBtn_Click(object sender, EventArgs e) 64 | { 65 | MessageBox.Show("请联系管理员", "帮助"); 66 | } 67 | 68 | #endregion 69 | 70 | private void FindBookForm_Load(object sender, EventArgs e) 71 | { 72 | if (Tag1 == "user") 73 | { 74 | 注销书籍ToolStripMenuItem.Enabled = false; 75 | 修改ToolStripMenuItem.Enabled = false; 76 | 新书入库ToolStripMenuItem.Enabled = false; 77 | 书籍入库tSBtn.Enabled = false; 78 | 保存修改tSBtn.Enabled = false; 79 | dgv_list.ReadOnly = true; 80 | } 81 | pageIndex = 1; 82 | GetData(); 83 | } 84 | 85 | private void GetData() 86 | { 87 | // 获取页大小 88 | int pageSize = 14; 89 | // 计算最多有多少页--Math.Ceiling--向上取整 90 | // Convert.ToInt32(SqlHelper.ExecuteScalar("select count(*) from books"))得到数据记录总数 91 | maxIndex = (int)Math.Ceiling((Convert.ToInt32(SqlHelper.ExecuteScalar("select count(*) from books")) * 1.0 / pageSize)); 92 | // 获取连接字符串 93 | string str = System.Configuration.ConfigurationManager.ConnectionStrings["library"].ConnectionString; 94 | // 得到连接 95 | using (SqlConnection conn = new SqlConnection(str)) 96 | { 97 | // 判断是否有数据 98 | // Convert.ToInt32(SqlHelper.ExecuteScalar("select count(*) from books"))得到数据记录总数 99 | if (Convert .ToInt32 (SqlHelper.ExecuteScalar("select count(*) from books")) > 0 && pageIndex > 0) 100 | { 101 | // 确定有数据才进行查询 102 | // 创建表格,用来存储数据 103 | DataTable dt = new DataTable(); 104 | // 构造带分页功能的 sql 语句 105 | string sql = "select bNum,bName,bAuthor,bPubCom,bPubDat,ISBN,bPrice,bTag from booksWithbookindex where bookindex between @sIndex and @eIndex"; 106 | // 构造适配器对象 107 | SqlDataAdapter adapter = new SqlDataAdapter(sql, conn); 108 | // 传递参数 109 | // 本页第一条数据 110 | adapter.SelectCommand.Parameters.AddWithValue("@sIndex", ((pageIndex - 1) * pageSize + 1)); 111 | // 本页最后一条数据 112 | adapter.SelectCommand.Parameters.AddWithValue("@eIndex", pageIndex * pageSize); 113 | // 执行查询 114 | conn.Open(); 115 | adapter.Fill(dt); 116 | dgv_list.DataSource = dt; 117 | } 118 | else if (pageIndex <= 0) 119 | { 120 | pageIndex = 1; 121 | } 122 | else 123 | { 124 | MessageBox.Show("没有获取到数据","警告"); 125 | } 126 | } 127 | } 128 | 129 | private void 刷新书库tSBtn_Click(object sender, EventArgs e) 130 | { 131 | if (pageIndex <= 0) 132 | { 133 | pageIndex = 1; 134 | } 135 | GetData(); 136 | } 137 | private void 刷新ToolStripMenuItem_Click(object sender, EventArgs e) 138 | { 139 | if (pageIndex <= 0) 140 | { 141 | pageIndex = 1; 142 | } 143 | GetData(); 144 | } 145 | 146 | private void 跳转至首页tSBtn_Click(object sender, EventArgs e) 147 | { 148 | pageIndex = 1; 149 | GetData(); 150 | } 151 | 152 | private void 跳转至上一页tSBtn_Click(object sender, EventArgs e) 153 | { 154 | pageIndex--; 155 | if (pageIndex <= 0) 156 | { 157 | pageIndex = 1; 158 | } 159 | GetData(); 160 | } 161 | 162 | private void 跳转至下一页页tSBtn_Click(object sender, EventArgs e) 163 | { 164 | pageIndex++; 165 | if (pageIndex > maxIndex ) 166 | { 167 | pageIndex--; 168 | MessageBox.Show("哎呀,到底啦 !","提示"); 169 | } 170 | GetData(); 171 | } 172 | 173 | private void 跳转至最后一页tSBtn_Click(object sender, EventArgs e) 174 | { 175 | pageIndex = maxIndex; 176 | GetData(); 177 | } 178 | 179 | private void 保存修改tSBtn_Click(object sender, EventArgs e) 180 | { 181 | MessageBox.Show("功能暂未开放"); 182 | /* 183 | * 184 | * 185 | // 若绑定数据源则用dgv_list.DataSource as DataTable; 186 | // 未绑定则用DgvToTable()强制转换 187 | // = DgvToTable(dgv_list); 188 | DataTable dt=dgv_list.DataSource as DataTable; 189 | // 完成adapter的UpdateCommand 190 | string str = System.Configuration.ConfigurationManager.ConnectionStrings["library"].ConnectionString; 191 | using (SqlConnection conn = new SqlConnection(str)) 192 | { 193 | 194 | SqlDataAdapter adapter = new SqlDataAdapter(); 195 | 196 | // 构造UpdateCommand 197 | string update = "update books set bName=@bName, bAuthor=@bAuthor,bPubCom=@bPubCom,bPubDat=@bPubDat,ISBN=@ISBN,bPrice=@bPrice,bTag=@bTag where bNum=@bNum"; 198 | SqlCommand updateCmd = new SqlCommand(update, conn); 199 | updateCmd.Parameters.Add("@bName", SqlDbType.NVarChar , 60, "bName"); 200 | updateCmd.Parameters.Add("@bAuthor", SqlDbType.NVarChar, 60, "bAuthor"); 201 | updateCmd.Parameters.Add("@bPubCom", SqlDbType.NVarChar, 50, "bPubCom"); 202 | updateCmd.Parameters.Add("@bPubDat", SqlDbType.NVarChar, 20, "bPubDat"); 203 | updateCmd.Parameters.Add("@ISBN", SqlDbType.NVarChar, 50, "ISBN"); 204 | updateCmd.Parameters.Add("@bPrice", SqlDbType.NVarChar, 10, "bPrice"); 205 | updateCmd.Parameters.Add("@bTag", SqlDbType.NVarChar, 10, "bTag"); 206 | updateCmd.Parameters.Add("@bNum", SqlDbType.NVarChar, 10, "bNum"); 207 | adapter.UpdateCommand = updateCmd; 208 | 209 | // 执行 210 | conn.Open(); 211 | adapter.Update(dt); 212 | } 213 | 214 | // 刷新数据 215 | GetData(); 216 | MessageBox.Show("保存成功"); 217 | * 218 | * 219 | */ 220 | } 221 | private void 修改ToolStripMenuItem_Click(object sender, EventArgs e) 222 | { 223 | MessageBox.Show("功能暂未开放"); 224 | } 225 | 226 | private void 按书名查找tSBtn_Click(object sender, EventArgs e) 227 | { 228 | string sql = "select bNum,bName,bAuthor,bPubCom,bPubDat,ISBN,bPrice,bTag from booksWithbookindex where bName like '%'+ @bName +'%'"; 229 | MyDictionary dic = new MyDictionary(); 230 | dic.Add("@bName", 书名tSTB.Text.Trim()); 231 | DataTable dt = SqlHelper.GetList(sql, dic); 232 | dgv_list.DataSource = dt; 233 | } 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /图书管理系统/obj/x86/Debug/图书管理系统.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\bin\Debug\图书管理系统.exe 2 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\bin\Debug\图书管理系统.pdb 3 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\obj\x86\Debug\图书管理系统.LoginForm.resources 4 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\obj\x86\Debug\图书管理系统.Properties.Resources.resources 5 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\obj\x86\Debug\图书管理系统.csproj.GenerateResource.Cache 6 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\obj\x86\Debug\图书管理系统.exe 7 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\obj\x86\Debug\图书管理系统.pdb 8 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\bin\Debug\图书管理系统.exe.config 9 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统\图书管理系统\obj\x86\Debug\图书管理系统.MainForm.resources 10 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe.config 11 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.exe 12 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.pdb 13 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe 14 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.pdb 15 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.LoginForm.resources 16 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.MainForm.resources 17 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.Properties.Resources.resources 18 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.csproj.GenerateResource.Cache 19 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.BorrowBooks.resources 20 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.FindBookForm.resources 21 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.UpdateIndivForm.resources 22 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.新书入库Form.resources 23 | C:\Users\光\Desktop\1406111035-杨光-数据库课程设计\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.ReturnBooks.resources 24 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe.config 25 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.exe 26 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.pdb 27 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe 28 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.pdb 29 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.AlterPwdForm.resources 30 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.BorrowBooks.resources 31 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.FindBookForm.resources 32 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.新书入库Form.resources 33 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.LoginForm.resources 34 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.MainForm.resources 35 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.Properties.Resources.resources 36 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.ReturnBooks.resources 37 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.UpdateIndivForm.resources 38 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.csproj.GenerateResource.Cache 39 | C:\Users\光\Desktop\2016-6-10\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.csprojResolveAssemblyReference.cache 40 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe.config 41 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.exe 42 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.pdb 43 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe 44 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.pdb 45 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\ResolveAssemblyReference.cache 46 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.AlterPwdForm.resources 47 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.BorrowBooks.resources 48 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.FindBookForm.resources 49 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.新书入库Form.resources 50 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.LoginForm.resources 51 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.MainForm.resources 52 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.Properties.Resources.resources 53 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.ReturnBooks.resources 54 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.UpdateIndivForm.resources 55 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\GenerateResource.read.1.tlog 56 | C:\Users\acer\Desktop\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\GenerateResource.write.1.tlog 57 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe.config 58 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.exe 59 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.pdb 60 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.exe 61 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\bin\Debug\图书管理系统.pdb 62 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\ResolveAssemblyReference.cache 63 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.AlterPwdForm.resources 64 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.BorrowBooks.resources 65 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.FindBookForm.resources 66 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.新书入库Form.resources 67 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.LoginForm.resources 68 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.MainForm.resources 69 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.Properties.Resources.resources 70 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.ReturnBooks.resources 71 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\图书管理系统.UpdateIndivForm.resources 72 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\GenerateResource.read.1.tlog 73 | C:\Users\acer\Desktop\2016.6.12-副本\图书管理系统 - 副本\图书管理系统\obj\x86\Debug\GenerateResource.write.1.tlog 74 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\bin\Debug\图书管理系统.exe.config 75 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.exe 76 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.pdb 77 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\bin\Debug\图书管理系统.exe 78 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\bin\Debug\图书管理系统.pdb 79 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\ResolveAssemblyReference.cache 80 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.AlterPwdForm.resources 81 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.BorrowBooks.resources 82 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.FindBookForm.resources 83 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.新书入库Form.resources 84 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.LoginForm.resources 85 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.MainForm.resources 86 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.Properties.Resources.resources 87 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.ReturnBooks.resources 88 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.UpdateIndivForm.resources 89 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\GenerateResource.read.1.tlog 90 | C:\Users\acer\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\GenerateResource.write.1.tlog 91 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\bin\Debug\图书管理系统.exe.config 92 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.exe 93 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.pdb 94 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\bin\Debug\图书管理系统.exe 95 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\bin\Debug\图书管理系统.pdb 96 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.csprojResolveAssemblyReference.cache 97 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.AlterPwdForm.resources 98 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.BorrowBooks.resources 99 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.FindBookForm.resources 100 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.新书入库Form.resources 101 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.LoginForm.resources 102 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.MainForm.resources 103 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.Properties.Resources.resources 104 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.ReturnBooks.resources 105 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.UpdateIndivForm.resources 106 | C:\Users\光\Desktop\杨光-数据库课程设计\图书管理系统 - 源代码\图书管理系统\obj\x86\Debug\图书管理系统.csproj.GenerateResource.Cache 107 | -------------------------------------------------------------------------------- /图书管理系统/UpdateIndivForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.Data.SqlClient; 10 | using System.Text.RegularExpressions; 11 | 12 | namespace 图书管理系统 13 | { 14 | public partial class UpdateIndivForm : Form 15 | { 16 | public UpdateIndivForm() 17 | { 18 | InitializeComponent(); 19 | } 20 | private string _id; 21 | public string Id 22 | { 23 | get { return _id; } 24 | set { _id = value; } 25 | } 26 | // 权限标记 值admin为管理员 ,值为user则为普通用户 27 | private string _tag; 28 | public string _Tag 29 | { 30 | get { return _tag; } 31 | set { _tag = value; } 32 | } 33 | // P标记用来决定是否隐藏panel 34 | private string _p; 35 | public string P 36 | { 37 | get { return _p; } 38 | set { _p = value; } 39 | } 40 | 41 | // 加载个人信息 42 | private void UpdateIndivForm_Load(object sender, EventArgs e) 43 | { 44 | if (P == "1") // p == "1" 为注册新用户功能 45 | { 46 | 注册用户panel.Visible = true; 47 | 注销用户panel.Visible = false; 48 | } 49 | else if (P == "2") // p == "2" 为注销用户功能 50 | { 51 | } 52 | else // 为修改个人信息 53 | { 54 | 注册用户panel.Visible = false; 55 | 注销用户panel.Visible = false ; 56 | string str = System.Configuration.ConfigurationManager.ConnectionStrings["library"].ConnectionString; 57 | string sql; 58 | if (_Tag == "user") 59 | { 60 | sql = "select * from users where uId='" + Id + "'"; 61 | } 62 | else 63 | { 64 | sql = "select * from admin where aId='" + Id + "'"; 65 | } 66 | using (SqlConnection conn = new SqlConnection(str)) 67 | { 68 | SqlCommand cmd = new SqlCommand(sql, conn); 69 | conn.Open(); 70 | // ExecuteReader()返回一个Datareader对象,这个对象的内容就是与命令匹配的所有行 71 | using (SqlDataReader r = cmd.ExecuteReader()) 72 | { 73 | r.Read(); 74 | 账号textBox.Text = r.GetString(0); 75 | 姓名textBox.Text = r.GetString(2); 76 | 电话号码textBox.Text = r.GetString(4); 77 | if (_Tag == "user") 78 | { 79 | if (r.GetString(5) == "1") 80 | { 81 | label7.Text = "被锁定,请尽快联系管理员办理解锁"; 82 | } 83 | else 84 | { 85 | label7.Text = "正常"; 86 | } 87 | } 88 | else 89 | { 90 | label7.Text = "正常"; 91 | } 92 | 93 | if (r.GetString(3) == "男") 94 | { 95 | 男radioButton.Checked = true; 96 | } 97 | else 98 | { 99 | 女radioButton.Checked = true; 100 | } 101 | } 102 | cmd.Dispose(); 103 | } 104 | 提交button.Visible = false; 105 | } 106 | } 107 | 108 | 109 | #region 提交修改个人信息 110 | private void 姓名textBox_TextChanged(object sender, EventArgs e) 111 | { 112 | 提交button.Visible = true; 113 | } 114 | private void 账号textBox_TextChanged(object sender, EventArgs e) 115 | { 116 | if (账号textBox.Text!= Id) 117 | { 118 | 提交button.Visible = true; 119 | } 120 | else 121 | { 122 | 提交button.Visible = false; 123 | } 124 | } 125 | private void 男radioButton_CheckedChanged(object sender, EventArgs e) 126 | { 127 | 提交button.Visible = true; 128 | } 129 | private void 电话号码textBox_TextChanged(object sender, EventArgs e) 130 | { 131 | 提交button.Visible = true; 132 | } 133 | 134 | private void 提交button_Click(object sender, EventArgs e) 135 | { 136 | // 判断账号是否存在 137 | if (账号textBox.Text != Id) 138 | { 139 | if (SqlHelper.IsUserExists(uIdTb.Text.Trim())) 140 | { 141 | MessageBox.Show("账号已存在", "操作失败"); 142 | return; 143 | } 144 | } 145 | 146 | // 完成用户的修改 147 | string uName = 姓名textBox.Text.Trim(); 148 | string uId = 账号textBox.Text.Trim(); 149 | string uPhoNum = 电话号码textBox.Text.Trim(); 150 | string uGender; 151 | if (男radioButton.Checked == true) 152 | { 153 | uGender = "男"; 154 | } 155 | else 156 | { 157 | uGender = "女"; 158 | } 159 | // 构造sql语句 160 | string sql; 161 | if (_Tag == "user") 162 | { 163 | sql = "update users set uId =@uId,uName=@uName,uGender=@uGender,uPhoNum=@uPhoNum where uId=@ID"; 164 | } 165 | else 166 | { 167 | sql = "update admin set aId =@uId,aName=@uName,aGender=@uGender,aPhoNum=@uPhoNum where aId=@ID"; 168 | } 169 | MyDictionary dic = new MyDictionary(); 170 | dic.Add("@uId", uId); 171 | dic.Add("@uName", uName); 172 | dic.Add("@uGender", uGender); 173 | dic.Add("@uPhoNum", uPhoNum); 174 | dic.Add("@ID", Id); 175 | // 执行并返回 176 | int i = SqlHelper.ExecuteNonQuery(sql, dic); 177 | 178 | if (i == 1) 179 | { 180 | MessageBox.Show("提交完成"); 181 | } 182 | this.Close(); 183 | 184 | } 185 | #endregion 186 | 187 | 188 | private void 注册完成button_Click(object sender, EventArgs e) 189 | { 190 | string uGender = ""; 191 | if (uIdTb.Text.Trim().Length < 6) 192 | { 193 | MessageBox.Show("账号长度应该大于6"); 194 | } 195 | else if (uPwdTb.Text.Trim().Length < 6) 196 | { 197 | MessageBox.Show("密码长度应该大于6"); 198 | } 199 | else if (uNameTb.Text.Trim().Length < 2 || uNameTb.Text.Trim().Length > 15) 200 | { 201 | MessageBox.Show("姓名长度应该大于1并且小于等于15"); 202 | } 203 | else if (注册rBtn男.Checked == false && 注册rBtn女.Checked == false) 204 | { 205 | MessageBox.Show("请选择性别"); 206 | } 207 | else if (Regex.IsMatch(uPhoNumTb.Text.Trim(), @"^1\d{10}$") != true && Regex.IsMatch(uPhoNumTb.Text.Trim(), @"^(\d{3,4}-)?\d{6,8}$") != true) 208 | { 209 | MessageBox.Show("请输入合法的手机号码或电话号码"); 210 | } 211 | else 212 | { 213 | // 判断判断账号是否存在 214 | if (SqlHelper.IsUserExists(uIdTb.Text.Trim())) 215 | { 216 | MessageBox.Show("账号已存在","操作失败"); 217 | return; 218 | } 219 | 220 | if(注册rBtn男.Checked == true ) 221 | { 222 | uGender ="男"; 223 | } 224 | else 225 | { 226 | uGender ="女"; 227 | } 228 | 229 | // 添加新用户 230 | string sql = "insert into users(uId,uPwd,uName,uGender,uPhoNum,uBan) values(@id,@pwd,@name,@gender,@phonum,'0')"; 231 | MyDictionary dic = new MyDictionary (); 232 | dic.Add("@id", uIdTb.Text.Trim()); 233 | dic.Add("@pwd", uPwdTb.Text.Trim()); 234 | dic.Add("@name", uNameTb.Text.Trim()); 235 | dic.Add("@gender", uGender); 236 | dic.Add("@phonum", uPhoNumTb.Text.Trim()); 237 | int i = SqlHelper.ExecuteNonQuery(sql, dic); 238 | if (i == 1) 239 | { 240 | MessageBox.Show("成功注册新用户"); 241 | this.Close(); 242 | } 243 | else 244 | { 245 | MessageBox.Show("操作失败,请联系管理员"); 246 | } 247 | } 248 | } 249 | 250 | private void 注销Btn_Click(object sender, EventArgs e) 251 | { 252 | // 判断账号是否存在 253 | if (!SqlHelper.IsUserExists(deletTB.Text.Trim())) 254 | { 255 | MessageBox.Show("账号不存在", "操作失败"); 256 | return; 257 | } 258 | else 259 | { 260 | DialogResult dt = MessageBox.Show("确定要注销此用户吗", "提示", MessageBoxButtons.OKCancel); 261 | if (dt != DialogResult.OK) 262 | { 263 | return; 264 | } 265 | else 266 | { 267 | string sql = "delete from users where uId=@id"; 268 | MyDictionary dic = new MyDictionary(); 269 | dic.Add("@id", deletTB.Text.Trim()); 270 | int i = SqlHelper.ExecuteNonQuery(sql, dic); 271 | if (i == 1) 272 | { 273 | MessageBox.Show("注销成功"); 274 | } 275 | } 276 | this.Close(); 277 | } 278 | } 279 | } 280 | } 281 | -------------------------------------------------------------------------------- /图书管理系统/InsertNewBook.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 图书管理系统 2 | { 3 | partial class 新书入库Form 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.新书入库Btn = new System.Windows.Forms.Button(); 32 | this.bNameTB = new System.Windows.Forms.TextBox(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.printDocument1 = new System.Drawing.Printing.PrintDocument(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | this.label3 = new System.Windows.Forms.Label(); 37 | this.label4 = new System.Windows.Forms.Label(); 38 | this.bAuthorTB = new System.Windows.Forms.TextBox(); 39 | this.bPubComTB = new System.Windows.Forms.TextBox(); 40 | this.bPubDatTB = new System.Windows.Forms.TextBox(); 41 | this.label5 = new System.Windows.Forms.Label(); 42 | this.label6 = new System.Windows.Forms.Label(); 43 | this.label7 = new System.Windows.Forms.Label(); 44 | this.ISBN = new System.Windows.Forms.TextBox(); 45 | this.bPriceTB = new System.Windows.Forms.TextBox(); 46 | this.bTagTB = new System.Windows.Forms.TextBox(); 47 | this.label8 = new System.Windows.Forms.Label(); 48 | this.书籍注销panel = new System.Windows.Forms.Panel(); 49 | this.注销书籍TB = new System.Windows.Forms.TextBox(); 50 | this.label9 = new System.Windows.Forms.Label(); 51 | this.注销书籍Btn = new System.Windows.Forms.Button(); 52 | this.书籍注销panel.SuspendLayout(); 53 | this.SuspendLayout(); 54 | // 55 | // 新书入库Btn 56 | // 57 | this.新书入库Btn.Location = new System.Drawing.Point(216, 277); 58 | this.新书入库Btn.Name = "新书入库Btn"; 59 | this.新书入库Btn.Size = new System.Drawing.Size(75, 23); 60 | this.新书入库Btn.TabIndex = 0; 61 | this.新书入库Btn.Text = "完成"; 62 | this.新书入库Btn.UseVisualStyleBackColor = true; 63 | this.新书入库Btn.Click += new System.EventHandler(this.新书入库Btn_Click); 64 | // 65 | // bNameTB 66 | // 67 | this.bNameTB.Location = new System.Drawing.Point(127, 45); 68 | this.bNameTB.Name = "bNameTB"; 69 | this.bNameTB.Size = new System.Drawing.Size(122, 21); 70 | this.bNameTB.TabIndex = 1; 71 | // 72 | // label1 73 | // 74 | this.label1.AutoSize = true; 75 | this.label1.Location = new System.Drawing.Point(80, 48); 76 | this.label1.Name = "label1"; 77 | this.label1.Size = new System.Drawing.Size(41, 12); 78 | this.label1.TabIndex = 2; 79 | this.label1.Text = "书名:"; 80 | // 81 | // label2 82 | // 83 | this.label2.AutoSize = true; 84 | this.label2.Location = new System.Drawing.Point(284, 48); 85 | this.label2.Name = "label2"; 86 | this.label2.Size = new System.Drawing.Size(41, 12); 87 | this.label2.TabIndex = 3; 88 | this.label2.Text = "作者:"; 89 | // 90 | // label3 91 | // 92 | this.label3.AutoSize = true; 93 | this.label3.Location = new System.Drawing.Point(68, 98); 94 | this.label3.Name = "label3"; 95 | this.label3.Size = new System.Drawing.Size(53, 12); 96 | this.label3.TabIndex = 4; 97 | this.label3.Text = "出版社:"; 98 | // 99 | // label4 100 | // 101 | this.label4.AutoSize = true; 102 | this.label4.Location = new System.Drawing.Point(68, 204); 103 | this.label4.Name = "label4"; 104 | this.label4.Size = new System.Drawing.Size(65, 12); 105 | this.label4.TabIndex = 5; 106 | this.label4.Text = "出版年月:"; 107 | // 108 | // bAuthorTB 109 | // 110 | this.bAuthorTB.Location = new System.Drawing.Point(341, 45); 111 | this.bAuthorTB.Name = "bAuthorTB"; 112 | this.bAuthorTB.Size = new System.Drawing.Size(124, 21); 113 | this.bAuthorTB.TabIndex = 6; 114 | // 115 | // bPubComTB 116 | // 117 | this.bPubComTB.Location = new System.Drawing.Point(127, 95); 118 | this.bPubComTB.Name = "bPubComTB"; 119 | this.bPubComTB.Size = new System.Drawing.Size(122, 21); 120 | this.bPubComTB.TabIndex = 7; 121 | // 122 | // bPubDatTB 123 | // 124 | this.bPubDatTB.Location = new System.Drawing.Point(127, 201); 125 | this.bPubDatTB.Name = "bPubDatTB"; 126 | this.bPubDatTB.Size = new System.Drawing.Size(122, 21); 127 | this.bPubDatTB.TabIndex = 8; 128 | // 129 | // label5 130 | // 131 | this.label5.AutoSize = true; 132 | this.label5.Location = new System.Drawing.Point(284, 151); 133 | this.label5.Name = "label5"; 134 | this.label5.Size = new System.Drawing.Size(41, 12); 135 | this.label5.TabIndex = 9; 136 | this.label5.Text = "价格:"; 137 | // 138 | // label6 139 | // 140 | this.label6.AutoSize = true; 141 | this.label6.Location = new System.Drawing.Point(282, 98); 142 | this.label6.Name = "label6"; 143 | this.label6.Size = new System.Drawing.Size(41, 12); 144 | this.label6.TabIndex = 10; 145 | this.label6.Text = "ISBN:"; 146 | // 147 | // label7 148 | // 149 | this.label7.AutoSize = true; 150 | this.label7.Location = new System.Drawing.Point(80, 151); 151 | this.label7.Name = "label7"; 152 | this.label7.Size = new System.Drawing.Size(41, 12); 153 | this.label7.TabIndex = 11; 154 | this.label7.Text = "数量:"; 155 | // 156 | // ISBN 157 | // 158 | this.ISBN.Location = new System.Drawing.Point(341, 95); 159 | this.ISBN.Name = "ISBN"; 160 | this.ISBN.Size = new System.Drawing.Size(122, 21); 161 | this.ISBN.TabIndex = 12; 162 | // 163 | // bPriceTB 164 | // 165 | this.bPriceTB.Location = new System.Drawing.Point(341, 148); 166 | this.bPriceTB.Name = "bPriceTB"; 167 | this.bPriceTB.Size = new System.Drawing.Size(124, 21); 168 | this.bPriceTB.TabIndex = 13; 169 | // 170 | // bTagTB 171 | // 172 | this.bTagTB.Location = new System.Drawing.Point(127, 148); 173 | this.bTagTB.Name = "bTagTB"; 174 | this.bTagTB.Size = new System.Drawing.Size(122, 21); 175 | this.bTagTB.TabIndex = 14; 176 | // 177 | // label8 178 | // 179 | this.label8.AutoSize = true; 180 | this.label8.Location = new System.Drawing.Point(255, 204); 181 | this.label8.Name = "label8"; 182 | this.label8.Size = new System.Drawing.Size(101, 12); 183 | this.label8.TabIndex = 15; 184 | this.label8.Text = "(格式 yyyy-mm)"; 185 | // 186 | // 书籍注销panel 187 | // 188 | this.书籍注销panel.Controls.Add(this.注销书籍TB); 189 | this.书籍注销panel.Controls.Add(this.label9); 190 | this.书籍注销panel.Controls.Add(this.注销书籍Btn); 191 | this.书籍注销panel.Location = new System.Drawing.Point(21, 29); 192 | this.书籍注销panel.Name = "书籍注销panel"; 193 | this.书籍注销panel.Size = new System.Drawing.Size(487, 271); 194 | this.书籍注销panel.TabIndex = 16; 195 | // 196 | // 注销书籍TB 197 | // 198 | this.注销书籍TB.Location = new System.Drawing.Point(236, 92); 199 | this.注销书籍TB.Name = "注销书籍TB"; 200 | this.注销书籍TB.Size = new System.Drawing.Size(135, 21); 201 | this.注销书籍TB.TabIndex = 2; 202 | // 203 | // label9 204 | // 205 | this.label9.AutoSize = true; 206 | this.label9.Location = new System.Drawing.Point(117, 95); 207 | this.label9.Name = "label9"; 208 | this.label9.Size = new System.Drawing.Size(113, 12); 209 | this.label9.TabIndex = 1; 210 | this.label9.Text = "请输入书籍序列号:"; 211 | // 212 | // 注销书籍Btn 213 | // 214 | this.注销书籍Btn.Location = new System.Drawing.Point(195, 172); 215 | this.注销书籍Btn.Name = "注销书籍Btn"; 216 | this.注销书籍Btn.Size = new System.Drawing.Size(75, 23); 217 | this.注销书籍Btn.TabIndex = 0; 218 | this.注销书籍Btn.Text = "注销书籍"; 219 | this.注销书籍Btn.UseVisualStyleBackColor = true; 220 | this.注销书籍Btn.Click += new System.EventHandler(this.注销书籍Btn_Click); 221 | // 222 | // 新书入库Form 223 | // 224 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 225 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 226 | this.ClientSize = new System.Drawing.Size(536, 334); 227 | this.Controls.Add(this.书籍注销panel); 228 | this.Controls.Add(this.label8); 229 | this.Controls.Add(this.bTagTB); 230 | this.Controls.Add(this.bPriceTB); 231 | this.Controls.Add(this.ISBN); 232 | this.Controls.Add(this.label7); 233 | this.Controls.Add(this.label6); 234 | this.Controls.Add(this.label5); 235 | this.Controls.Add(this.bPubDatTB); 236 | this.Controls.Add(this.bPubComTB); 237 | this.Controls.Add(this.bAuthorTB); 238 | this.Controls.Add(this.label4); 239 | this.Controls.Add(this.label3); 240 | this.Controls.Add(this.label2); 241 | this.Controls.Add(this.label1); 242 | this.Controls.Add(this.bNameTB); 243 | this.Controls.Add(this.新书入库Btn); 244 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 245 | this.Name = "新书入库Form"; 246 | this.Text = "新书入库"; 247 | this.Load += new System.EventHandler(this.新书入库Form_Load); 248 | this.书籍注销panel.ResumeLayout(false); 249 | this.书籍注销panel.PerformLayout(); 250 | this.ResumeLayout(false); 251 | this.PerformLayout(); 252 | 253 | } 254 | 255 | #endregion 256 | 257 | private System.Windows.Forms.Button 新书入库Btn; 258 | private System.Windows.Forms.TextBox bNameTB; 259 | private System.Windows.Forms.Label label1; 260 | private System.Drawing.Printing.PrintDocument printDocument1; 261 | private System.Windows.Forms.Label label2; 262 | private System.Windows.Forms.Label label3; 263 | private System.Windows.Forms.Label label4; 264 | private System.Windows.Forms.TextBox bAuthorTB; 265 | private System.Windows.Forms.TextBox bPubComTB; 266 | private System.Windows.Forms.TextBox bPubDatTB; 267 | private System.Windows.Forms.Label label5; 268 | private System.Windows.Forms.Label label6; 269 | private System.Windows.Forms.Label label7; 270 | private System.Windows.Forms.TextBox ISBN; 271 | private System.Windows.Forms.TextBox bPriceTB; 272 | private System.Windows.Forms.TextBox bTagTB; 273 | private System.Windows.Forms.Label label8; 274 | private System.Windows.Forms.Panel 书籍注销panel; 275 | private System.Windows.Forms.TextBox 注销书籍TB; 276 | private System.Windows.Forms.Label label9; 277 | private System.Windows.Forms.Button 注销书籍Btn; 278 | } 279 | } -------------------------------------------------------------------------------- /图书管理系统/BorrowBooks.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 图书管理系统 2 | { 3 | partial class BorrowBooks 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.查书btn = new System.Windows.Forms.Button(); 32 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 33 | this.bNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); 34 | this.bbName = new System.Windows.Forms.DataGridViewTextBoxColumn(); 35 | this.bAuthor = new System.Windows.Forms.DataGridViewTextBoxColumn(); 36 | this.bPubCom = new System.Windows.Forms.DataGridViewTextBoxColumn(); 37 | this.bPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); 38 | this.bTag = new System.Windows.Forms.DataGridViewTextBoxColumn(); 39 | this.label1 = new System.Windows.Forms.Label(); 40 | this.label2 = new System.Windows.Forms.Label(); 41 | this.bName = new System.Windows.Forms.Label(); 42 | this.label4 = new System.Windows.Forms.Label(); 43 | this.label5 = new System.Windows.Forms.Label(); 44 | this.查寻书名tB = new System.Windows.Forms.TextBox(); 45 | this.bNameTB = new System.Windows.Forms.TextBox(); 46 | this.uIdTb = new System.Windows.Forms.TextBox(); 47 | this.bPriceTB = new System.Windows.Forms.TextBox(); 48 | this.bNumTB = new System.Windows.Forms.TextBox(); 49 | this.comboBox1 = new System.Windows.Forms.ComboBox(); 50 | this.label6 = new System.Windows.Forms.Label(); 51 | this.提交借书 = new System.Windows.Forms.Button(); 52 | this.label3 = new System.Windows.Forms.Label(); 53 | this.label7 = new System.Windows.Forms.Label(); 54 | this.shapeContainer1 = new Microsoft.VisualBasic.PowerPacks.ShapeContainer(); 55 | this.lineShape1 = new Microsoft.VisualBasic.PowerPacks.LineShape(); 56 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 57 | this.SuspendLayout(); 58 | // 59 | // 查书btn 60 | // 61 | this.查书btn.Location = new System.Drawing.Point(440, 23); 62 | this.查书btn.Name = "查书btn"; 63 | this.查书btn.Size = new System.Drawing.Size(105, 23); 64 | this.查书btn.TabIndex = 0; 65 | this.查书btn.Text = "查询"; 66 | this.查书btn.UseVisualStyleBackColor = true; 67 | this.查书btn.Click += new System.EventHandler(this.查书btn_Click); 68 | // 69 | // dataGridView1 70 | // 71 | this.dataGridView1.AllowUserToAddRows = false; 72 | this.dataGridView1.AllowUserToDeleteRows = false; 73 | this.dataGridView1.AllowUserToResizeColumns = false; 74 | this.dataGridView1.AllowUserToResizeRows = false; 75 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 76 | this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 77 | this.bNum, 78 | this.bbName, 79 | this.bAuthor, 80 | this.bPubCom, 81 | this.bPrice, 82 | this.bTag}); 83 | this.dataGridView1.Location = new System.Drawing.Point(-1, 227); 84 | this.dataGridView1.MultiSelect = false; 85 | this.dataGridView1.Name = "dataGridView1"; 86 | this.dataGridView1.ReadOnly = true; 87 | this.dataGridView1.RowTemplate.Height = 23; 88 | this.dataGridView1.Size = new System.Drawing.Size(644, 165); 89 | this.dataGridView1.TabIndex = 1; 90 | this.dataGridView1.CellMouseUp += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseUp); 91 | // 92 | // bNum 93 | // 94 | this.bNum.DataPropertyName = "bNum"; 95 | this.bNum.HeaderText = "书籍序列号"; 96 | this.bNum.Name = "bNum"; 97 | this.bNum.ReadOnly = true; 98 | // 99 | // bbName 100 | // 101 | this.bbName.DataPropertyName = "bName"; 102 | this.bbName.HeaderText = "书名"; 103 | this.bbName.Name = "bbName"; 104 | this.bbName.ReadOnly = true; 105 | // 106 | // bAuthor 107 | // 108 | this.bAuthor.DataPropertyName = "bAuthor"; 109 | this.bAuthor.HeaderText = "作者"; 110 | this.bAuthor.Name = "bAuthor"; 111 | this.bAuthor.ReadOnly = true; 112 | // 113 | // bPubCom 114 | // 115 | this.bPubCom.DataPropertyName = "bPubCom"; 116 | this.bPubCom.HeaderText = "出版社"; 117 | this.bPubCom.Name = "bPubCom"; 118 | this.bPubCom.ReadOnly = true; 119 | // 120 | // bPrice 121 | // 122 | this.bPrice.DataPropertyName = "bPrice"; 123 | this.bPrice.HeaderText = "价格"; 124 | this.bPrice.Name = "bPrice"; 125 | this.bPrice.ReadOnly = true; 126 | // 127 | // bTag 128 | // 129 | this.bTag.DataPropertyName = "bTag"; 130 | this.bTag.HeaderText = "库存量"; 131 | this.bTag.Name = "bTag"; 132 | this.bTag.ReadOnly = true; 133 | // 134 | // label1 135 | // 136 | this.label1.AutoSize = true; 137 | this.label1.Location = new System.Drawing.Point(115, 28); 138 | this.label1.Name = "label1"; 139 | this.label1.Size = new System.Drawing.Size(113, 12); 140 | this.label1.TabIndex = 2; 141 | this.label1.Text = "输入书名点击查询:"; 142 | // 143 | // label2 144 | // 145 | this.label2.AutoSize = true; 146 | this.label2.Location = new System.Drawing.Point(362, 76); 147 | this.label2.Name = "label2"; 148 | this.label2.Size = new System.Drawing.Size(65, 12); 149 | this.label2.TabIndex = 3; 150 | this.label2.Text = "借书用户:"; 151 | // 152 | // bName 153 | // 154 | this.bName.AutoSize = true; 155 | this.bName.Location = new System.Drawing.Point(115, 125); 156 | this.bName.Name = "bName"; 157 | this.bName.Size = new System.Drawing.Size(41, 12); 158 | this.bName.TabIndex = 4; 159 | this.bName.Text = "书名:"; 160 | // 161 | // label4 162 | // 163 | this.label4.AutoSize = true; 164 | this.label4.Location = new System.Drawing.Point(100, 76); 165 | this.label4.Name = "label4"; 166 | this.label4.Size = new System.Drawing.Size(77, 12); 167 | this.label4.TabIndex = 5; 168 | this.label4.Text = "书籍序列号:"; 169 | // 170 | // label5 171 | // 172 | this.label5.AutoSize = true; 173 | this.label5.Location = new System.Drawing.Point(100, 167); 174 | this.label5.Name = "label5"; 175 | this.label5.Size = new System.Drawing.Size(65, 12); 176 | this.label5.TabIndex = 6; 177 | this.label5.Text = "书籍价格:"; 178 | // 179 | // 查寻书名tB 180 | // 181 | this.查寻书名tB.Location = new System.Drawing.Point(234, 25); 182 | this.查寻书名tB.Name = "查寻书名tB"; 183 | this.查寻书名tB.Size = new System.Drawing.Size(176, 21); 184 | this.查寻书名tB.TabIndex = 7; 185 | // 186 | // bNameTB 187 | // 188 | this.bNameTB.Location = new System.Drawing.Point(176, 122); 189 | this.bNameTB.Name = "bNameTB"; 190 | this.bNameTB.ReadOnly = true; 191 | this.bNameTB.Size = new System.Drawing.Size(131, 21); 192 | this.bNameTB.TabIndex = 8; 193 | // 194 | // uIdTb 195 | // 196 | this.uIdTb.Location = new System.Drawing.Point(433, 73); 197 | this.uIdTb.Name = "uIdTb"; 198 | this.uIdTb.Size = new System.Drawing.Size(124, 21); 199 | this.uIdTb.TabIndex = 9; 200 | // 201 | // bPriceTB 202 | // 203 | this.bPriceTB.Location = new System.Drawing.Point(176, 167); 204 | this.bPriceTB.Name = "bPriceTB"; 205 | this.bPriceTB.ReadOnly = true; 206 | this.bPriceTB.Size = new System.Drawing.Size(131, 21); 207 | this.bPriceTB.TabIndex = 10; 208 | // 209 | // bNumTB 210 | // 211 | this.bNumTB.Location = new System.Drawing.Point(176, 73); 212 | this.bNumTB.Name = "bNumTB"; 213 | this.bNumTB.ReadOnly = true; 214 | this.bNumTB.Size = new System.Drawing.Size(131, 21); 215 | this.bNumTB.TabIndex = 11; 216 | // 217 | // comboBox1 218 | // 219 | this.comboBox1.FormattingEnabled = true; 220 | this.comboBox1.Items.AddRange(new object[] { 221 | "30天", 222 | "60天", 223 | "90天"}); 224 | this.comboBox1.Location = new System.Drawing.Point(436, 122); 225 | this.comboBox1.Name = "comboBox1"; 226 | this.comboBox1.Size = new System.Drawing.Size(121, 20); 227 | this.comboBox1.TabIndex = 12; 228 | // 229 | // label6 230 | // 231 | this.label6.AutoSize = true; 232 | this.label6.Location = new System.Drawing.Point(362, 125); 233 | this.label6.Name = "label6"; 234 | this.label6.Size = new System.Drawing.Size(65, 12); 235 | this.label6.TabIndex = 13; 236 | this.label6.Text = "借阅时间:"; 237 | // 238 | // 提交借书 239 | // 240 | this.提交借书.Location = new System.Drawing.Point(364, 165); 241 | this.提交借书.Name = "提交借书"; 242 | this.提交借书.Size = new System.Drawing.Size(197, 23); 243 | this.提交借书.TabIndex = 14; 244 | this.提交借书.Text = "请选择书籍,单击并提交"; 245 | this.提交借书.UseVisualStyleBackColor = true; 246 | this.提交借书.Click += new System.EventHandler(this.提交借书_Click); 247 | // 248 | // label3 249 | // 250 | this.label3.AutoSize = true; 251 | this.label3.ForeColor = System.Drawing.Color.Red; 252 | this.label3.Location = new System.Drawing.Point(3, 9); 253 | this.label3.Name = "label3"; 254 | this.label3.Size = new System.Drawing.Size(59, 12); 255 | this.label3.TabIndex = 16; 256 | this.label3.Text = "第一步 =>"; 257 | // 258 | // label7 259 | // 260 | this.label7.AutoSize = true; 261 | this.label7.ForeColor = System.Drawing.Color.Red; 262 | this.label7.Location = new System.Drawing.Point(3, 73); 263 | this.label7.Name = "label7"; 264 | this.label7.Size = new System.Drawing.Size(59, 12); 265 | this.label7.TabIndex = 17; 266 | this.label7.Text = "第二步 =>"; 267 | // 268 | // shapeContainer1 269 | // 270 | this.shapeContainer1.Location = new System.Drawing.Point(0, 0); 271 | this.shapeContainer1.Margin = new System.Windows.Forms.Padding(0); 272 | this.shapeContainer1.Name = "shapeContainer1"; 273 | this.shapeContainer1.Shapes.AddRange(new Microsoft.VisualBasic.PowerPacks.Shape[] { 274 | this.lineShape1}); 275 | this.shapeContainer1.Size = new System.Drawing.Size(643, 392); 276 | this.shapeContainer1.TabIndex = 18; 277 | this.shapeContainer1.TabStop = false; 278 | // 279 | // lineShape1 280 | // 281 | this.lineShape1.Name = "lineShape1"; 282 | this.lineShape1.X1 = -2; 283 | this.lineShape1.X2 = 640; 284 | this.lineShape1.Y1 = 52; 285 | this.lineShape1.Y2 = 52; 286 | // 287 | // BorrowBooks 288 | // 289 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 290 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 291 | this.ClientSize = new System.Drawing.Size(643, 392); 292 | this.Controls.Add(this.label7); 293 | this.Controls.Add(this.label3); 294 | this.Controls.Add(this.提交借书); 295 | this.Controls.Add(this.label6); 296 | this.Controls.Add(this.comboBox1); 297 | this.Controls.Add(this.bNumTB); 298 | this.Controls.Add(this.bPriceTB); 299 | this.Controls.Add(this.uIdTb); 300 | this.Controls.Add(this.bNameTB); 301 | this.Controls.Add(this.查寻书名tB); 302 | this.Controls.Add(this.label5); 303 | this.Controls.Add(this.label4); 304 | this.Controls.Add(this.bName); 305 | this.Controls.Add(this.label2); 306 | this.Controls.Add(this.label1); 307 | this.Controls.Add(this.dataGridView1); 308 | this.Controls.Add(this.查书btn); 309 | this.Controls.Add(this.shapeContainer1); 310 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 311 | this.Name = "BorrowBooks"; 312 | this.Text = "借书办理"; 313 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 314 | this.ResumeLayout(false); 315 | this.PerformLayout(); 316 | 317 | } 318 | 319 | #endregion 320 | 321 | private System.Windows.Forms.Button 查书btn; 322 | private System.Windows.Forms.DataGridView dataGridView1; 323 | private System.Windows.Forms.Label label1; 324 | private System.Windows.Forms.Label label2; 325 | private System.Windows.Forms.Label bName; 326 | private System.Windows.Forms.Label label4; 327 | private System.Windows.Forms.Label label5; 328 | private System.Windows.Forms.TextBox 查寻书名tB; 329 | private System.Windows.Forms.TextBox bNameTB; 330 | private System.Windows.Forms.TextBox uIdTb; 331 | private System.Windows.Forms.TextBox bPriceTB; 332 | private System.Windows.Forms.TextBox bNumTB; 333 | private System.Windows.Forms.ComboBox comboBox1; 334 | private System.Windows.Forms.Label label6; 335 | private System.Windows.Forms.Button 提交借书; 336 | private System.Windows.Forms.DataGridViewTextBoxColumn bNum; 337 | private System.Windows.Forms.DataGridViewTextBoxColumn bbName; 338 | private System.Windows.Forms.DataGridViewTextBoxColumn bAuthor; 339 | private System.Windows.Forms.DataGridViewTextBoxColumn bPubCom; 340 | private System.Windows.Forms.DataGridViewTextBoxColumn bPrice; 341 | private System.Windows.Forms.DataGridViewTextBoxColumn bTag; 342 | private System.Windows.Forms.Label label3; 343 | private System.Windows.Forms.Label label7; 344 | private Microsoft.VisualBasic.PowerPacks.ShapeContainer shapeContainer1; 345 | private Microsoft.VisualBasic.PowerPacks.LineShape lineShape1; 346 | 347 | } 348 | } -------------------------------------------------------------------------------- /图书管理系统/UpdateIndivForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 图书管理系统 2 | { 3 | partial class UpdateIndivForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label1 = new System.Windows.Forms.Label(); 32 | this.label2 = new System.Windows.Forms.Label(); 33 | this.label4 = new System.Windows.Forms.Label(); 34 | this.label5 = new System.Windows.Forms.Label(); 35 | this.账号textBox = new System.Windows.Forms.TextBox(); 36 | this.姓名textBox = new System.Windows.Forms.TextBox(); 37 | this.电话号码textBox = new System.Windows.Forms.TextBox(); 38 | this.提交button = new System.Windows.Forms.Button(); 39 | this.男radioButton = new System.Windows.Forms.RadioButton(); 40 | this.女radioButton = new System.Windows.Forms.RadioButton(); 41 | this.label6 = new System.Windows.Forms.Label(); 42 | this.label7 = new System.Windows.Forms.Label(); 43 | this.注册用户panel = new System.Windows.Forms.Panel(); 44 | this.注销用户panel = new System.Windows.Forms.Panel(); 45 | this.deletTB = new System.Windows.Forms.TextBox(); 46 | this.label12 = new System.Windows.Forms.Label(); 47 | this.注销Btn = new System.Windows.Forms.Button(); 48 | this.label3 = new System.Windows.Forms.Label(); 49 | this.label8 = new System.Windows.Forms.Label(); 50 | this.label9 = new System.Windows.Forms.Label(); 51 | this.label10 = new System.Windows.Forms.Label(); 52 | this.label11 = new System.Windows.Forms.Label(); 53 | this.uIdTb = new System.Windows.Forms.TextBox(); 54 | this.uPwdTb = new System.Windows.Forms.TextBox(); 55 | this.uNameTb = new System.Windows.Forms.TextBox(); 56 | this.uPhoNumTb = new System.Windows.Forms.TextBox(); 57 | this.注册rBtn男 = new System.Windows.Forms.RadioButton(); 58 | this.注册rBtn女 = new System.Windows.Forms.RadioButton(); 59 | this.注册完成button = new System.Windows.Forms.Button(); 60 | this.注册用户panel.SuspendLayout(); 61 | this.注销用户panel.SuspendLayout(); 62 | this.SuspendLayout(); 63 | // 64 | // label1 65 | // 66 | this.label1.AutoSize = true; 67 | this.label1.Location = new System.Drawing.Point(100, 39); 68 | this.label1.Name = "label1"; 69 | this.label1.Size = new System.Drawing.Size(29, 12); 70 | this.label1.TabIndex = 0; 71 | this.label1.Text = "账号"; 72 | // 73 | // label2 74 | // 75 | this.label2.AutoSize = true; 76 | this.label2.Location = new System.Drawing.Point(100, 72); 77 | this.label2.Name = "label2"; 78 | this.label2.Size = new System.Drawing.Size(29, 12); 79 | this.label2.TabIndex = 1; 80 | this.label2.Text = "姓名"; 81 | // 82 | // label4 83 | // 84 | this.label4.AutoSize = true; 85 | this.label4.Location = new System.Drawing.Point(100, 132); 86 | this.label4.Name = "label4"; 87 | this.label4.Size = new System.Drawing.Size(53, 12); 88 | this.label4.TabIndex = 3; 89 | this.label4.Text = "电话号码"; 90 | // 91 | // label5 92 | // 93 | this.label5.AutoSize = true; 94 | this.label5.Location = new System.Drawing.Point(100, 104); 95 | this.label5.Name = "label5"; 96 | this.label5.Size = new System.Drawing.Size(29, 12); 97 | this.label5.TabIndex = 4; 98 | this.label5.Text = "性别"; 99 | // 100 | // 账号textBox 101 | // 102 | this.账号textBox.Location = new System.Drawing.Point(212, 36); 103 | this.账号textBox.Name = "账号textBox"; 104 | this.账号textBox.Size = new System.Drawing.Size(143, 21); 105 | this.账号textBox.TabIndex = 5; 106 | this.账号textBox.TextChanged += new System.EventHandler(this.账号textBox_TextChanged); 107 | // 108 | // 姓名textBox 109 | // 110 | this.姓名textBox.Location = new System.Drawing.Point(212, 69); 111 | this.姓名textBox.Name = "姓名textBox"; 112 | this.姓名textBox.Size = new System.Drawing.Size(143, 21); 113 | this.姓名textBox.TabIndex = 6; 114 | this.姓名textBox.TextChanged += new System.EventHandler(this.姓名textBox_TextChanged); 115 | // 116 | // 电话号码textBox 117 | // 118 | this.电话号码textBox.Location = new System.Drawing.Point(212, 129); 119 | this.电话号码textBox.Name = "电话号码textBox"; 120 | this.电话号码textBox.Size = new System.Drawing.Size(143, 21); 121 | this.电话号码textBox.TabIndex = 8; 122 | this.电话号码textBox.TextChanged += new System.EventHandler(this.电话号码textBox_TextChanged); 123 | // 124 | // 提交button 125 | // 126 | this.提交button.Location = new System.Drawing.Point(185, 269); 127 | this.提交button.Name = "提交button"; 128 | this.提交button.Size = new System.Drawing.Size(75, 23); 129 | this.提交button.TabIndex = 10; 130 | this.提交button.Text = "提交"; 131 | this.提交button.UseVisualStyleBackColor = true; 132 | this.提交button.Click += new System.EventHandler(this.提交button_Click); 133 | // 134 | // 男radioButton 135 | // 136 | this.男radioButton.AutoSize = true; 137 | this.男radioButton.Location = new System.Drawing.Point(225, 104); 138 | this.男radioButton.Name = "男radioButton"; 139 | this.男radioButton.Size = new System.Drawing.Size(35, 16); 140 | this.男radioButton.TabIndex = 11; 141 | this.男radioButton.TabStop = true; 142 | this.男radioButton.Text = "男"; 143 | this.男radioButton.UseVisualStyleBackColor = true; 144 | this.男radioButton.CheckedChanged += new System.EventHandler(this.男radioButton_CheckedChanged); 145 | // 146 | // 女radioButton 147 | // 148 | this.女radioButton.AutoSize = true; 149 | this.女radioButton.Location = new System.Drawing.Point(294, 104); 150 | this.女radioButton.Name = "女radioButton"; 151 | this.女radioButton.Size = new System.Drawing.Size(35, 16); 152 | this.女radioButton.TabIndex = 12; 153 | this.女radioButton.TabStop = true; 154 | this.女radioButton.Text = "女"; 155 | this.女radioButton.UseVisualStyleBackColor = true; 156 | // 157 | // label6 158 | // 159 | this.label6.AutoSize = true; 160 | this.label6.Location = new System.Drawing.Point(100, 206); 161 | this.label6.Name = "label6"; 162 | this.label6.Size = new System.Drawing.Size(29, 12); 163 | this.label6.TabIndex = 13; 164 | this.label6.Text = "状态"; 165 | // 166 | // label7 167 | // 168 | this.label7.AutoSize = true; 169 | this.label7.Location = new System.Drawing.Point(210, 206); 170 | this.label7.Name = "label7"; 171 | this.label7.Size = new System.Drawing.Size(41, 12); 172 | this.label7.TabIndex = 14; 173 | this.label7.Text = "label7"; 174 | // 175 | // 注册用户panel 176 | // 177 | this.注册用户panel.Controls.Add(this.注销用户panel); 178 | this.注册用户panel.Controls.Add(this.label3); 179 | this.注册用户panel.Controls.Add(this.label8); 180 | this.注册用户panel.Controls.Add(this.label9); 181 | this.注册用户panel.Controls.Add(this.label10); 182 | this.注册用户panel.Controls.Add(this.label11); 183 | this.注册用户panel.Controls.Add(this.uIdTb); 184 | this.注册用户panel.Controls.Add(this.uPwdTb); 185 | this.注册用户panel.Controls.Add(this.uNameTb); 186 | this.注册用户panel.Controls.Add(this.uPhoNumTb); 187 | this.注册用户panel.Controls.Add(this.注册rBtn男); 188 | this.注册用户panel.Controls.Add(this.注册rBtn女); 189 | this.注册用户panel.Controls.Add(this.注册完成button); 190 | this.注册用户panel.Location = new System.Drawing.Point(30, 12); 191 | this.注册用户panel.Name = "注册用户panel"; 192 | this.注册用户panel.Size = new System.Drawing.Size(376, 301); 193 | this.注册用户panel.TabIndex = 15; 194 | // 195 | // 注销用户panel 196 | // 197 | this.注销用户panel.BackColor = System.Drawing.SystemColors.Control; 198 | this.注销用户panel.Controls.Add(this.deletTB); 199 | this.注销用户panel.Controls.Add(this.label12); 200 | this.注销用户panel.Controls.Add(this.注销Btn); 201 | this.注销用户panel.Location = new System.Drawing.Point(17, 9); 202 | this.注销用户panel.Name = "注销用户panel"; 203 | this.注销用户panel.Size = new System.Drawing.Size(343, 271); 204 | this.注销用户panel.TabIndex = 27; 205 | // 206 | // deletTB 207 | // 208 | this.deletTB.Location = new System.Drawing.Point(181, 96); 209 | this.deletTB.Name = "deletTB"; 210 | this.deletTB.Size = new System.Drawing.Size(127, 21); 211 | this.deletTB.TabIndex = 2; 212 | // 213 | // label12 214 | // 215 | this.label12.AutoSize = true; 216 | this.label12.Location = new System.Drawing.Point(50, 99); 217 | this.label12.Name = "label12"; 218 | this.label12.Size = new System.Drawing.Size(125, 12); 219 | this.label12.TabIndex = 1; 220 | this.label12.Text = "请输入要注销的账号:"; 221 | // 222 | // 注销Btn 223 | // 224 | this.注销Btn.Location = new System.Drawing.Point(138, 180); 225 | this.注销Btn.Name = "注销Btn"; 226 | this.注销Btn.Size = new System.Drawing.Size(75, 23); 227 | this.注销Btn.TabIndex = 0; 228 | this.注销Btn.Text = "注销"; 229 | this.注销Btn.UseVisualStyleBackColor = true; 230 | this.注销Btn.Click += new System.EventHandler(this.注销Btn_Click); 231 | // 232 | // label3 233 | // 234 | this.label3.AutoSize = true; 235 | this.label3.Location = new System.Drawing.Point(67, 33); 236 | this.label3.Name = "label3"; 237 | this.label3.Size = new System.Drawing.Size(41, 12); 238 | this.label3.TabIndex = 16; 239 | this.label3.Text = "账号:"; 240 | // 241 | // label8 242 | // 243 | this.label8.AutoSize = true; 244 | this.label8.Location = new System.Drawing.Point(67, 72); 245 | this.label8.Name = "label8"; 246 | this.label8.Size = new System.Drawing.Size(41, 12); 247 | this.label8.TabIndex = 17; 248 | this.label8.Text = "密码:"; 249 | // 250 | // label9 251 | // 252 | this.label9.AutoSize = true; 253 | this.label9.Location = new System.Drawing.Point(67, 116); 254 | this.label9.Name = "label9"; 255 | this.label9.Size = new System.Drawing.Size(41, 12); 256 | this.label9.TabIndex = 18; 257 | this.label9.Text = "姓名:"; 258 | // 259 | // label10 260 | // 261 | this.label10.AutoSize = true; 262 | this.label10.Location = new System.Drawing.Point(67, 154); 263 | this.label10.Name = "label10"; 264 | this.label10.Size = new System.Drawing.Size(29, 12); 265 | this.label10.TabIndex = 19; 266 | this.label10.Text = "性别"; 267 | // 268 | // label11 269 | // 270 | this.label11.AutoSize = true; 271 | this.label11.Location = new System.Drawing.Point(67, 194); 272 | this.label11.Name = "label11"; 273 | this.label11.Size = new System.Drawing.Size(53, 12); 274 | this.label11.TabIndex = 20; 275 | this.label11.Text = "电话号码"; 276 | // 277 | // uIdTb 278 | // 279 | this.uIdTb.Location = new System.Drawing.Point(169, 30); 280 | this.uIdTb.Name = "uIdTb"; 281 | this.uIdTb.Size = new System.Drawing.Size(143, 21); 282 | this.uIdTb.TabIndex = 21; 283 | // 284 | // uPwdTb 285 | // 286 | this.uPwdTb.Location = new System.Drawing.Point(169, 69); 287 | this.uPwdTb.Name = "uPwdTb"; 288 | this.uPwdTb.PasswordChar = '*'; 289 | this.uPwdTb.Size = new System.Drawing.Size(143, 21); 290 | this.uPwdTb.TabIndex = 22; 291 | // 292 | // uNameTb 293 | // 294 | this.uNameTb.Location = new System.Drawing.Point(169, 113); 295 | this.uNameTb.Name = "uNameTb"; 296 | this.uNameTb.Size = new System.Drawing.Size(143, 21); 297 | this.uNameTb.TabIndex = 23; 298 | // 299 | // uPhoNumTb 300 | // 301 | this.uPhoNumTb.Location = new System.Drawing.Point(169, 191); 302 | this.uPhoNumTb.Name = "uPhoNumTb"; 303 | this.uPhoNumTb.Size = new System.Drawing.Size(143, 21); 304 | this.uPhoNumTb.TabIndex = 24; 305 | // 306 | // 注册rBtn男 307 | // 308 | this.注册rBtn男.AutoSize = true; 309 | this.注册rBtn男.Checked = true; 310 | this.注册rBtn男.Location = new System.Drawing.Point(182, 152); 311 | this.注册rBtn男.Name = "注册rBtn男"; 312 | this.注册rBtn男.Size = new System.Drawing.Size(35, 16); 313 | this.注册rBtn男.TabIndex = 25; 314 | this.注册rBtn男.TabStop = true; 315 | this.注册rBtn男.Text = "男"; 316 | this.注册rBtn男.UseVisualStyleBackColor = true; 317 | // 318 | // 注册rBtn女 319 | // 320 | this.注册rBtn女.AutoSize = true; 321 | this.注册rBtn女.Location = new System.Drawing.Point(230, 150); 322 | this.注册rBtn女.Name = "注册rBtn女"; 323 | this.注册rBtn女.Size = new System.Drawing.Size(35, 16); 324 | this.注册rBtn女.TabIndex = 26; 325 | this.注册rBtn女.Text = "女"; 326 | this.注册rBtn女.UseVisualStyleBackColor = true; 327 | // 328 | // 注册完成button 329 | // 330 | this.注册完成button.Location = new System.Drawing.Point(152, 242); 331 | this.注册完成button.Name = "注册完成button"; 332 | this.注册完成button.Size = new System.Drawing.Size(75, 23); 333 | this.注册完成button.TabIndex = 0; 334 | this.注册完成button.Text = "完成"; 335 | this.注册完成button.UseVisualStyleBackColor = true; 336 | this.注册完成button.Click += new System.EventHandler(this.注册完成button_Click); 337 | // 338 | // UpdateIndivForm 339 | // 340 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 341 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 342 | this.ClientSize = new System.Drawing.Size(444, 325); 343 | this.Controls.Add(this.注册用户panel); 344 | this.Controls.Add(this.label7); 345 | this.Controls.Add(this.label6); 346 | this.Controls.Add(this.女radioButton); 347 | this.Controls.Add(this.男radioButton); 348 | this.Controls.Add(this.提交button); 349 | this.Controls.Add(this.电话号码textBox); 350 | this.Controls.Add(this.姓名textBox); 351 | this.Controls.Add(this.账号textBox); 352 | this.Controls.Add(this.label5); 353 | this.Controls.Add(this.label4); 354 | this.Controls.Add(this.label2); 355 | this.Controls.Add(this.label1); 356 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 357 | this.Name = "UpdateIndivForm"; 358 | this.Text = "个人信息"; 359 | this.Load += new System.EventHandler(this.UpdateIndivForm_Load); 360 | this.注册用户panel.ResumeLayout(false); 361 | this.注册用户panel.PerformLayout(); 362 | this.注销用户panel.ResumeLayout(false); 363 | this.注销用户panel.PerformLayout(); 364 | this.ResumeLayout(false); 365 | this.PerformLayout(); 366 | 367 | } 368 | 369 | #endregion 370 | 371 | private System.Windows.Forms.Label label1; 372 | private System.Windows.Forms.Label label2; 373 | private System.Windows.Forms.Label label4; 374 | private System.Windows.Forms.Label label5; 375 | private System.Windows.Forms.TextBox 账号textBox; 376 | private System.Windows.Forms.TextBox 姓名textBox; 377 | private System.Windows.Forms.TextBox 电话号码textBox; 378 | private System.Windows.Forms.Button 提交button; 379 | private System.Windows.Forms.RadioButton 男radioButton; 380 | private System.Windows.Forms.RadioButton 女radioButton; 381 | private System.Windows.Forms.Label label6; 382 | private System.Windows.Forms.Label label7; 383 | private System.Windows.Forms.Panel 注册用户panel; 384 | private System.Windows.Forms.Button 注册完成button; 385 | private System.Windows.Forms.Label label3; 386 | private System.Windows.Forms.Label label8; 387 | private System.Windows.Forms.Label label9; 388 | private System.Windows.Forms.Label label10; 389 | private System.Windows.Forms.Label label11; 390 | private System.Windows.Forms.TextBox uIdTb; 391 | private System.Windows.Forms.TextBox uPwdTb; 392 | private System.Windows.Forms.TextBox uNameTb; 393 | private System.Windows.Forms.TextBox uPhoNumTb; 394 | private System.Windows.Forms.RadioButton 注册rBtn男; 395 | private System.Windows.Forms.RadioButton 注册rBtn女; 396 | private System.Windows.Forms.Panel 注销用户panel; 397 | private System.Windows.Forms.TextBox deletTB; 398 | private System.Windows.Forms.Label label12; 399 | private System.Windows.Forms.Button 注销Btn; 400 | } 401 | } -------------------------------------------------------------------------------- /图书管理系统/ReturnBooks.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 图书管理系统 2 | { 3 | partial class ReturnBooks 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.uIdTB = new System.Windows.Forms.TextBox(); 32 | this.Btn1 = new System.Windows.Forms.Button(); 33 | this.shapeContainer1 = new Microsoft.VisualBasic.PowerPacks.ShapeContainer(); 34 | this.lineShape1 = new Microsoft.VisualBasic.PowerPacks.LineShape(); 35 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 36 | this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); 37 | this.uId = new System.Windows.Forms.DataGridViewTextBoxColumn(); 38 | this.bNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); 39 | this.bName = new System.Windows.Forms.DataGridViewTextBoxColumn(); 40 | this.bPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); 41 | this.borrowDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); 42 | this.returnDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); 43 | this.Tag = new System.Windows.Forms.DataGridViewTextBoxColumn(); 44 | this.label1 = new System.Windows.Forms.Label(); 45 | this.label2 = new System.Windows.Forms.Label(); 46 | this.label3 = new System.Windows.Forms.Label(); 47 | this.label4 = new System.Windows.Forms.Label(); 48 | this.IDDTB = new System.Windows.Forms.TextBox(); 49 | this.bNameTB = new System.Windows.Forms.TextBox(); 50 | this.label5 = new System.Windows.Forms.Label(); 51 | this.bNumTB = new System.Windows.Forms.TextBox(); 52 | this.label6 = new System.Windows.Forms.Label(); 53 | this.uuIdTB = new System.Windows.Forms.TextBox(); 54 | this.label7 = new System.Windows.Forms.Label(); 55 | this.borrowDateTB = new System.Windows.Forms.TextBox(); 56 | this.label8 = new System.Windows.Forms.Label(); 57 | this.returnDateTB = new System.Windows.Forms.TextBox(); 58 | this.label9 = new System.Windows.Forms.Label(); 59 | this.button1 = new System.Windows.Forms.Button(); 60 | this.bPriceTB = new System.Windows.Forms.TextBox(); 61 | this.label10 = new System.Windows.Forms.Label(); 62 | this.label11 = new System.Windows.Forms.Label(); 63 | this.TagTB = new System.Windows.Forms.TextBox(); 64 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 65 | this.SuspendLayout(); 66 | // 67 | // uIdTB 68 | // 69 | this.uIdTB.Location = new System.Drawing.Point(283, 23); 70 | this.uIdTB.Name = "uIdTB"; 71 | this.uIdTB.Size = new System.Drawing.Size(173, 21); 72 | this.uIdTB.TabIndex = 0; 73 | // 74 | // Btn1 75 | // 76 | this.Btn1.Location = new System.Drawing.Point(480, 21); 77 | this.Btn1.Name = "Btn1"; 78 | this.Btn1.Size = new System.Drawing.Size(161, 23); 79 | this.Btn1.TabIndex = 1; 80 | this.Btn1.Text = "提交"; 81 | this.Btn1.UseVisualStyleBackColor = true; 82 | this.Btn1.Click += new System.EventHandler(this.Btn1_Click); 83 | // 84 | // shapeContainer1 85 | // 86 | this.shapeContainer1.Location = new System.Drawing.Point(0, 0); 87 | this.shapeContainer1.Margin = new System.Windows.Forms.Padding(0); 88 | this.shapeContainer1.Name = "shapeContainer1"; 89 | this.shapeContainer1.Shapes.AddRange(new Microsoft.VisualBasic.PowerPacks.Shape[] { 90 | this.lineShape1}); 91 | this.shapeContainer1.Size = new System.Drawing.Size(842, 452); 92 | this.shapeContainer1.TabIndex = 2; 93 | this.shapeContainer1.TabStop = false; 94 | // 95 | // lineShape1 96 | // 97 | this.lineShape1.Name = "lineShape1"; 98 | this.lineShape1.X1 = -2; 99 | this.lineShape1.X2 = 842; 100 | this.lineShape1.Y1 = 57; 101 | this.lineShape1.Y2 = 57; 102 | // 103 | // dataGridView1 104 | // 105 | this.dataGridView1.AllowUserToAddRows = false; 106 | this.dataGridView1.AllowUserToDeleteRows = false; 107 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 108 | this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 109 | this.ID, 110 | this.uId, 111 | this.bNum, 112 | this.bName, 113 | this.bPrice, 114 | this.borrowDate, 115 | this.returnDate, 116 | this.Tag}); 117 | this.dataGridView1.Location = new System.Drawing.Point(-2, 200); 118 | this.dataGridView1.MultiSelect = false; 119 | this.dataGridView1.Name = "dataGridView1"; 120 | this.dataGridView1.ReadOnly = true; 121 | this.dataGridView1.RowTemplate.Height = 23; 122 | this.dataGridView1.Size = new System.Drawing.Size(844, 252); 123 | this.dataGridView1.TabIndex = 3; 124 | this.dataGridView1.CellMouseUp += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseUp); 125 | // 126 | // ID 127 | // 128 | this.ID.DataPropertyName = "ID"; 129 | this.ID.HeaderText = "借书单号"; 130 | this.ID.Name = "ID"; 131 | this.ID.ReadOnly = true; 132 | // 133 | // uId 134 | // 135 | this.uId.DataPropertyName = "uId"; 136 | this.uId.HeaderText = "用户账号"; 137 | this.uId.Name = "uId"; 138 | this.uId.ReadOnly = true; 139 | // 140 | // bNum 141 | // 142 | this.bNum.DataPropertyName = "bNum"; 143 | this.bNum.HeaderText = "书籍序列号"; 144 | this.bNum.Name = "bNum"; 145 | this.bNum.ReadOnly = true; 146 | // 147 | // bName 148 | // 149 | this.bName.DataPropertyName = "bName"; 150 | this.bName.HeaderText = "书名"; 151 | this.bName.Name = "bName"; 152 | this.bName.ReadOnly = true; 153 | // 154 | // bPrice 155 | // 156 | this.bPrice.DataPropertyName = "bPrice"; 157 | this.bPrice.HeaderText = "价格"; 158 | this.bPrice.Name = "bPrice"; 159 | this.bPrice.ReadOnly = true; 160 | // 161 | // borrowDate 162 | // 163 | this.borrowDate.DataPropertyName = "borrowDate"; 164 | this.borrowDate.HeaderText = "借出日期"; 165 | this.borrowDate.Name = "borrowDate"; 166 | this.borrowDate.ReadOnly = true; 167 | // 168 | // returnDate 169 | // 170 | this.returnDate.DataPropertyName = "returnDate"; 171 | this.returnDate.HeaderText = "归还日期"; 172 | this.returnDate.Name = "returnDate"; 173 | this.returnDate.ReadOnly = true; 174 | // 175 | // Tag 176 | // 177 | this.Tag.DataPropertyName = "Tag"; 178 | this.Tag.HeaderText = "是否逾期"; 179 | this.Tag.Name = "Tag"; 180 | this.Tag.ReadOnly = true; 181 | // 182 | // label1 183 | // 184 | this.label1.AutoSize = true; 185 | this.label1.ForeColor = System.Drawing.Color.Red; 186 | this.label1.Location = new System.Drawing.Point(3, 9); 187 | this.label1.Name = "label1"; 188 | this.label1.Size = new System.Drawing.Size(59, 12); 189 | this.label1.TabIndex = 4; 190 | this.label1.Text = "第一步 =>"; 191 | // 192 | // label2 193 | // 194 | this.label2.AutoSize = true; 195 | this.label2.ForeColor = System.Drawing.Color.Red; 196 | this.label2.Location = new System.Drawing.Point(3, 68); 197 | this.label2.Name = "label2"; 198 | this.label2.Size = new System.Drawing.Size(59, 12); 199 | this.label2.TabIndex = 5; 200 | this.label2.Text = "第二步 =>"; 201 | // 202 | // label3 203 | // 204 | this.label3.AutoSize = true; 205 | this.label3.Location = new System.Drawing.Point(146, 26); 206 | this.label3.Name = "label3"; 207 | this.label3.Size = new System.Drawing.Size(131, 12); 208 | this.label3.TabIndex = 6; 209 | this.label3.Text = "输入账号,查询借书单:"; 210 | // 211 | // label4 212 | // 213 | this.label4.AutoSize = true; 214 | this.label4.Location = new System.Drawing.Point(108, 88); 215 | this.label4.Name = "label4"; 216 | this.label4.Size = new System.Drawing.Size(65, 12); 217 | this.label4.TabIndex = 7; 218 | this.label4.Text = "借书单号:"; 219 | // 220 | // IDDTB 221 | // 222 | this.IDDTB.Location = new System.Drawing.Point(177, 85); 223 | this.IDDTB.Name = "IDDTB"; 224 | this.IDDTB.Size = new System.Drawing.Size(116, 21); 225 | this.IDDTB.TabIndex = 8; 226 | // 227 | // bNameTB 228 | // 229 | this.bNameTB.Location = new System.Drawing.Point(393, 85); 230 | this.bNameTB.Name = "bNameTB"; 231 | this.bNameTB.Size = new System.Drawing.Size(120, 21); 232 | this.bNameTB.TabIndex = 10; 233 | // 234 | // label5 235 | // 236 | this.label5.AutoSize = true; 237 | this.label5.Location = new System.Drawing.Point(312, 125); 238 | this.label5.Name = "label5"; 239 | this.label5.Size = new System.Drawing.Size(77, 12); 240 | this.label5.TabIndex = 9; 241 | this.label5.Text = "书籍序列号:"; 242 | // 243 | // bNumTB 244 | // 245 | this.bNumTB.Location = new System.Drawing.Point(393, 122); 246 | this.bNumTB.Name = "bNumTB"; 247 | this.bNumTB.Size = new System.Drawing.Size(120, 21); 248 | this.bNumTB.TabIndex = 12; 249 | // 250 | // label6 251 | // 252 | this.label6.AutoSize = true; 253 | this.label6.Location = new System.Drawing.Point(334, 85); 254 | this.label6.Name = "label6"; 255 | this.label6.Size = new System.Drawing.Size(41, 12); 256 | this.label6.TabIndex = 11; 257 | this.label6.Text = "书名:"; 258 | // 259 | // uuIdTB 260 | // 261 | this.uuIdTB.Location = new System.Drawing.Point(178, 122); 262 | this.uuIdTB.Name = "uuIdTB"; 263 | this.uuIdTB.Size = new System.Drawing.Size(115, 21); 264 | this.uuIdTB.TabIndex = 14; 265 | // 266 | // label7 267 | // 268 | this.label7.AutoSize = true; 269 | this.label7.Location = new System.Drawing.Point(107, 125); 270 | this.label7.Name = "label7"; 271 | this.label7.Size = new System.Drawing.Size(65, 12); 272 | this.label7.TabIndex = 13; 273 | this.label7.Text = "用户账号:"; 274 | // 275 | // borrowDateTB 276 | // 277 | this.borrowDateTB.Location = new System.Drawing.Point(614, 82); 278 | this.borrowDateTB.Name = "borrowDateTB"; 279 | this.borrowDateTB.Size = new System.Drawing.Size(124, 21); 280 | this.borrowDateTB.TabIndex = 18; 281 | // 282 | // label8 283 | // 284 | this.label8.AutoSize = true; 285 | this.label8.Location = new System.Drawing.Point(543, 85); 286 | this.label8.Name = "label8"; 287 | this.label8.Size = new System.Drawing.Size(65, 12); 288 | this.label8.TabIndex = 17; 289 | this.label8.Text = "借出日期:"; 290 | // 291 | // returnDateTB 292 | // 293 | this.returnDateTB.Location = new System.Drawing.Point(614, 119); 294 | this.returnDateTB.Name = "returnDateTB"; 295 | this.returnDateTB.Size = new System.Drawing.Size(124, 21); 296 | this.returnDateTB.TabIndex = 16; 297 | // 298 | // label9 299 | // 300 | this.label9.AutoSize = true; 301 | this.label9.Location = new System.Drawing.Point(543, 122); 302 | this.label9.Name = "label9"; 303 | this.label9.Size = new System.Drawing.Size(65, 12); 304 | this.label9.TabIndex = 15; 305 | this.label9.Text = "归还日期:"; 306 | // 307 | // button1 308 | // 309 | this.button1.Location = new System.Drawing.Point(545, 154); 310 | this.button1.Name = "button1"; 311 | this.button1.Size = new System.Drawing.Size(193, 22); 312 | this.button1.TabIndex = 19; 313 | this.button1.Text = "点击单元格,提交还书"; 314 | this.button1.UseVisualStyleBackColor = true; 315 | this.button1.Click += new System.EventHandler(this.button1_Click); 316 | // 317 | // bPriceTB 318 | // 319 | this.bPriceTB.Location = new System.Drawing.Point(393, 159); 320 | this.bPriceTB.Name = "bPriceTB"; 321 | this.bPriceTB.Size = new System.Drawing.Size(120, 21); 322 | this.bPriceTB.TabIndex = 21; 323 | // 324 | // label10 325 | // 326 | this.label10.AutoSize = true; 327 | this.label10.Location = new System.Drawing.Point(324, 162); 328 | this.label10.Name = "label10"; 329 | this.label10.Size = new System.Drawing.Size(65, 12); 330 | this.label10.TabIndex = 20; 331 | this.label10.Text = "书籍价格:"; 332 | // 333 | // label11 334 | // 335 | this.label11.AutoSize = true; 336 | this.label11.Location = new System.Drawing.Point(107, 162); 337 | this.label11.Name = "label11"; 338 | this.label11.Size = new System.Drawing.Size(65, 12); 339 | this.label11.TabIndex = 22; 340 | this.label11.Text = "是否逾期:"; 341 | // 342 | // TagTB 343 | // 344 | this.TagTB.Location = new System.Drawing.Point(178, 159); 345 | this.TagTB.Name = "TagTB"; 346 | this.TagTB.Size = new System.Drawing.Size(115, 21); 347 | this.TagTB.TabIndex = 23; 348 | // 349 | // ReturnBooks 350 | // 351 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 352 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 353 | this.ClientSize = new System.Drawing.Size(842, 452); 354 | this.Controls.Add(this.TagTB); 355 | this.Controls.Add(this.label11); 356 | this.Controls.Add(this.bPriceTB); 357 | this.Controls.Add(this.label10); 358 | this.Controls.Add(this.button1); 359 | this.Controls.Add(this.borrowDateTB); 360 | this.Controls.Add(this.label8); 361 | this.Controls.Add(this.returnDateTB); 362 | this.Controls.Add(this.label9); 363 | this.Controls.Add(this.uuIdTB); 364 | this.Controls.Add(this.label7); 365 | this.Controls.Add(this.bNumTB); 366 | this.Controls.Add(this.label6); 367 | this.Controls.Add(this.bNameTB); 368 | this.Controls.Add(this.label5); 369 | this.Controls.Add(this.IDDTB); 370 | this.Controls.Add(this.label4); 371 | this.Controls.Add(this.label3); 372 | this.Controls.Add(this.label2); 373 | this.Controls.Add(this.label1); 374 | this.Controls.Add(this.dataGridView1); 375 | this.Controls.Add(this.Btn1); 376 | this.Controls.Add(this.uIdTB); 377 | this.Controls.Add(this.shapeContainer1); 378 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 379 | this.Name = "ReturnBooks"; 380 | this.Text = "还书办理"; 381 | this.Load += new System.EventHandler(this.ReturnBooks_Load); 382 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 383 | this.ResumeLayout(false); 384 | this.PerformLayout(); 385 | 386 | } 387 | 388 | #endregion 389 | 390 | private System.Windows.Forms.TextBox uIdTB; 391 | private System.Windows.Forms.Button Btn1; 392 | private Microsoft.VisualBasic.PowerPacks.ShapeContainer shapeContainer1; 393 | private Microsoft.VisualBasic.PowerPacks.LineShape lineShape1; 394 | private System.Windows.Forms.DataGridView dataGridView1; 395 | private System.Windows.Forms.DataGridViewTextBoxColumn ID; 396 | private System.Windows.Forms.DataGridViewTextBoxColumn uId; 397 | private System.Windows.Forms.DataGridViewTextBoxColumn bNum; 398 | private System.Windows.Forms.DataGridViewTextBoxColumn bName; 399 | private System.Windows.Forms.DataGridViewTextBoxColumn bPrice; 400 | private System.Windows.Forms.DataGridViewTextBoxColumn borrowDate; 401 | private System.Windows.Forms.DataGridViewTextBoxColumn returnDate; 402 | private System.Windows.Forms.DataGridViewTextBoxColumn Tag; 403 | private System.Windows.Forms.Label label1; 404 | private System.Windows.Forms.Label label2; 405 | private System.Windows.Forms.Label label3; 406 | private System.Windows.Forms.Label label4; 407 | private System.Windows.Forms.TextBox IDDTB; 408 | private System.Windows.Forms.TextBox bNameTB; 409 | private System.Windows.Forms.Label label5; 410 | private System.Windows.Forms.TextBox bNumTB; 411 | private System.Windows.Forms.Label label6; 412 | private System.Windows.Forms.TextBox uuIdTB; 413 | private System.Windows.Forms.Label label7; 414 | private System.Windows.Forms.TextBox borrowDateTB; 415 | private System.Windows.Forms.Label label8; 416 | private System.Windows.Forms.TextBox returnDateTB; 417 | private System.Windows.Forms.Label label9; 418 | private System.Windows.Forms.Button button1; 419 | private System.Windows.Forms.TextBox bPriceTB; 420 | private System.Windows.Forms.Label label10; 421 | private System.Windows.Forms.Label label11; 422 | private System.Windows.Forms.TextBox TagTB; 423 | } 424 | } -------------------------------------------------------------------------------- /图书管理系统/FindBookForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 图书管理系统 2 | { 3 | partial class FindBookForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FindBookForm)); 33 | this.menuStrip1 = new System.Windows.Forms.MenuStrip(); 34 | this.书籍ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 35 | this.新书入库ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 36 | this.修改ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 37 | this.刷新ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 38 | this.注销书籍ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 39 | this.视图ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 40 | this.跳转到首页ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 41 | this.前一页ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 42 | this.后一页ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 43 | this.跳转到最后一页ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 44 | this.帮助HToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 45 | this.查看帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 46 | this.toolStrip1 = new System.Windows.Forms.ToolStrip(); 47 | this.书籍入库tSBtn = new System.Windows.Forms.ToolStripButton(); 48 | this.保存修改tSBtn = new System.Windows.Forms.ToolStripButton(); 49 | this.刷新书库tSBtn = new System.Windows.Forms.ToolStripButton(); 50 | this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); 51 | this.跳转至首页tSBtn = new System.Windows.Forms.ToolStripButton(); 52 | this.跳转至上一页tSBtn = new System.Windows.Forms.ToolStripButton(); 53 | this.跳转至下一页页tSBtn = new System.Windows.Forms.ToolStripButton(); 54 | this.跳转至最后一页tSBtn = new System.Windows.Forms.ToolStripButton(); 55 | this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); 56 | this.按书名查找tSBtn = new System.Windows.Forms.ToolStripButton(); 57 | this.书名tSTB = new System.Windows.Forms.ToolStripTextBox(); 58 | this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); 59 | this.查看帮助tSBtn = new System.Windows.Forms.ToolStripButton(); 60 | this.dgv_list = new System.Windows.Forms.DataGridView(); 61 | this.图书序列号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 62 | this.书名 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 63 | this.作者 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 64 | this.出版社 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 65 | this.出版日期 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 66 | this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn(); 67 | this.价格 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 68 | this.库存数量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 69 | this.menuStrip1.SuspendLayout(); 70 | this.toolStrip1.SuspendLayout(); 71 | ((System.ComponentModel.ISupportInitialize)(this.dgv_list)).BeginInit(); 72 | this.SuspendLayout(); 73 | // 74 | // menuStrip1 75 | // 76 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 77 | this.书籍ToolStripMenuItem, 78 | this.视图ToolStripMenuItem, 79 | this.帮助HToolStripMenuItem}); 80 | this.menuStrip1.Location = new System.Drawing.Point(0, 0); 81 | this.menuStrip1.Name = "menuStrip1"; 82 | this.menuStrip1.Size = new System.Drawing.Size(808, 25); 83 | this.menuStrip1.TabIndex = 0; 84 | this.menuStrip1.Text = "menuStrip1"; 85 | // 86 | // 书籍ToolStripMenuItem 87 | // 88 | this.书籍ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 89 | this.新书入库ToolStripMenuItem, 90 | this.修改ToolStripMenuItem, 91 | this.刷新ToolStripMenuItem, 92 | this.注销书籍ToolStripMenuItem}); 93 | this.书籍ToolStripMenuItem.Name = "书籍ToolStripMenuItem"; 94 | this.书籍ToolStripMenuItem.Size = new System.Drawing.Size(60, 21); 95 | this.书籍ToolStripMenuItem.Text = "书籍(B)"; 96 | // 97 | // 新书入库ToolStripMenuItem 98 | // 99 | this.新书入库ToolStripMenuItem.Name = "新书入库ToolStripMenuItem"; 100 | this.新书入库ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); 101 | this.新书入库ToolStripMenuItem.Text = "书籍入库"; 102 | this.新书入库ToolStripMenuItem.Click += new System.EventHandler(this.新书入库ToolStripMenuItem_Click); 103 | // 104 | // 修改ToolStripMenuItem 105 | // 106 | this.修改ToolStripMenuItem.Name = "修改ToolStripMenuItem"; 107 | this.修改ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); 108 | this.修改ToolStripMenuItem.Text = "保存修改"; 109 | this.修改ToolStripMenuItem.Click += new System.EventHandler(this.修改ToolStripMenuItem_Click); 110 | // 111 | // 刷新ToolStripMenuItem 112 | // 113 | this.刷新ToolStripMenuItem.Name = "刷新ToolStripMenuItem"; 114 | this.刷新ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); 115 | this.刷新ToolStripMenuItem.Text = "刷新"; 116 | this.刷新ToolStripMenuItem.Click += new System.EventHandler(this.刷新ToolStripMenuItem_Click); 117 | // 118 | // 注销书籍ToolStripMenuItem 119 | // 120 | this.注销书籍ToolStripMenuItem.Name = "注销书籍ToolStripMenuItem"; 121 | this.注销书籍ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); 122 | this.注销书籍ToolStripMenuItem.Text = "注销书籍"; 123 | this.注销书籍ToolStripMenuItem.Click += new System.EventHandler(this.注销书籍ToolStripMenuItem_Click); 124 | // 125 | // 视图ToolStripMenuItem 126 | // 127 | this.视图ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 128 | this.跳转到首页ToolStripMenuItem, 129 | this.前一页ToolStripMenuItem, 130 | this.后一页ToolStripMenuItem, 131 | this.跳转到最后一页ToolStripMenuItem}); 132 | this.视图ToolStripMenuItem.Name = "视图ToolStripMenuItem"; 133 | this.视图ToolStripMenuItem.Size = new System.Drawing.Size(60, 21); 134 | this.视图ToolStripMenuItem.Text = "视图(V)"; 135 | // 136 | // 跳转到首页ToolStripMenuItem 137 | // 138 | this.跳转到首页ToolStripMenuItem.Name = "跳转到首页ToolStripMenuItem"; 139 | this.跳转到首页ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); 140 | this.跳转到首页ToolStripMenuItem.Text = "跳转到首页"; 141 | // 142 | // 前一页ToolStripMenuItem 143 | // 144 | this.前一页ToolStripMenuItem.Name = "前一页ToolStripMenuItem"; 145 | this.前一页ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); 146 | this.前一页ToolStripMenuItem.Text = "前一页"; 147 | // 148 | // 后一页ToolStripMenuItem 149 | // 150 | this.后一页ToolStripMenuItem.Name = "后一页ToolStripMenuItem"; 151 | this.后一页ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); 152 | this.后一页ToolStripMenuItem.Text = "后一页"; 153 | // 154 | // 跳转到最后一页ToolStripMenuItem 155 | // 156 | this.跳转到最后一页ToolStripMenuItem.Name = "跳转到最后一页ToolStripMenuItem"; 157 | this.跳转到最后一页ToolStripMenuItem.Size = new System.Drawing.Size(160, 22); 158 | this.跳转到最后一页ToolStripMenuItem.Text = "跳转到最后一页"; 159 | // 160 | // 帮助HToolStripMenuItem 161 | // 162 | this.帮助HToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 163 | this.查看帮助ToolStripMenuItem}); 164 | this.帮助HToolStripMenuItem.Name = "帮助HToolStripMenuItem"; 165 | this.帮助HToolStripMenuItem.Size = new System.Drawing.Size(61, 21); 166 | this.帮助HToolStripMenuItem.Text = "帮助(H)"; 167 | // 168 | // 查看帮助ToolStripMenuItem 169 | // 170 | this.查看帮助ToolStripMenuItem.Name = "查看帮助ToolStripMenuItem"; 171 | this.查看帮助ToolStripMenuItem.Size = new System.Drawing.Size(124, 22); 172 | this.查看帮助ToolStripMenuItem.Text = "查看帮助"; 173 | this.查看帮助ToolStripMenuItem.Click += new System.EventHandler(this.查看帮助ToolStripMenuItem_Click); 174 | // 175 | // toolStrip1 176 | // 177 | this.toolStrip1.ImageScalingSize = new System.Drawing.Size(32, 32); 178 | this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 179 | this.书籍入库tSBtn, 180 | this.保存修改tSBtn, 181 | this.刷新书库tSBtn, 182 | this.toolStripSeparator1, 183 | this.跳转至首页tSBtn, 184 | this.跳转至上一页tSBtn, 185 | this.跳转至下一页页tSBtn, 186 | this.跳转至最后一页tSBtn, 187 | this.toolStripSeparator2, 188 | this.按书名查找tSBtn, 189 | this.书名tSTB, 190 | this.toolStripLabel1, 191 | this.查看帮助tSBtn}); 192 | this.toolStrip1.Location = new System.Drawing.Point(0, 25); 193 | this.toolStrip1.Name = "toolStrip1"; 194 | this.toolStrip1.Size = new System.Drawing.Size(808, 39); 195 | this.toolStrip1.TabIndex = 1; 196 | this.toolStrip1.Text = "toolStrip1"; 197 | // 198 | // 书籍入库tSBtn 199 | // 200 | this.书籍入库tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 201 | this.书籍入库tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("书籍入库tSBtn.Image"))); 202 | this.书籍入库tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 203 | this.书籍入库tSBtn.Name = "书籍入库tSBtn"; 204 | this.书籍入库tSBtn.Size = new System.Drawing.Size(36, 36); 205 | this.书籍入库tSBtn.Text = "书籍入库"; 206 | this.书籍入库tSBtn.Click += new System.EventHandler(this.书籍入库tSBtn_Click); 207 | // 208 | // 保存修改tSBtn 209 | // 210 | this.保存修改tSBtn.AutoSize = false; 211 | this.保存修改tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 212 | this.保存修改tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("保存修改tSBtn.Image"))); 213 | this.保存修改tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 214 | this.保存修改tSBtn.Name = "保存修改tSBtn"; 215 | this.保存修改tSBtn.Size = new System.Drawing.Size(33, 32); 216 | this.保存修改tSBtn.Text = "保存修改"; 217 | this.保存修改tSBtn.Click += new System.EventHandler(this.保存修改tSBtn_Click); 218 | // 219 | // 刷新书库tSBtn 220 | // 221 | this.刷新书库tSBtn.AutoSize = false; 222 | this.刷新书库tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 223 | this.刷新书库tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("刷新书库tSBtn.Image"))); 224 | this.刷新书库tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 225 | this.刷新书库tSBtn.Name = "刷新书库tSBtn"; 226 | this.刷新书库tSBtn.Size = new System.Drawing.Size(33, 32); 227 | this.刷新书库tSBtn.Text = "刷新书库"; 228 | this.刷新书库tSBtn.Click += new System.EventHandler(this.刷新书库tSBtn_Click); 229 | // 230 | // toolStripSeparator1 231 | // 232 | this.toolStripSeparator1.Name = "toolStripSeparator1"; 233 | this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39); 234 | // 235 | // 跳转至首页tSBtn 236 | // 237 | this.跳转至首页tSBtn.AutoSize = false; 238 | this.跳转至首页tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 239 | this.跳转至首页tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("跳转至首页tSBtn.Image"))); 240 | this.跳转至首页tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 241 | this.跳转至首页tSBtn.Name = "跳转至首页tSBtn"; 242 | this.跳转至首页tSBtn.Size = new System.Drawing.Size(33, 32); 243 | this.跳转至首页tSBtn.Text = "跳转至第一页"; 244 | this.跳转至首页tSBtn.Click += new System.EventHandler(this.跳转至首页tSBtn_Click); 245 | // 246 | // 跳转至上一页tSBtn 247 | // 248 | this.跳转至上一页tSBtn.AutoSize = false; 249 | this.跳转至上一页tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 250 | this.跳转至上一页tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("跳转至上一页tSBtn.Image"))); 251 | this.跳转至上一页tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 252 | this.跳转至上一页tSBtn.Name = "跳转至上一页tSBtn"; 253 | this.跳转至上一页tSBtn.Size = new System.Drawing.Size(33, 32); 254 | this.跳转至上一页tSBtn.Text = "跳转至上一页"; 255 | this.跳转至上一页tSBtn.Click += new System.EventHandler(this.跳转至上一页tSBtn_Click); 256 | // 257 | // 跳转至下一页页tSBtn 258 | // 259 | this.跳转至下一页页tSBtn.AutoSize = false; 260 | this.跳转至下一页页tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 261 | this.跳转至下一页页tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("跳转至下一页页tSBtn.Image"))); 262 | this.跳转至下一页页tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 263 | this.跳转至下一页页tSBtn.Name = "跳转至下一页页tSBtn"; 264 | this.跳转至下一页页tSBtn.Size = new System.Drawing.Size(33, 32); 265 | this.跳转至下一页页tSBtn.Text = "跳转至下一页"; 266 | this.跳转至下一页页tSBtn.Click += new System.EventHandler(this.跳转至下一页页tSBtn_Click); 267 | // 268 | // 跳转至最后一页tSBtn 269 | // 270 | this.跳转至最后一页tSBtn.AutoSize = false; 271 | this.跳转至最后一页tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 272 | this.跳转至最后一页tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("跳转至最后一页tSBtn.Image"))); 273 | this.跳转至最后一页tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 274 | this.跳转至最后一页tSBtn.Name = "跳转至最后一页tSBtn"; 275 | this.跳转至最后一页tSBtn.Size = new System.Drawing.Size(33, 32); 276 | this.跳转至最后一页tSBtn.Text = "跳至最后一页"; 277 | this.跳转至最后一页tSBtn.Click += new System.EventHandler(this.跳转至最后一页tSBtn_Click); 278 | // 279 | // toolStripSeparator2 280 | // 281 | this.toolStripSeparator2.Name = "toolStripSeparator2"; 282 | this.toolStripSeparator2.Size = new System.Drawing.Size(6, 39); 283 | // 284 | // 按书名查找tSBtn 285 | // 286 | this.按书名查找tSBtn.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; 287 | this.按书名查找tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 288 | this.按书名查找tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("按书名查找tSBtn.Image"))); 289 | this.按书名查找tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 290 | this.按书名查找tSBtn.Name = "按书名查找tSBtn"; 291 | this.按书名查找tSBtn.Size = new System.Drawing.Size(36, 36); 292 | this.按书名查找tSBtn.Text = "按书名查找"; 293 | this.按书名查找tSBtn.Click += new System.EventHandler(this.按书名查找tSBtn_Click); 294 | // 295 | // 书名tSTB 296 | // 297 | this.书名tSTB.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; 298 | this.书名tSTB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 299 | this.书名tSTB.Name = "书名tSTB"; 300 | this.书名tSTB.Size = new System.Drawing.Size(126, 39); 301 | // 302 | // toolStripLabel1 303 | // 304 | this.toolStripLabel1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; 305 | this.toolStripLabel1.Name = "toolStripLabel1"; 306 | this.toolStripLabel1.Size = new System.Drawing.Size(107, 36); 307 | this.toolStripLabel1.Text = "输入书名快速查找:"; 308 | // 309 | // 查看帮助tSBtn 310 | // 311 | this.查看帮助tSBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 312 | this.查看帮助tSBtn.Image = ((System.Drawing.Image)(resources.GetObject("查看帮助tSBtn.Image"))); 313 | this.查看帮助tSBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 314 | this.查看帮助tSBtn.Name = "查看帮助tSBtn"; 315 | this.查看帮助tSBtn.Size = new System.Drawing.Size(36, 36); 316 | this.查看帮助tSBtn.Text = "查看帮助"; 317 | this.查看帮助tSBtn.Click += new System.EventHandler(this.查看帮助tSBtn_Click); 318 | // 319 | // dgv_list 320 | // 321 | this.dgv_list.AllowUserToAddRows = false; 322 | this.dgv_list.AllowUserToResizeColumns = false; 323 | this.dgv_list.AllowUserToResizeRows = false; 324 | this.dgv_list.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 325 | this.dgv_list.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 326 | this.图书序列号, 327 | this.书名, 328 | this.作者, 329 | this.出版社, 330 | this.出版日期, 331 | this.ISBN, 332 | this.价格, 333 | this.库存数量}); 334 | this.dgv_list.Dock = System.Windows.Forms.DockStyle.Fill; 335 | this.dgv_list.Location = new System.Drawing.Point(0, 64); 336 | this.dgv_list.Name = "dgv_list"; 337 | this.dgv_list.RowTemplate.Height = 23; 338 | this.dgv_list.Size = new System.Drawing.Size(808, 347); 339 | this.dgv_list.TabIndex = 2; 340 | // 341 | // 图书序列号 342 | // 343 | this.图书序列号.DataPropertyName = "bNum"; 344 | this.图书序列号.HeaderText = "图书序列号"; 345 | this.图书序列号.Name = "图书序列号"; 346 | this.图书序列号.ReadOnly = true; 347 | this.图书序列号.Resizable = System.Windows.Forms.DataGridViewTriState.False; 348 | this.图书序列号.Width = 90; 349 | // 350 | // 书名 351 | // 352 | this.书名.DataPropertyName = "bName"; 353 | this.书名.HeaderText = "书名"; 354 | this.书名.Name = "书名"; 355 | this.书名.Resizable = System.Windows.Forms.DataGridViewTriState.False; 356 | this.书名.Width = 140; 357 | // 358 | // 作者 359 | // 360 | this.作者.DataPropertyName = "bAuthor"; 361 | this.作者.HeaderText = "作者"; 362 | this.作者.Name = "作者"; 363 | this.作者.Resizable = System.Windows.Forms.DataGridViewTriState.False; 364 | // 365 | // 出版社 366 | // 367 | this.出版社.DataPropertyName = "bPubCom"; 368 | this.出版社.HeaderText = "出版社"; 369 | this.出版社.Name = "出版社"; 370 | this.出版社.Resizable = System.Windows.Forms.DataGridViewTriState.False; 371 | // 372 | // 出版日期 373 | // 374 | this.出版日期.DataPropertyName = "bPubDat"; 375 | this.出版日期.HeaderText = "出版日期"; 376 | this.出版日期.Name = "出版日期"; 377 | this.出版日期.Resizable = System.Windows.Forms.DataGridViewTriState.False; 378 | this.出版日期.Width = 80; 379 | // 380 | // ISBN 381 | // 382 | this.ISBN.DataPropertyName = "ISBN"; 383 | this.ISBN.HeaderText = "ISBN"; 384 | this.ISBN.Name = "ISBN"; 385 | this.ISBN.Resizable = System.Windows.Forms.DataGridViewTriState.False; 386 | this.ISBN.Width = 120; 387 | // 388 | // 价格 389 | // 390 | this.价格.DataPropertyName = "bPrice"; 391 | this.价格.HeaderText = "价格"; 392 | this.价格.Name = "价格"; 393 | this.价格.Resizable = System.Windows.Forms.DataGridViewTriState.False; 394 | this.价格.Width = 55; 395 | // 396 | // 库存数量 397 | // 398 | this.库存数量.DataPropertyName = "bTag"; 399 | this.库存数量.HeaderText = "库存数量"; 400 | this.库存数量.Name = "库存数量"; 401 | this.库存数量.Resizable = System.Windows.Forms.DataGridViewTriState.False; 402 | this.库存数量.Width = 80; 403 | // 404 | // FindBookForm 405 | // 406 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 407 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 408 | this.ClientSize = new System.Drawing.Size(808, 411); 409 | this.Controls.Add(this.dgv_list); 410 | this.Controls.Add(this.toolStrip1); 411 | this.Controls.Add(this.menuStrip1); 412 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 413 | this.MainMenuStrip = this.menuStrip1; 414 | this.Name = "FindBookForm"; 415 | this.Text = "书籍查询"; 416 | this.Load += new System.EventHandler(this.FindBookForm_Load); 417 | this.menuStrip1.ResumeLayout(false); 418 | this.menuStrip1.PerformLayout(); 419 | this.toolStrip1.ResumeLayout(false); 420 | this.toolStrip1.PerformLayout(); 421 | ((System.ComponentModel.ISupportInitialize)(this.dgv_list)).EndInit(); 422 | this.ResumeLayout(false); 423 | this.PerformLayout(); 424 | 425 | } 426 | 427 | #endregion 428 | 429 | private System.Windows.Forms.MenuStrip menuStrip1; 430 | private System.Windows.Forms.ToolStrip toolStrip1; 431 | private System.Windows.Forms.ToolStripMenuItem 书籍ToolStripMenuItem; 432 | private System.Windows.Forms.ToolStripMenuItem 新书入库ToolStripMenuItem; 433 | private System.Windows.Forms.ToolStripMenuItem 修改ToolStripMenuItem; 434 | private System.Windows.Forms.ToolStripMenuItem 刷新ToolStripMenuItem; 435 | private System.Windows.Forms.ToolStripMenuItem 注销书籍ToolStripMenuItem; 436 | private System.Windows.Forms.ToolStripMenuItem 视图ToolStripMenuItem; 437 | private System.Windows.Forms.ToolStripMenuItem 跳转到首页ToolStripMenuItem; 438 | private System.Windows.Forms.ToolStripMenuItem 前一页ToolStripMenuItem; 439 | private System.Windows.Forms.ToolStripMenuItem 后一页ToolStripMenuItem; 440 | private System.Windows.Forms.ToolStripMenuItem 跳转到最后一页ToolStripMenuItem; 441 | private System.Windows.Forms.ToolStripMenuItem 帮助HToolStripMenuItem; 442 | private System.Windows.Forms.ToolStripMenuItem 查看帮助ToolStripMenuItem; 443 | private System.Windows.Forms.ToolStripButton 保存修改tSBtn; 444 | private System.Windows.Forms.ToolStripButton 跳转至首页tSBtn; 445 | private System.Windows.Forms.ToolStripButton 跳转至最后一页tSBtn; 446 | private System.Windows.Forms.ToolStripButton 跳转至上一页tSBtn; 447 | private System.Windows.Forms.ToolStripButton 跳转至下一页页tSBtn; 448 | private System.Windows.Forms.ToolStripButton 刷新书库tSBtn; 449 | private System.Windows.Forms.ToolStripButton 书籍入库tSBtn; 450 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; 451 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; 452 | private System.Windows.Forms.ToolStripButton 按书名查找tSBtn; 453 | private System.Windows.Forms.ToolStripTextBox 书名tSTB; 454 | private System.Windows.Forms.ToolStripLabel toolStripLabel1; 455 | private System.Windows.Forms.DataGridView dgv_list; 456 | private System.Windows.Forms.ToolStripButton 查看帮助tSBtn; 457 | private System.Windows.Forms.DataGridViewTextBoxColumn 图书序列号; 458 | private System.Windows.Forms.DataGridViewTextBoxColumn 书名; 459 | private System.Windows.Forms.DataGridViewTextBoxColumn 作者; 460 | private System.Windows.Forms.DataGridViewTextBoxColumn 出版社; 461 | private System.Windows.Forms.DataGridViewTextBoxColumn 出版日期; 462 | private System.Windows.Forms.DataGridViewTextBoxColumn ISBN; 463 | private System.Windows.Forms.DataGridViewTextBoxColumn 价格; 464 | private System.Windows.Forms.DataGridViewTextBoxColumn 库存数量; 465 | } 466 | } --------------------------------------------------------------------------------