C#書店管理系統(tǒng)_第1頁
C#書店管理系統(tǒng)_第2頁
C#書店管理系統(tǒng)_第3頁
C#書店管理系統(tǒng)_第4頁
C#書店管理系統(tǒng)_第5頁
已閱讀5頁,還剩2頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、數據庫課程設計班 級 軟件0601 學 號 3060605022 姓 名 指導老師 二零零八年 7 月一、概述1、項目背景:數據庫原理課程設計2、編寫目的:掌握數據庫設計原理及相關軟件的使用3、軟件定義:書店管理系統(tǒng)4、開發(fā)環(huán)境: 語言:C Sharp;平臺:Visual Studio 2005 + Microsoft .Net 2。0;數據庫:Microsoft SQL Server 2000; 二、需求分析1、問題的提出2、完成的功能1.售書管理:銷售訂單和銷售統(tǒng)計;2訂購管理;3.庫存管理;4.信息查詢;5。推出系統(tǒng)。3、E-R圖三 數據表Book(isbn,title,author,p

2、ublisher,price,totalnum,comment,dtime)Inlist(isbn,title,price,provider,buynum,dtime)Outlist(isbn,username,buyip,price,buynum,title)四、表、視圖、索引、存儲過程、觸發(fā)器的創(chuàng)建Book表:Inlist:Outlist:五、軟件功能設計1。主界面:負責調出資界面;2.銷售訂單界面:將銷售訂單的信息加入銷售訂單列表outlist;3。進貨單界面:將進貨單的信息加入進貨單信息表inlist;4.bookinput界面:將新錄入的圖書信息家入book表;5.storage界面

3、:從book表中查詢圖書信息;6。退出按鈕:退出界面。主界面:銷售訂單界面:進貨單界面bookinput界面:storage界面六、程序代碼及控件描述/form1。csusing System;using System.Collections.Generic;using System。ComponentModel;using System.Data;using System。Drawing;using System。Text;using System.Windows。Forms;namespace bookmanagesys public partial class Form1 : Form

4、public Form1() InitializeComponent(); private void 信息查詢ToolStripMenuItem_Click(object sender, EventArgs e) storage sg = new storage(); sg.Show(); private void Form1_Load(object sender, EventArgs e) Global。Con = new System.Data.SqlClient。SqlConnection("Data Source=JD-6B3825650DEA;Initial Catalog

5、=Booksale;Integrated Security=True”); Global。Con.Open(); private void 銷售訂單ToolStripMenuItem_Click(object sender, EventArgs e) SaleOrder so = new SaleOrder(); so.Show(); private void 進書定單ToolStripMenuItem_Click(object sender, EventArgs e) stocktable st = new stocktable(); st.Show(); private void 新書入庫

6、ToolStripMenuItem_Click(object sender, EventArgs e) bookInput bi = new bookInput(); bi.Show(); private void 退出系統(tǒng)ToolStripMenuItem_Click(object sender, EventArgs e) this.Close(); private void textBox1_TextChanged(object sender, EventArgs e) private void Form1_FormClosed(object sender, FormClosedEvent

7、Args e) try Global.Con.Close(); catch (Exception) return; private void 銷售統(tǒng)計ToolStripMenuItem_Click(object sender, EventArgs e) salestatic sat = new salestatic(); sat.Show(); /saleorderusing System;using System.Collections.Generic;using System。ComponentModel;using System.Data;using System。Drawing;usi

8、ng System。Text;using System.Windows。Forms;using System。Data.SqlClient;namespace bookmanagesys public partial class SaleOrder : Form public SaleOrder() InitializeComponent(); private void button_cancel_Click(object sender, EventArgs e) this。Close(); private void button_ok_Click(object sender, EventAr

9、gs e) string username = textBox_consumer。Text; string buyip = textBox_ip.Text; string isbn = textBox_isbn。Text; string price = textBox_price。Text; string buynum = textBox_num。Text; string title = textBox_title。Text; SqlCommand jincommand = new SqlCommand(); jincommand。Connection = Global.Con; jincom

10、mand.CommandText = "INSERT INTO outlist(username ,buyip,isbn,price,buynum,title) VALUES(" + textBox_consumer.Text + ",'” + textBox_ip。Text + ”','” + textBox_isbn。Text + ”',” + textBox_price.Text + "'," + textBox_num。Text +”','" + textBox_titl

11、e。Text+ ")" int jin = jincommand。ExecuteNonQuery(); if (jin 0) label_show.Text = "提交成功"; else label_show.Text = "提交失敗!" private void SaleOrder_Load(object sender, EventArgs e) /stocktableusing System;using System。Collections。Generic;using System.ComponentModel;using Sys

12、tem.Data;using System.Drawing;using System.Text;using System。Windows。Forms;using System.Data.SqlClient;namespace bookmanagesys public partial class stocktable : Form public stocktable() InitializeComponent(); private void button_ok_Click(object sender, EventArgs e) string title = textBox_title.Text;

13、 string provider = textBox_provider.Text; string buynum = textBox_num。Text; string price = textBox_price。Text; string dtime = textBox_date。Text; string isbn = textBox_isbn。Text; SqlCommand jinCommand = new SqlCommand(); jinCommand.Connection = Global。Con; jinCommand。CommandText = "INSERT INTO i

14、nlist(isbn,title ,provider,buynum,price,dtime) VALUES(" + textBox_isbn。Text + ”'," + textBox_title.Text + ",'" + textBox_provider.Text + "','" + textBox_num。Text + ”','" + textBox_price。Text + "','" + textBox_date。Text + &q

15、uot;')”; int jin = jinCommand.ExecuteNonQuery(); if (jin > 0) label_show.Text = "提交成功"; else label_show.Text = ”提交失??!"; private void stocktable_Load_1(object sender, EventArgs e) private void button_cancel_Click(object sender, EventArgs e) this。Close(); /bookInputusing System;u

16、sing System。Collections。Generic;using System。ComponentModel;using System。Data;using System。Drawing;using System.Text;using System。Windows。Forms;using System。Data.SqlClient;namespace bookmanagesys public partial class bookInput : Form public bookInput() InitializeComponent(); private void button_ok_C

17、lick(object sender, EventArgs e) string isbn = textBox_isbn.Text; string title = textBox_title。Text; string dtime = textBox_time。Text; string author = textBox_author。Text; string publisher = textBox_publisher.Text; string price = textBox_price。Text; string comment = textBox_comment。Text; SqlCommand

18、jinCommand = new SqlCommand(); jinCommand.Connection = Global.Con; jinCommand.CommandText = "INSERT INTO book(isbn ,title,dtime,author,publisher,price,comment) VALUES('” + textBox_isbn。Text + "'," + textBox_title。Text + "'," + textBox_time。Text + ”,'” + textB

19、ox_author。Text + ”," + textBox_publisher.Text + ”,'” + textBox_price。Text + ",” + textBox_comment。Text + ”')”; int jin = jinCommand.ExecuteNonQuery(); if( jin 0) label_show。Text = "入庫成功”; else label_show.Text = "入庫失敗!”; private void button_cancel_Click(object sender, EventArgs e) this

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論