• 大小: 2.16MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-18
  • 语言: C#
  • 标签: C#  图书管理  C#源码  

资源简介

包含了图书管理系统软件全套源码,连接数据库管理软件,可以增删改查,办理会员,充值,还书服务,软件界面用PS设计文件内带PSD文件可自己编辑,代码简单易懂。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Book_one
{

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string str = string.Empty;
        public Form1(string textValue)
        {
            InitializeComponent();
            this.str = textValue;
        }


        public void borBook()//借书操作
        {

            string connstring = “server=.;database=Book;uid=sa;pwd=123456“;

            SqlConnection con = new SqlConnection(connstring);
            con.Open();
            if (con.State == ConnectionState.Open)
            {


                string sql = string.Format(“update Book set Nub=Nub-1 where BookName=‘{0}‘“ textBox8.Text);
                SqlCommand cmd = new SqlCommand(sql con);
                int i = cmd.ExecuteNonQuery();

                con.Close();

                if (i == 0)
                {
                    MessageBox.Show(“借书失败!“);
                }
                else
                {

                    MessageBox.Show(“借书成功!“);
                    textBox8.Text = ““;
                    textBox9.Text = ““;
                    textBox10.Text = ““;


                }



            }
            con.Close();
        }
        public void selectAllName()//可查询所有图书的信息
        {

            string connstring = “server=.;database=Book;uid=sa;pwd=123456“;

            SqlConnection con = new SqlConnection(connstring);
            con.Open();
            if (con.State == ConnectionState.Open)
            {


                string sql = string.Format(“select Id as 编号BookName as 书名Name as 作者Nub as 数量Ms as 价格Txt as 介绍 from Book“);
                SqlDataAdapter adpter = new SqlDataAdapter(sql con);
                DataSet ds = new DataSet();
                adpter.Fill(ds);
                this.dataGridView1.DataSource = ds.Tables[0].DefaultView;

            }
            con.Close();
        }
        public void Bookbr()/*借书*/
        {
            string connstring = “server=.;database=Book;uid=sa;pwd=123456“;

            SqlConnection con = new SqlConnection(connstring);
            con.Open();
            string sql = @“update Book set Nub=Nub-1 where BookName=“ + textBox8.Text + ““;
            SqlCommand cmd = new SqlCommand(sql con);
            con.Close();

        }
        public void Bookbor()/*还书*/
        {
            string connstring = “server=.;database=Book;uid=sa;pwd=123456“;

            SqlConnection con = new SqlConnection(connstring);
            con.Open();
            string sql = @“update Book set Nub=Nub+1 where BookName=“ + textBox19.Text + ““;
            SqlCommand cmd = new SqlCommand(sql con);
            con.Close(

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-26 16:35  Book-one1\
     目录           0  2018-11-26 16:35  Book-one1\Book-one\
     目录           0  2018-11-26 16:35  Book-one1\Book-one\bin\
     目录           0  2018-11-26 16:35  Book-one1\Book-one\bin\Debug\
     文件      404480  2018-11-15 17:44  Book-one1\Book-one\bin\Debug\Book-one.exe
     文件       87552  2018-11-15 17:44  Book-one1\Book-one\bin\Debug\Book-one.pdb
     文件       11600  2018-11-15 17:44  Book-one1\Book-one\bin\Debug\Book-one.vshost.exe
     文件         490  2010-03-17 22:39  Book-one1\Book-one\bin\Debug\Book-one.vshost.exe.manifest
     目录           0  2018-06-03 19:25  Book-one1\Book-one\bin\Release\
     目录           0  2018-11-26 16:35  Book-one1\Book-one\book-img\
     文件        6974  2018-06-07 20:02  Book-one1\Book-one\book-img\000.png
     文件        8763  2018-06-14 19:31  Book-one1\Book-one\book-img\1-11.jpg
     文件        7168  2018-06-03 20:06  Book-one1\Book-one\book-img\11.png
     文件        7086  2018-06-03 20:29  Book-one1\Book-one\book-img\22.png
     文件        6913  2018-06-03 20:35  Book-one1\Book-one\book-img\33.png
     文件        7311  2018-06-03 20:37  Book-one1\Book-one\book-img\44.png
     文件        6855  2018-06-03 20:43  Book-one1\Book-one\book-img\55.png
     目录           0  2018-11-26 16:35  Book-one1\Book-one\book-img\6306\
     文件       34990  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g1.png
     文件       38338  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g10.png
     文件       42977  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g11.png
     文件       44904  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g12.png
     文件       39875  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g13.png
     文件       41978  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g14.png
     文件       44333  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g15.png
     文件       40572  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g16.png
     文件       42104  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g17.png
     文件       43887  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g18.png
     文件       36921  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g2.png
     文件       41933  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g3.png
     文件       37018  2010-11-30 22:50  Book-one1\Book-one\book-img\6306\g4.png
............此处省略63个文件信息

评论

共有 条评论