From 43d92a42632875175b44786d76d7091454df7681 Mon Sep 17 00:00:00 2001 From: aufe20200933 Date: Wed, 30 Nov 2022 16:39:38 +0800 Subject: [PATCH] Delete 'tianjiatushu' --- tianjiatushu | 92 ---------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 tianjiatushu diff --git a/tianjiatushu b/tianjiatushu deleted file mode 100644 index 1bca6df..0000000 --- a/tianjiatushu +++ /dev/null @@ -1,92 +0,0 @@ -//熊宇杰 -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Data.SqlClient; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace tushuguanli -{ - public partial class tianjiatushu : Form - { - public tianjiatushu() - { - InitializeComponent(); - } - private void Form1_Load(object sender, EventArgs e) - { - - } - //创建数据库连接 - - private void button1_Click(object sender, EventArgs e) - { //连接数据库 - string str = @"Data Source=LAPTOP-HKE14BIG;Initial catalog=BookDB;integrated Security=True"; - SqlConnection conn = new SqlConnection(str); - conn.Open(); - //分别插入书号、书名、书作者、出版社、数量 - string selectsql = "insert into t_book values('" + textBox_Bid.Text + "','" + textBox_Bname.Text + "','" + textBox_Bauthor.Text + "','" + textBox_Bpress.Text +"','" + textBox_Bnu.Text + "')"; - SqlCommand cmd = new SqlCommand(selectsql, conn); - cmd.CommandType = CommandType.Text; - SqlDataReader sdr; - sdr = cmd.ExecuteReader(); - conn.Close(); - - MessageBox.Show("添加成功!", "添加图书", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - ////////////////////////////////// - /// - - //添加书号 - private void label_Bid_Click(object sender, EventArgs e) - { - //书号标签:label_Bid - } - private void textBox_Bid_TextChanged(object sender, EventArgs e) - { - //文本按钮命名:textBox_Bid - } - //添加书名 - private void label_Bname_Click(object sender, EventArgs e) - { - //书名标签:label_Bname - } - private void textBox_Bname_TextChanged(object sender, EventArgs e) - { - //文本按钮命名:textBox_Bname - } - //添加作者 - private void label_Bauthor_Click(object sender, EventArgs e) - { - //书号标签:label_Bauthor - } - private void textBox_Bauthor_TextChanged(object sender, EventArgs e) - { - //文本按钮命名:textBox_Bautho - } - //添加出版社 - private void label_Bpress_Click(object sender, EventArgs e) - { - //书号标签:label_Bpress - } - private void textBox_Bpress_TextChanged(object sender, EventArgs e) - { - //文本按钮命名:textBox_Bpress - } - //添加数量 - private void label_Bnu_Click(object sender, EventArgs e) - { - //数量标签:label_Bnu - } - private void textBox_Bnu_TextChanged(object sender, EventArgs e) - { - //文本按钮命名:textBox_Bnu - } - - } -} \ No newline at end of file