C#书店管理系统.doc

上传人:doc321 文档编号:14912058 上传时间:2022-02-24 格式:DOC 页数:15 大小:147KB
返回 下载 相关 举报
C#书店管理系统.doc_第1页
第1页 / 共15页
C#书店管理系统.doc_第2页
第2页 / 共15页
C#书店管理系统.doc_第3页
第3页 / 共15页
C#书店管理系统.doc_第4页
第4页 / 共15页
C#书店管理系统.doc_第5页
第5页 / 共15页
点击查看更多>>
资源描述

《C#书店管理系统.doc》由会员分享,可在线阅读,更多相关《C#书店管理系统.doc(15页珍藏版)》请在三一文库上搜索。

1、文档供参考,可复制、编制,期待您的好评与关注! 数据库课程设计班 级 软件0601 学 号 3060605022 姓 名 指导老师 二零零八年 7 月一、概述1、项目背景:数据库原理课程设计2、编写目的:掌握数据库设计原理及相关软件的使用3、软件定义:书店管理系统4、开发环境: 语言:C Sharp;平台:Visual Studio 2005 + Microsoft .Net 2.0;数据库:Microsoft SQL Server 2000; 二、需求分析1、问题的提出2、完成的功能1.售书管理:销售订单和销售统计;2订购管理;3.库存管理;4.信息查询;5.推出系统。3、E-R图三 数据表

2、Book(isbn,title,author,publisher,price,totalnum,comment,dtime)Inlist(isbn,title,price,provider,buynum,dtime)Outlist(isbn,username,buyip,price,buynum,title)四、表、视图、索引、存储过程、触发器的创建Book表:Inlist:Outlist:五、软件功能设计1.主界面:负责调出资界面;2.销售订单界面:将销售订单的信息加入销售订单列表outlist;3.进货单界面:将进货单的信息加入进货单信息表inlist;4.bookinput界面:将新录入

3、的图书信息家入book表;5.storage界面:从book表中查询图书信息;6.退出按钮:退出界面。主界面:销售订单界面:进货单界面bookinput界面:storage界面六、程序代码及控件描述15 / 15/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 pub

4、lic partial class Form1 : Form 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-6B3

5、825650DEA;Initial Catalog=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.S

6、how(); private void 新书入库ToolStripMenuItem_Click(object sender, EventArgs e) bookInput bi = new bookInput(); bi.Show(); private void 退出系统ToolStripMenuItem_Click(object sender, EventArgs e) this.Close(); private void textBox1_TextChanged(object sender, EventArgs e) private void Form1_FormClosed(object

7、 sender, FormClosedEventArgs e) try Global.Con.Close(); catch (Exception) return; private void 销售统计ToolStripMenuItem_Click(object sender, EventArgs e) salestatic sat = new salestatic(); sat.Show(); /saleorderusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;

8、using System.Drawing;using 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_Clic

9、k(object sender, EventArgs 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.Connect

10、ion = Global.Con; jincommand.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_title.Text+ ); int jin = jincommand.ExecuteNonQuery(); if

11、 (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 System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System

12、.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; string provider = textBox_provider.Text; string buynum = textBox_num.Text; string pric

13、e = 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 inlist(isbn,title ,provider,buynum,price,dtime) VALUES( + textBox_isbn.Text + , + textBox_titl

14、e.Text + , + textBox_provider.Text + , + textBox_num.Text + , + textBox_price.Text + , + textBox_date.Text + ); 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_canc

15、el_Click(object sender, EventArgs e) this.Close(); /bookInput 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 bookmanagesys public partial class bookInp

16、ut : Form public bookInput() InitializeComponent(); private void button_ok_Click(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 pr

17、ice = textBox_price.Text; string comment = textBox_comment.Text; SqlCommand 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 + , + textBo

18、x_time.Text + , + textBox_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.Close

19、(); private void bookInput_Load(object sender, EventArgs e) private void groupBox_input_Enter(object sender, EventArgs e) /gobalusing System;using System.Collections.Generic;using System.Text;using System.Data.SqlClient;namespace bookmanagesys public static class Global public static SqlConnection C

20、on; 七.设计心得从一开使拿到题目不知道如何下手到看了大量的例子后开始动手尝试是一个很长的过程。一开遇到的问题是不知道用什么语言做。后来决定用c#,但是如何建立表格以及需要哪些变量对于没有经验的我来说是一件茫然的事,然而在看了一些的例子后明白了如何建立表格。下面就是设计界面了。C#提供了非常简单的界面设计方法,如何设计完全看个人了,在界面的设计上并没有花太多的时但是在代码的设计上遇到了问题。由于对于c#语言并不是非常的熟悉所以在代码的设计上借鉴了一些书上和别人的代码。 这次的设计让我得到了动手练习的机会,初步明白了网上售书系统的设计与分析,当然这只是最简单的情况,实际的一个售书系统要考虑的更全面,更复杂。所及今后要更多的动手练习。感谢老师辛勤指导!

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1