




已阅读5页,还剩10页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
数据库课程设计班 级 软件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图三 数据表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界面:将新录入的图书信息家入book表;5.storage界面:从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 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=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 新书入库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 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;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_Click(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.Connection = 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 (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.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 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 inlist(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 + ); 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(); /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 bookInput : 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 price = 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 + , + textBox_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(); private void bookInput_Load(object sender, EventArgs e) private void g
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 银行结算户管理办法
- 锦鲤鱼病毒管理办法
- 长沙市科技管理办法
- 集团化信用管理办法
- 非标车高速管理办法
- 项目代办制管理办法
- 项目部核算管理办法
- 预防保健科管理办法
- 食堂小窗口管理办法
- 饶阳县学籍管理办法
- 2023-2025年高考生物试题分类汇编:孟德尔两大遗传定律原卷版
- 2025年军考政治时事政治热点试题题库含答案
- 2025年村医笔试重点题库
- 2025-2026学年人音版(简谱)(2024)初中音乐七年级上册教学计划及进度表
- 养生艾灸直播课件
- 2025年徐州市中考语文试题卷(含答案及解析)
- 云南省2025年校长职级制考试题(含答案)
- 2025年中国电信福建公司春季招聘80人笔试参考题库附带答案详解
- 《幼儿园开学第一课》课件
- (2025年标准)佛教无偿捐赠协议书
- 学堂在线 足球运动与科学 章节测试答案
评论
0/150
提交评论