基本信息
源码名称:C#图书馆借阅系统源码
源码大小:0.76M
文件格式:.rar
开发语言:C#
更新时间:2018-01-23
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 5 元 
   源码介绍

1、程序运行环境
    VS2005 SQL2000或SQL2005

2、数据库安装
    打开数据库管理系统,附加数据库即可。
    
3、本程序开发时连接的数据库服务器是本地(local),而且能够以Windows集成安全方式访问。

4、程序登录密码为
    管理员:
用户名:heshan   密码:123456
用户名:zhaojia  密码:123456
    超级管理员:
        用户名:wenjie   密码:123456









using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Library.UserInterface
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class MainForm : System.Windows.Forms.Form
    {		
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		private System.Windows.Forms.Button btnReader;
		private System.Windows.Forms.Button btnBook;
		private System.Windows.Forms.Button btnPublishing;
		private System.Windows.Forms.Button btnBorrow;
		private System.Windows.Forms.Button btnUser;
		private System.Windows.Forms.Button btnQuery;
		private System.Windows.Forms.Button btnExit;
		private string userName;
        private Label label1;
		private string userSort;

		public MainForm(string username,string usersort)
		{
			InitializeComponent();
			this.userName=username;			
			userSort=usersort;
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
            this.btnReader = new System.Windows.Forms.Button();
            this.btnBook = new System.Windows.Forms.Button();
            this.btnPublishing = new System.Windows.Forms.Button();
            this.btnBorrow = new System.Windows.Forms.Button();
            this.btnUser = new System.Windows.Forms.Button();
            this.btnQuery = new System.Windows.Forms.Button();
            this.btnExit = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // btnReader
            // 
            this.btnReader.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnReader.ForeColor = System.Drawing.Color.White;
            this.btnReader.Location = new System.Drawing.Point(159, 160);
            this.btnReader.Name = "btnReader";
            this.btnReader.Size = new System.Drawing.Size(80, 30);
            this.btnReader.TabIndex = 9;
            this.btnReader.TabStop = false;
            this.btnReader.Text = "读者信息";
            this.btnReader.UseVisualStyleBackColor = false;
            this.btnReader.Click  = new System.EventHandler(this.btnReader_Click);
            // 
            // btnBook
            // 
            this.btnBook.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnBook.ForeColor = System.Drawing.Color.White;
            this.btnBook.Location = new System.Drawing.Point(159, 213);
            this.btnBook.Name = "btnBook";
            this.btnBook.Size = new System.Drawing.Size(80, 30);
            this.btnBook.TabIndex = 10;
            this.btnBook.Text = "图书信息";
            this.btnBook.Click  = new System.EventHandler(this.btnBook_Click);
            // 
            // btnPublishing
            // 
            this.btnPublishing.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnPublishing.ForeColor = System.Drawing.Color.White;
            this.btnPublishing.Location = new System.Drawing.Point(279, 160);
            this.btnPublishing.Name = "btnPublishing";
            this.btnPublishing.Size = new System.Drawing.Size(80, 30);
            this.btnPublishing.TabIndex = 11;
            this.btnPublishing.Text = "出版社信息";
            this.btnPublishing.Click  = new System.EventHandler(this.btnPublishing_Click);
            // 
            // btnBorrow
            // 
            this.btnBorrow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnBorrow.ForeColor = System.Drawing.Color.White;
            this.btnBorrow.Location = new System.Drawing.Point(159, 290);
            this.btnBorrow.Name = "btnBorrow";
            this.btnBorrow.Size = new System.Drawing.Size(80, 30);
            this.btnBorrow.TabIndex = 12;
            this.btnBorrow.Text = "读者借还书";
            this.btnBorrow.Click  = new System.EventHandler(this.btnBorrow_Click);
            // 
            // btnUser
            // 
            this.btnUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnUser.ForeColor = System.Drawing.Color.White;
            this.btnUser.Location = new System.Drawing.Point(279, 213);
            this.btnUser.Name = "btnUser";
            this.btnUser.Size = new System.Drawing.Size(80, 30);
            this.btnUser.TabIndex = 13;
            this.btnUser.Text = "管理员信息";
            this.btnUser.Click  = new System.EventHandler(this.btnUser_Click);
            // 
            // btnQuery
            // 
            this.btnQuery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnQuery.ForeColor = System.Drawing.Color.White;
            this.btnQuery.Location = new System.Drawing.Point(279, 290);
            this.btnQuery.Name = "btnQuery";
            this.btnQuery.Size = new System.Drawing.Size(80, 30);
            this.btnQuery.TabIndex = 15;
            this.btnQuery.Text = "综合查询";
            this.btnQuery.Click  = new System.EventHandler(this.btnQuery_Click);
            // 
            // btnExit
            // 
            this.btnExit.BackColor = System.Drawing.Color.DodgerBlue;
            this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnExit.ForeColor = System.Drawing.Color.White;
            this.btnExit.Location = new System.Drawing.Point(404, 358);
            this.btnExit.Name = "btnExit";
            this.btnExit.Size = new System.Drawing.Size(80, 30);
            this.btnExit.TabIndex = 16;
            this.btnExit.Text = "退出系统";
            this.btnExit.UseVisualStyleBackColor = false;
            this.btnExit.Click  = new System.EventHandler(this.btnExit_Click);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
            this.label1.Location = new System.Drawing.Point(75, 66);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(365, 35);
            this.label1.TabIndex = 17;
            this.label1.Text = "欢迎进入图书管理系统";
            // 
            // MainForm
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.BackColor = System.Drawing.SystemColors.ActiveCaption;
            this.ClientSize = new System.Drawing.Size(522, 453);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.btnExit);
            this.Controls.Add(this.btnQuery);
            this.Controls.Add(this.btnUser);
            this.Controls.Add(this.btnBorrow);
            this.Controls.Add(this.btnPublishing);
            this.Controls.Add(this.btnBook);
            this.Controls.Add(this.btnReader);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "MainForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "图书管理系统";
            this.Load  = new System.EventHandler(this.MainForm_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		/*static void Main() 
		{
			Application.Run(new MainForm("andy","andy"));
		}*/

		private void btnExit_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void MainForm_Load(object sender, System.EventArgs e)
		{
			this.Text="图书馆管理系统 " userName;
			if(this.userSort=="system")
			{
				this.btnUser.Enabled=true;
			}			
			else
			{
				this.btnUser.Enabled=false;
			}
		}


		private void btnQuery_Click(object sender, System.EventArgs e)
		{
			Form QueryForm=new Query();
			QueryForm.ShowDialog();		
		}


		private void btnUser_Click(object sender, System.EventArgs e)
		{
			Form UserForm=new User();			
			UserForm.ShowDialog();
		}

		private void btnReader_Click(object sender, System.EventArgs e)
		{
			Form readerForm=new Reader();			
			readerForm.ShowDialog();
		}

		private void btnBook_Click(object sender, System.EventArgs e)
		{
			Form bookForm=new Book();			
			bookForm.ShowDialog();
		}

		private void btnBorrow_Click(object sender, System.EventArgs e)
		{
			Form bookForm=new BorrowReturn();			
			bookForm.ShowDialog();
		}

		private void btnPublishing_Click(object sender, System.EventArgs e)
		{
			Form publisForm=new Publishing();			
			publisForm.ShowDialog();
		}
	}
}