资源简介

图书销售系统 功能齐全 内附代码 运行方面简单 用的SQL2008

资源截图

代码片段和文件信息

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

namespace salebook
{
    public partial class AddBook : Form
    {
        public string constr = (“Data Source = PC-200808031303;Initial Catalog=salebook;Integrated Security=SSPI;“);
        public AddBook()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender EventArgs e)
        {
            textBox1.Clear();
            textBox2.Clear();
            textBox3.Clear();
            textBox4.Clear();
            textBox5.Clear();
            textBox6.Clear();
        }

        private void button3_Click(object sender EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender EventArgs e)
        {
            string a = textBox1.Text;
            string b = textBox2.Text;
            string c = textBox3.Text;
            string d = textBox4.Text;
            string s = textBox5.Text;
            string f = textBox6.Text;
            
            
                try
            {
                SqlConnection conn = new SqlConnection();
                conn.ConnectionString = “data source=PC-200808031303;database=salebook;integrated security=true;“;
                conn.Open();
                SqlCommand cmd = new SqlCommand();
                cmd.Connection = conn;
                cmd.CommandType = CommandType.Text;
                cmd.CommandText = “insert into bookmanage(编号书名单价作者出版社数量添加时间) values (‘“ + textBox1.Text + “‘‘“ + textBox2.Text + “‘‘“ + textBox3.Text + “‘‘“ + textBox4.Text + “‘‘“ + textBox5.Text + “‘‘“ + textBox6.Text + “‘‘“ + System.DateTime.Now + “‘ )“;
                cmd.ExecuteNonQuery();
                MessageBox.Show(“已添加完毕!“);

               

                conn.Close();

            }
            catch
            {
                MessageBox.Show(“信息添加不成功“ “提示“);
 
            }

           

       
            this.Close();

        }

        private void AddBook_Load(object sender EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender EventArgs e)
        {

        }

        private void label1_Click(object sender EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender EventArgs e)
        {

        }

        private void textBox3_TextChanged(object sender EventArgs e)
        {

        }

        private void textBox7_TextChanged(object sender EventArgs e)
        {

        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2824  2009-01-12 14:32  图书销售系统\Backup\salebook\AddBookForm.cs

     文件      11167  2009-01-03 14:16  图书销售系统\Backup\salebook\AddBookForm.Designer.cs

     文件      94799  2009-01-03 14:16  图书销售系统\Backup\salebook\AddBookForm.resx

     文件        408  2008-06-20 20:30  图书销售系统\Backup\salebook\app.config

     文件       1032  2009-01-12 14:19  图书销售系统\Backup\salebook\BookManagerLoginForm.cs

     文件       6186  2009-01-11 21:51  图书销售系统\Backup\salebook\BookManagerLoginForm.Designer.cs

     文件    1196631  2009-01-11 21:51  图书销售系统\Backup\salebook\BookManagerLoginForm.resx

     文件          1  2009-01-11 21:29  图书销售系统\Backup\salebook\ClassDiagram1.cd

     文件       1697  2009-01-12 15:57  图书销售系统\Backup\salebook\DeleteBookForm.cs

     文件       4958  2009-01-11 21:45  图书销售系统\Backup\salebook\DeleteBookForm.Designer.cs

     文件      26169  2009-01-11 21:45  图书销售系统\Backup\salebook\DeleteBookForm.resx

     文件        934  2009-01-13 09:05  图书销售系统\Backup\salebook\Form1.cs

     文件       3815  2009-01-13 08:48  图书销售系统\Backup\salebook\Form1.Designer.cs

     文件       5814  2009-01-13 08:48  图书销售系统\Backup\salebook\Form1.resx

     文件       2640  2009-01-13 09:06  图书销售系统\Backup\salebook\MainForm.cs

     文件      11591  2009-01-13 09:06  图书销售系统\Backup\salebook\MainForm.Designer.cs

     文件     202055  2009-01-13 09:06  图书销售系统\Backup\salebook\MainForm.resx

     文件        473  2009-01-11 21:46  图书销售系统\Backup\salebook\Program.cs

     文件       1188  2008-06-18 13:36  图书销售系统\Backup\salebook\Properties\AssemblyInfo.cs

     文件       3080  2009-01-11 21:46  图书销售系统\Backup\salebook\Properties\Resources.Designer.cs

     文件       6189  2008-06-20 16:43  图书销售系统\Backup\salebook\Properties\Resources.resx

     文件       1700  2009-01-11 21:46  图书销售系统\Backup\salebook\Properties\Settings.Designer.cs

     文件        999  2008-06-20 20:30  图书销售系统\Backup\salebook\Properties\Settings.settings

     文件      11216  2008-06-20 16:43  图书销售系统\Backup\salebook\Resources\1.jpg

     文件       6430  2009-01-13 08:49  图书销售系统\Backup\salebook\salebook.csproj

     文件        538  2009-01-11 21:13  图书销售系统\Backup\salebook\salebook.csproj.user

     文件        146  2009-01-01 22:23  图书销售系统\Backup\salebook\salebookDataSet.cs

     文件      98035  2009-01-11 21:46  图书销售系统\Backup\salebook\salebookDataSet.Designer.cs

     文件          3  2008-06-20 20:30  图书销售系统\Backup\salebook\salebookDataSet.xsc

     文件      33390  2008-06-20 20:30  图书销售系统\Backup\salebook\salebookDataSet.xsd

............此处省略113个文件信息

评论

共有 条评论