C#书店管理系统Word版.docx
- 文档编号:1986405
- 上传时间:2022-10-25
- 格式:DOCX
- 页数:15
- 大小:104.47KB
C#书店管理系统Word版.docx
《C#书店管理系统Word版.docx》由会员分享,可在线阅读,更多相关《C#书店管理系统Word版.docx(15页珍藏版)》请在冰豆网上搜索。
C#书店管理系统Word版
数据库课程设计
班级软件0601
学号3060605022
姓名
指导老师
二零零八年7月
一、概述
1、项目背景:
数据库原理课程设计
2、编写目的:
掌握数据库设计原理及相关软件的使用
3、软件定义:
书店管理系统
4、开发环境:
语言:
CSharp;
平台:
VisualStudio2005+Microsoft.Net2.0;
数据库:
MicrosoftSQLServer2000;
二、需求分析
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.cs
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Text;
usingSystem.Windows.Forms;
namespacebookmanagesys
{
publicpartialclassForm1:
Form
{
publicForm1()
{
InitializeComponent();
}
privatevoid信息查询ToolStripMenuItem_Click(objectsender,EventArgse)
{
storagesg=newstorage();
sg.Show();
}
privatevoidForm1_Load(objectsender,EventArgse)
{
Global.Con=newSystem.Data.SqlClient.SqlConnection("DataSource=JD-6B3825650DEA;InitialCatalog=Booksale;IntegratedSecurity=True");
Global.Con.Open();
}
privatevoid销售订单ToolStripMenuItem_Click(objectsender,EventArgse)
{
SaleOrderso=newSaleOrder();
so.Show();
}
privatevoid进书定单ToolStripMenuItem_Click(objectsender,EventArgse)
{
stocktablest=newstocktable();
st.Show();
}
privatevoid新书入库ToolStripMenuItem_Click(objectsender,EventArgse)
{
bookInputbi=newbookInput();
bi.Show();
}
privatevoid退出系统ToolStripMenuItem_Click(objectsender,EventArgse)
{
this.Close();
}
privatevoidtextBox1_TextChanged(objectsender,EventArgse)
{
}
privatevoidForm1_FormClosed(objectsender,FormClosedEventArgse)
{
try
{
Global.Con.Close();
}
catch(Exception)
{
return;
}
}
privatevoid销售统计ToolStripMenuItem_Click(objectsender,EventArgse)
{
salestaticsat=newsalestatic();
sat.Show();
}
}
}
//saleorder
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Text;
usingSystem.Windows.Forms;
usingSystem.Data.SqlClient;
namespacebookmanagesys
{
publicpartialclassSaleOrder:
Form
{
publicSaleOrder()
{
InitializeComponent();
}
privatevoidbutton_cancel_Click(objectsender,EventArgse)
{
this.Close();
}
privatevoidbutton_ok_Click(objectsender,EventArgse)
{
stringusername=textBox_consumer.Text;
stringbuyip=textBox_ip.Text;
stringisbn=textBox_isbn.Text;
stringprice=textBox_price.Text;
stringbuynum=textBox_num.Text;
stringtitle=textBox_title.Text;
SqlCommandjincommand=newSqlCommand();
jincommand.Connection=Global.Con;
jincommand.CommandText="INSERTINTOoutlist(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+"')";
intjin=jincommand.ExecuteNonQuery();
if(jin>0)
label_show.Text="提交成功";
else
label_show.Text="提交失败!
";
}
privatevoidSaleOrder_Load(objectsender,EventArgse)
{
}
}
}
//stocktable
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Text;
usingSystem.Windows.Forms;
usingSystem.Data.SqlClient;
namespacebookmanagesys
{
publicpartialclassstocktable:
Form
{
publicstocktable()
{
InitializeComponent();
}
privatevoidbutton_ok_Click(objectsender,EventArgse)
{
stringtitle=textBox_title.Text;
stringprovider=textBox_provider.Text;
stringbuynum=textBox_num.Text;
stringprice=textBox_price.Text;
stringdtime=textBox_date.Text;
stringisbn=textBox_isbn.Text;
SqlCommandjinCommand=newSqlCommand();
jinCommand.Connection=Global.Con;
jinCommand.CommandText="INSERTINTOinlist(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+"')";
intjin=jinCommand.ExecuteNonQuery();
if(jin>0)
label_show.Text="提交成功";
else
label_show.Text="提交失败!
";
}
privatevoidstocktable_Load_1(objectsender,EventArgse)
{
}
privatevoidbutton_cancel_Click(objectsender,EventArgse)
{
this.Close();
}
//bookInput
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C# 书店 管理 系统 Word