管理信息系统ERP系统库存子系统设计课设代码

合集下载

仓库管理系统代码大全

仓库管理系统代码大全

系统主函数(program.cs)using System;using System.Collections.Generic;using System.Windows.Forms;namespace warehouse{static class Program{/// <summary>/// 应用程序的主入口点。

/// </summary>[STAThread]static void Main(){Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);Application.Run(new frmLogin());//运行一个登陆对象}}}集的常规信息using System.Reflection;using pilerServices;using System.Runtime.InteropServices;// 有关程序集的常规信息通过下列属性集// 控制。

更改这些属性值可修改// 与程序集关联的信息。

[assembly: AssemblyTitle("warehouse")][assembly: AssemblyDescription("")][assembly: AssemblyConfiguration("")][assembly: AssemblyCompany("")][assembly: AssemblyProduct("warehouse")][assembly: AssemblyCopyright("版权所有2009")][assembly: AssemblyTrademark("")][assembly: AssemblyCulture("")]// 将ComVisible 设置为false 使此程序集中的类型// 对COM 组件不可见。

库存信息管理系统-VB编程毕业设计

库存信息管理系统-VB编程毕业设计

第一章库存信息管理系统的基本问题1.1 库存信息管理系统的简介本系统是为了提高腾达公司自动化办公的水平、经过详细的调查分析初步制定了腾达公司库存信息管理系统。

基于WINDOWS 98 平台,使用Microsoft Access97, 在Visual Basic 6.0编程环境下开发的库存信息管理系统。

该系统采用交互是人机对话和模块化设计方式,实现对系统管理,其开发主要包括后台数据库的建立和维护以及前端应用程序的开发两方面。

对于前者要求建立起资料一致性和完整性强、资料安全性好的库。

而对于后者则要求应用程序功能完备,易使用等特点此管理系统的开发主要为了满足管理者的需求,使他们的工作量减少,工作难度降低,风险性减小。

同时使用这个系统还有利用数据的查询和保存。

这个系统的5个主菜单以及若干个子菜单可以满足管理者的所有需求,使其工作满足现代化管理的要求。

1.2管理者对库存信息管理系统的需求库房的管理的工作非常复杂烦琐,而且销售情况和库存档案要记载楚,销售的工作情况及库存情况管理者要了如指掌,并且进货前还有一个准确的记录,销售后还要返回一些资料妥善保存。

这些工作如果要手工操作的话,不仅困难大,还费时费力。

所以需要一个专门的程序来进行这些工作。

这就需要更好的库存信息系统满足其经营管理的需要。

第二章编程工具Visual Basic 简介2.1 VISUAL BASIC 6.0 功能简介VISUAL BASIC 是在原有的basic 语言基础上的进一步的发展,它包含了数百条语句,函数及关键词,其中很多与 window有直接的关系。

VISUAL BASIC 语言简单易学,只要稍有语言基础就可以很快掌握并进而精通。

可视化的用户界面设计功能,把程序设计人员从繁琐复杂的界面设计中解脱出来:可视化编程化环境的“所见即所得”(WYSIWYG)功能,是界面设计如积木游戏一般,编程变成了一种享受,强大的多媒体功能可轻易地开发出集声音,动画,影像和图片于一体的多媒体应用程序,新增的网络功能提供了编写Internet程序的能力。

管理信息系统ERP系统库存子系统设计课设代码

管理信息系统ERP系统库存子系统设计课设代码

主界面程序using System;using System。

Collections。

Generic;using ponentModel;using System。

Data;using System.Drawing;using System.Text;using System。

Windows。

Forms;using SJZU;namespace SJZU。

SWEIMS。

GUI。

SWEIMS{public partial class Frm_Main:Form{public Frm_Main(){InitializeComponent();}private void Frm_Main_Load(object sender, EventArgs e){toolStripStatusLabel6。

Text = DateTime。

Now.ToString(); }private void查询分析ToolStripMenuItem3_Click(object sender,EventArgs e){Frm_Warehouse_Query frm_Warehouse_Query = newFrm_Warehouse_Query();frm_Warehouse_Query.ShowDialog();}private void添加仓库信息ToolStripMenuItem_Click(object sender,EventArgs e){Frm_Warehouse_Add frm_Warehouse_Add = new Frm_Warehouse_Add ();frm_Warehouse_Add。

ShowDialog();}private void修改仓库信息ToolStripMenuItem_Click(object sender,EventArgs e){Frm_Warehouse_Update frm_Warehouse_Update = newFrm_Warehouse_Update();frm_Warehouse_Update。

仓库管理系统(VB+Access+源代码)

仓库管理系统(VB+Access+源代码)

仓库管理系统项目的建立这是本人利用闲暇之余在VB6.0上制作的一个简陋的类库管系统,现图文结合的方式一步一步展现制作过程。

由于本人是个初学者,里面存在很多不足之处望得到高手们的指导。

此文可作供初学者们学习交流。

作者联系方式:E-mail1、2、3、4、EndEndSubVB6.0信息。

如下图单击“外接程序”再单击“可视化数据管理器”出现如图点击“文件”——“新建”——“MicrosoftAccess”——“Version2.0MDB”输入数据库名,“保存”出现如下图在数据窗口中右击——“新建表”,最终如下往数据表里添加数据在这里就不罗嗦了,请查阅相关书籍。

登录界面窗口的建立最终界面如下:1、Adodc1的添加过程为:单击“工程”——“部件”出现下图所示,选择“控件”下的“MicrosoftADODataControl6.0(OLEDB)”单击“确定”在工具栏中会出现“”图标,单击它并拖动到相应位置即可。

其它元件不在一一说明。

2、本窗体代码如下:PrivateSubCommand1_Click()'“登录”、“确定”按钮IfCommand1.Caption="确定"AndCommand2.Caption="取消"Then'如果为“确定”则添加新用户IfText1.Text=""Then'提示用户输入用户名MsgBox"请输入用户名!",,"登录信息提示:"ExitSubElse'DimusenameAsString'检测用户名是否已经存在EndIfEndIfEndIfEndIfIfText2.Text<>Text3.TextThenMsgBox"两次输入的密码不一致,请确认!",,"登录提示信息:"Text2.Text=""Text3.Text=""Text2.SetFocusExitSubElse'添加新用户=Trim(Text1.Text)=Trim(Text2.Text)MsgBox("添加新用户成功,现在您可以登陆系统了!")Text3.Visible=FalseCommand1.Caption="登录"Command2.Caption="退出"EndIfElse'“登录”按钮,用户登录DimstrSnoAsStringDimstrSelectAsStringstrSno=Trim(Text1.Text)'检测用户名是否存在strSelect="select密码from用户登录信息表where用户名='"&strSno&"'" mandType=adCmdTextEndIfElseEndIfEndIfCommand1.Caption="登录"Command2.Caption="退出"Text1.Text=""Text2.Text=""Text1.SetFocusElseEnd'UnloadMeEndIfEndSubPrivateSubCommand3_Click()'“新用户”按钮Label3.Visible=TrueText1.Text=""Text2.Text=""Text3.Text=""Command1.Caption="确定"Command2.Caption="取消"Text1.SetFocusEndSubPrivateSubCommand3_MouseDown(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle) Label6.Visible=TrueEndSub'Else'EndIfElseEndIf如下:代码:PrivateSubAddNew_Click()Frame1.Visible=TrueFrame2.Visible=FalseEndSubPrivateSubCHKPMCHX_Click()Frame2.Caption="出库信息"DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)n="select*from出库表where品名='"&pm&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCHKXHCHX_Click()Frame2.Caption="出库信息" DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)n="select*from出库表where型号='"&XH&"'"EndSubEndSubEndSubmandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCKZCX_Click()Frame2.Caption="出库信息"DimZBAsStringZB="select*from出库表"mandType=adCmdTextAdodc2.RecordSource=ZBCallInitGrid1EndSubPrivateSubCommand1_Click()IfText1.Text=""Then'提示用户输入用户名MsgBox"请输入用户名!",,"登录信息提示:"ExitSubElse'DimusenameAsString'检测用户名是否已经存在DimstrSAsStringusename=Trim(Text1.Text)MsgBox"ExitSubEndIfEndIfMsgBox"ExitSubEndIfMsgBox"ExitSubEndIfMsgBox"Text2.Text=""Text3.Text=""Text2.SetFocusExitSubElse'添加新用户=Trim(Text1.Text)=Trim(Text2.Text)eDimXAsIntegerX=MsgBox("成功添加新用户,是否要重新登录!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!")Form3.ShowEndIf'MsgBox("成功添加新用户!")'Label3.Visible=False'Text3.Visible=False'Command1.Caption="登录"'Command2.Caption="退出"EndIfFrame1.Visible=FalseEndSubEndSubEndSubEndEndSubPrivateSubForm_Load() TextUserName=UnloadForm1Frame1.Visible=False CallInitGrid0Me.Height=MDIForm1.Height-1060 Me.Width=MDIForm1.Width-560 Me.Top=MDIForm1.TopMe.Left=MDIForm1.LeftEndSubPrivateSubGHCZ_Click()EndSubPrivateSubGHPMCX_Click()Frame2.Caption="归还信息" DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)n="select*from归还表where品名='"&pm&"'" mandType=adCmdTextAdodc2.RecordSource=nEndSubEndSubEndSubPrivateSubGHXHCX_Click()Frame2.Caption="归还信息" DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)n="select*from归还表where型号='"&XH&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHZCX_Click()Frame2.Caption="归还信息"DimZBAsStringZB="select*from归还表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCCZ_Click()'Form2.HideEndSubEndSubEndSubFrame2.Caption="借出信息"DimJCRAsStringDimnAsStringJCR=InputBox("借出人","请输入",0)n="select*from借出表where借出人='"&JCR&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCSHJCX_Click()Frame2.Caption="借出信息"DimJCRQAsStringDimnAsStringJCRQ=InputBox("借出日期,格式为:月/日/年如:12/1/2011","请输入",0) n="select*from借出表where借出日期='"&JCRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCZCX_Click()EndSubEndSubmandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubPMCX_Click()Frame2.Caption="库存信息"DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)n="select*from库存表where品名='"&pm&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid0EndSubPrivateSubRKCZ_Click()'Form2.HideForm5.ShowEndSubPrivateSubRKJSHR_Click()Frame2.Caption="入库信息"EndSubEndIfEndSubDimnAsStringRKRQ=InputBox("入库日期,格式为:月/日/年如:12/1/2011","请输入",0) n="select*from入库表where入库日期='"&RKRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubRKXHCHX_Click()Frame2.Caption="入库信息"XH=InputBox("产品型号","请输入",0)IfLen(XH)>0Thenn="select*from入库表where型号='"&XH&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid1EndSubPrivateSubRKZCX_Click()EndSubElse'EndIfElseEndIfElseEndIfLabel7.MoveLabel7.Left-80ElseLabel7.Left=Form2.ScaleWidthEndIfEndSubPrivateSubXGMM_Click()'Form2.HideForm4.ShowEndSubPrivateSubXHCX_Click()DimnAsStringXH=InputBox("产品型号","请输入",0)IfLen(XH)>0Then'AndVal(XH)<>0n="select*from库存表where型号='"&XH&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid0EndSubEndSubEndWithEndSub.Columns(2).Width=1600.Columns(3).Width=800.Columns(4).Width=800.Columns(5).Width=1000.Columns(6).Width=800.Columns(7).Width=4000EndWithEndSubPrivateSubInitGrid2()WithDataGrid1'.Columns(1).Caption="课程名"'.Columns(2).Caption="学分"'.Columns(3).Caption="成绩"'设置DtgCond的列宽.Columns(0).Width=800.Columns(1).Width=1600.Columns(2).Width=1600.Columns(3).Width=800.Columns(4).Width=800.Columns(5).Width=800.Columns(6).Width=1000EndWithEndSub代码:MsgBox"ExitSubEndIfUnloadMeForm2.Show'MsgBox"登陆成功!",,"登录提示信息:"ElseMsgBox"密码不正确,请重新输入!",,"登录提示信息:" Text2.Text=""Text2.SetFocusEndIfEndSubPrivateSubCommand2_Click()修改用户密码界面代码:PrivateSubCommand1_Click()IfTrim(Text1.Text)<>Form2.TextUserNameThen MsgBox"用户名不正确,请确认!",,"信息提示!" Text1.Text=""ExitSubElseMsgBox"ExitSubEndIfMsgBox"ExitSubEndIfMsgBox"ExitSubEndIfIfText4.Text=""ThenMsgBox"请再次输入新密码!",,"信息提示!"Text4.SetFocusExitSubEndIfIfTrim(Text3.Text)<>Trim(Text4.Text)Then MsgBox"两次输入的新密码不一致!",,"信息提示!" Text3.Text=""Text4.Text=""=Trim(Text3.Text)MsgBox("密码修改成功!") UnloadMe'Form2.ShowEndIfEndIfEndSub PrivateSubCommand2_Click() UnloadMeEndSub代码:MsgBox"ExitSubElseMsgBox"ExitSubEndIfMsgBox"ExitSubEndIf'添加=Trim(Text1.Text)=Trim(Text2.Text)=Trim(Text3.Text)=Trim(Text4.Text)=Trim(Text5.Text)=Date=Trim(Text7.Text)EndIfDimpmAsString DimpmsAsStringpm=Trim(Text1.Text)n=Val(Text3.Text)pms="select*from库存表where品名='"&pm&"'" =adCmdText=pmsIfThenWithForm2=Trim(Text1.Text)=Trim(Text2.Text)=Trim(Text3.Text)EndWithElsem=EndIfEndIfX=MsgBox("UnloadMeElseEndIf="入库信息DimZBAsStringZB="select*from入库表"'where品名='"&PM&"'" =adCmdText=ZBEndSubPrivateSubCommand2_Click()Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""Text7.Text=""Text1.SetFocusEndSubPrivateSubCommand3_Click()UnloadMe'Form2.ShowEndSub出库管理代码:MsgBox"ExitSubElseMsgBox"ExitSubEndIfMsgBox"ExitSubEndIf'添加=Date=Trim(Text4.Text)EndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms="select*from库存表where品名='"&pm&"'" =adCmdTextm=If=Trim(Combo2.Text)Then=Val(m)-Val(n)EndIfDimXAsIntegerX=MsgBox("产品出库登记成功,是否继续添加产品!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbNoThenUnloadMe'Form2.ShowEndIfCombo1.Text=""="出库信息=adCmdText=ZBEndSubEndSubUnloadMeEndSubPrivateSubForm_Load()Adodc2.RefreshDoUntilCombo2.AddItemCombo1.AddItemCombo3.AddItemLoopEndSub借出管理代码:PrivateSubCommand1_Click()IfCombo1.Text=""AndCombo2.Text=""Then'text1.Text=""AndText2.Text=""ThenMsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!"ExitSubElseIfText1.Text=""AndCombo3.Text=""Then'Text4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"ExitSubEndIfMsgBox"ExitSubEndIf'添加=DateEndIfpms="select*from库存表where品名='"&pm&"'"=adCmdText=pmsm=If=Trim(Combo2.Text)Then=Val(m)-Val(n)EndIfDimXAsIntegerX=MsgBox("产品借出登记成功,是否继续添加产品!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbNoThenForm2.ShowEndIfCombo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""="借出信息"DimZBAsString=adCmdText=ZBEndSubEndSubUnloadMeForm2.ShowEndSubDoUntilLoopEndSub归还管理代码:PrivateSubCommand1_Click()IfCombo1.Text=""AndCombo2.Text=""Then'text1.Text=""AndText2.Text=""Then MsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!" ExitSubElseIfText1.Text=""AndCombo3.Text=""Then'Text4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"Text1.SetFocusExitSubEndIfIfText2.Text=""ThenMsgBox"请经手人签名!",vbCritical,"提示信息!"Text2.SetFocusExitSubEndIfIfText3.Text=""ThenMsgBox"请输入归还人姓名!",vbCritical,"提示信息!"ExitSubEndIf'添加=DateEndIf=adCmdText=pmsm==Val(m)+Val(n)EndIfDimXAsIntegerX=MsgBox("产品归还登记成功,是否继续添加产品!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbNoThenUnloadMeForm2.ShowEndIfCombo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""="归还信息"DimZBAsStringZB="select*from归还表"'where品名='"&PM&"'" =adCmdText=ZBEndSubPrivateSubCommand2_Click()EndSubUnloadMeForm2.ShowEndSub'i=0''DoUntil''i=i+1'LoopCallpmEndSubPrivateSubpm()DimiAsVariantDimjAsVariantDimkAsVariantDimaAsVariantDimbAsVariantDimcAsVariantDimsAsVariantDimDAsVarianti=0j=0Adodc2.Refresh DoUntila=a+","+b=b+","+b=b+","+i=i+1LoopD=Split(a,",") Ifj<iThens=D(2)'k=0'k=k+1'Else'k=k+1'EndIf'EndIfj=j+1EndIfEndSub。

erp基础资料编码方案

erp基础资料编码方案

目录一、仓库编码 (2)二、计量单位编码 (2)三、采购员编码 (2)四、客户编码 (3)五、部门编码 (3)六、销售订单编码 (4)七、采购订单编码 (4)八、生产订单编码 (4)九、财务部分的科目编码 (4)十、核算项目编码 (5)十一、供应商编码 (6)十二、物料编码 (7)一、仓库编码仓库编码采用3位数字A.BC编码(分二级编码),用于区分不同类型仓库。

具体编码规则为:A:第一级编码,用来表示仓库类别,设置有:1——本部名称仓(如济南为:1——济南仓)类型为:普通仓位2——委托代销仓类型为:委托代销3——集团消费仓类型为:普通仓位BC:第二级编码,用来表示具体仓库,设置规则如下:1——经营部名称仓下设:1.01——原料仓类型为:普通仓位1.02——成品仓类型为:普通仓位1.03——半成品仓类型为:普通仓位1.04——不良品仓类型为:普通仓位1.05——换货仓类型为:普通仓位1.06——代管仓类型为:代管物资1.07——报废仓(已除帐,非库存存货,只控存量)1.09——其它仓类型为:普通仓位2——委托代销仓下按经营部的委托代销客户分别设仓,从2.01开始顺序编码,所有仓位类型为委托代销。

3——集团消费仓下按经营部的集团消费(捆绑销售)客户分别设仓,从 3.01开始顺序编码,所有仓位类型为普通仓位。

仓位编码:普通仓位 01委托代销 02二、计量单位编码三、采购员编码具体采购缩写+两位数字+姓名Sb02 李瑞瑞设备采购员李瑞瑞四、客户编码公司的简称由两位字母缩写,如蝴蝶:HD,客户类型分为:1.大客户2.中型客户3.小客户客户签约时间年份+月份如2005年6月即为0506(5)根据客户的区域性,可以将客户划分:华北区客户、华中区客户,西南区客户、华东华北区客户代码:1(其位置在客户编码的第七位)华中区客户代码:2区客户与华南区客户等,其区域划分代码规定如下:西南区客户代码:3华东区客户代码:4华南区客户代码: 5公司简称+客户类型+客户签约时间+区域性##.#.####.#HD.1.1111.3蝴蝶公司,大型客户,2011年11月签约.是西南客户的代码.五、部门编码蝴蝶鞋类公司有主要有生产部,销售部,仓存部,采购部及财务,部公司的部门按阿拉伯法编码:六、销售订单编码六种销售方式分别有六个编码:01现销 02赊销 03直运销售 04委托代销 05分期收款 06受托代销例:季节码.商品尺码+鞋楦码 +面料码+底型码+底材码+类别+颜色-销售方式如:A.16P7141C1-01春秋季,41码,普通头,绵羊皮,平跟,包真皮,男鞋,雪青,现销提示:一般金蝶自动的生产七、采购订单编码采购订单将采用与销售订单关联的方式生成订单编码例:季节码.商品尺码+鞋楦码 +面料码+底型码+底材码+类别+颜色-销售方式+C 如:A.16P7141C1-01C春秋季,41码,普通头,绵羊皮,平跟,包真皮,男鞋,雪青,现销+C提示:一般金蝶自动的生产八、生产订单编码生产订单将采用与采购订单、销售订单两张单据关联的方式生成例:季节码.商品尺码+鞋楦码 +面料码+底型码+底材码+类别+颜色-销售方式+S 如:A.16P7141C1-01S春秋季,41码,普通头,绵羊皮,平跟,包真皮,男鞋,雪青,现销+S提示:一般金蝶自动的生产九财务部分的科目编码在科目的第 1 级分组中,科目分为了六大类,代码都是不可以修改的,他们的编码规则是资产类代码以1 开头,负债类代码以2 开头,权益类是以3 开头,成本是以5 开头,表外科目以6 开头,这六大类科目不能进行修改十、核算项目编码十一、供应商编码所有供应商统一使用7位码长,如下:XX XX XXX第一,二位,一级编码,供应商所在省或直辖市,有2为数字组成,其中第一位第三,四位;二级编码,供应商所在地市码,有两位数字组成。

ERP教学系统——库存管理子系统的分析与设计

ERP教学系统——库存管理子系统的分析与设计

库存管理子系统的分析与设计库存管理子系统的分析与设计目录引言 (1)1.绪论 (2)1.1 ERP简介 (2)1.2 ERP教学系统概述 (3)1.2.1 ERP教学系统引入背景 (3)1.2.2 ERP教学系统引入意义 (3)1.2.3 ERP教学系统需考虑的问题[20] (3)1.3 研究内容和意义 (3)1.4开发小组情况介绍 (4)1.4.1小组介绍 (4)1.4.2研究方法和技术支持 (4)2.库存管理 (5)2.1库存管理概述 (5)2.2库存的分类 (5)2.3库存管理作业 (5)2.4库存盘点概述 (6)3.系统分析 (7)3.1系统目标 (7)3.2需求分析 (7)3.3业务流程分析 (7)3.3.1 系统基本业务流程 (7)3.3.2 系统各业务流程 (8)3.4系统数据流程分析 (9)3.4.1系统开发小组总数据流程图 (9)3.4.2 库存管理子系统顶层数据流程图 (10)3.4.3库存管理子系统一级数据流程图 (11)3.4.4库存管理子系统二级数据流程图 (12)3.4.5库存管理子系统三级数据流程图 (15)3.5数据字典 (22)3.5.1数据项定义 (22)3.5.2数据流定义 (26)库存管理子系统的分析与设计3.5.3数据处理逻辑定义 (31)3.5.4数据存储的定义 (34)3.5.5外部实体的定义 (35)4.系统设计 (37)4.1系统功能模块设计 (37)4.2系统数据库设计 (39)4.2.1数据库概念结构设计 (39)4.2.2数据库逻辑结构设计 (43)4.3输出输入设计 (45)5.系统实现 (47)5.1系统主要界面 (47)6.库存管理子系统设计总结与思考 (53)致谢 (54)参考文献 (55)引言制造业是我国国民经济的物质基础和产业主体。

新环境下,传统制造业主旨机构和业务流程的缺陷,使企业已经不能负荷高强度的竞争。

企业纷纷转向信息化升级,即借助于先进的信息化系统并结合先进的管理模式、管理方法来改善企业的组织结构和业务流程,为企业带来新的生机。

管理信息系统课程设计程序代码完整版

管理信息系统课程设计程序代码完整版

1、Program.csusing System;using System.Collections.Generic;using System.Windows.Forms;using xyq20091204;using System.Data.SqlClient;static class Program{///<summary>///应用程序的主入口点。

///</summary>[STAThread]static void Main(){Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);Application.Run(new用户登录());if (SQL_Class.LoginState == 1)data.data.ConnStr = "Data Source=CAE47;Initial Catalog=xyq20091204;Integrated Security=True";Application.Run(new供应商管理信息系统());}}Property_Class.csusing System;using System.Collections.Generic;using System.Text;using ponentModel;namespace xyq20091204{class Property_Class{private string Id;private string Manager;private string Tel;private string Email;private string Addr;[CategoryAttribute("供应商基本信息"), DescriptionAttribute("显示供应商编号")] public string供应商编号{get { return Id; }set { Id = value; }}[CategoryAttribute("供应商基本信息"), DescriptionAttribute("显示负责人")] public string负责人{get { return Manager; }set { Manager = value; }}[CategoryAttribute("供应商基本信息"), DescriptionAttribute("显示联系电话")] public string联系电话{get { return Tel; }set { Tel = value; }}[CategoryAttribute("供应商基本信息"), DescriptionAttribute("显示电子邮箱")] public string电子邮箱{get { return Email; }set { Email = value; }}[CategoryAttribute("供应商基本信息"), DescriptionAttribute("显示通讯地址")] public string通讯地址{get { return Addr; }set { Addr = value; }}}}2、SQL_Class.csusing System;using System.Collections.Generic;using System.Text;using System.Data;using System.Data.SqlClient;namespace xyq20091204{public class SQL_Class{public static int LoginState = 0;public static SqlConnection xyq_con;public static string xyq_sqlcon = "Data Source=CAE47;InitialCatalog=xyq20091204;Integrated Security=True";public static SqlConnection getcon(){xyq_con = new SqlConnection(xyq_sqlcon); //用SqlConnection对象与指定的数据库相连接 xyq_con.Open(); //打开数据库连接return xyq_con; //返回SqlConnection对象的信息}public void con_close(){if (xyq_con.State == ConnectionState.Open) //判断是否打开与数据库的连接{xyq_con.Close(); //关闭数据库的连接xyq_con.Dispose(); //释放xyq_con变量的所用空间}}public SqlDataReader getcom(string SQLstr){getcon(); //打开与数据库的连接SqlCommand xyq_com = xyq_con.CreateCommand(); //创建一个SqlCommand对象,用于执行SQL语句xyq_mandText = SQLstr; //获取指定的SQL语句SqlDataReader xyq_read = xyq_com.ExecuteReader(); //执行SQL语句,生成一个SqlDataReader结果return xyq_read; //返回读取结果}public void getsqlcom(string SQLstr){getcon(); //打开与数据库的连接SqlCommand SQLcom = new SqlCommand(SQLstr, xyq_con);//创建一个SqlCommand对象,用于执行SQL语句SQLcom.ExecuteNonQuery(); //执行SQL语句SQLcom.Dispose(); //释放SQLcom变量的所有空间con_close(); //调用con_close()方法,关闭与数据库的连接}public DataSet getDataSet(string SQLstr, string tableName){getcon(); //打开与数据库的连接SqlDataAdapter SQLda = new SqlDataAdapter(SQLstr,xyq_con);//创建SqlDataAdapter对象,以读取数据库中的信息DataSet xyq_DataSet = new DataSet(); //创建dataset对象SQLda.Fill(xyq_DataSet, tableName); //把读取的数据写入指定的数据表中return xyq_DataSet; //返回DataSet对象的信息}}}3、供应商管理信息系统.csusing System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using xyq20091204;using System.Collections;namespace xyq20091204{public partial class供应商管理信息系统 : Form{SQL_Class SQLClass = new SQL_Class(); //创建一个SQL_Class对象SQLClass,用以调用SQL_Class类中的函数TreeNode SelectNode = new TreeNode(); //创建一个TreeNode对象SelectNode,用以存储被选中的树节点///<summary>///定义一个全局变量,表示左侧的树结构选择的是哪一个///</summary>private string _treeNode = "";public供应商管理信息系统(){InitializeComponent();}private void供应商管理信息系统_Load(object sender, EventArgs e){TreeNode rootnode = new TreeNode("供应商列表", 1, 2); //创建一个TreeNode对象rootnodetreeView1.Nodes.Add(rootnode); //把创建的rootnode添加为treeview1的根节点}private void UpdateTreeview1() // 加载treeview1根节点下面的子节点{treeView1.Nodes[0].Nodes.Clear(); //把根节点下面的子节点全部清除listView1.Items.Clear(); //清除listView1中的数据//创建一个DataSet对象,并把SQL的查询结果赋值给DSetDataSet DSet = SQLClass.getDataSet("select * from 供应商类别表","供应商类别表");DataTable dt = DSet.Tables["供应商类别表"]; //创建一个DataTable对象if (dt.Rows.Count > 0) //如果查询结果表中有数据for (int i = 0; i < dt.Rows.Count; i++){TreeNode node = new TreeNode(dt.Rows[i]["供应商类别名称"].ToString(), 1, 2);//创建一个TreeNode对象,并对node的属性进行赋值 = dt.Rows[i]["供应商类别编号"].ToString();node.Tag = "供应商类别";treeView1.Nodes[0].Nodes.Add(node); //把node添加到根节点上DataSet DS = SQLClass.getDataSet("select 供应商编号, 供应商名称from 供应商信息表where 供应商类别='"+dt.Rows[i][1].ToString ()+"'", "供应商信息表");DataTable dt1 = DS.Tables["供应商信息表"]; //创建一个DataTable对象if (dt1.Rows.Count > 0)for (int j = 0; j < dt1.Rows.Count; j++){TreeNode node1 = new TreeNode(dt1.Rows[j][1].ToString(), 1, 1);//创建一个TreeNode对象,并对node的属性进行赋值 = dt1.Rows[j][0].ToString();node1.Tag = "供应商";node.Nodes.Add(node1);}} SQLClass.con_close(); //关闭数据库连接,释放资源}private void UpdateListview1(string sql) //加载listview1中的数据,其中sql参数表示传递的SQL语句。

erp课程设计源代码

erp课程设计源代码

erp课程设计源代码一、教学目标本课程的教学目标是让学生掌握ERP(企业资源计划)的基本概念、核心模块及其运作流程。

具体分为以下三个维度:1.知识目标:学生能理解ERP的起源、发展历程、基本原理和主要模块,如采购、生产、销售、财务等。

2.技能目标:学生能够熟练操作ERP软件,进行日常的业务处理,如创建采购订单、生产计划、销售订单等。

3.情感态度价值观目标:学生认识到ERP对企业的重要性,提高对企业的责任感和使命感,培养团队合作精神和创新意识。

二、教学内容本课程的教学内容主要包括ERP的基本概念、发展历程、核心模块及其运作流程。

具体安排如下:1.第一章:ERP的基本概念和起源,介绍ERP的定义、发展背景及其在我国的应用现状。

2.第二章:ERP的核心模块,详细讲解采购、生产、销售、财务等模块的功能和相互关系。

3.第三章:ERP的运作流程,阐述ERP系统从需求分析、系统选型、实施到评价的整个过程。

4.第四章:ERP软件操作实践,指导学生动手操作ERP软件,巩固所学知识。

三、教学方法为了提高教学效果,本课程将采用多种教学方法相结合的方式,包括:1.讲授法:讲解ERP的基本概念、发展历程和运作流程。

2.案例分析法:分析实际案例,让学生了解ERP在企业中的应用和价值。

3.实验法:安排实验室实践环节,让学生动手操作ERP软件,增强实践能力。

4.讨论法:学生分组讨论,培养团队合作精神和创新意识。

四、教学资源为了支持教学内容和教学方法的实施,我们将准备以下教学资源:1.教材:选用权威、实用的ERP教材,为学生提供系统、全面的知识体系。

2.参考书:推荐学生阅读相关领域的经典著作,拓展知识面。

3.多媒体资料:制作精美的PPT,直观展示ERP的运作流程和关键知识点。

4.实验设备:保障实验室的正常运行,提供ERP软件及其操作指导。

5.在线资源:利用网络资源,为学生提供更多的学习资料和实践案例。

五、教学评估本课程的评估方式包括平时表现、作业、考试等多个方面,以确保评估的客观性和公正性。

库存管理工具的程序设计及代码示例

库存管理工具的程序设计及代码示例

库存管理工具的程序设计及代码示例一、需求分析在现代企业管理中,库存管理是一个重要的环节。

为了优化企业的库存管理,提高效率,降低成本,我们可以设计并开发一个库存管理工具。

该工具能够实时跟踪库存数量、管理供应商信息、自动生成采购订单等功能。

本文将详细介绍这个库存管理工具的程序设计及代码示例。

二、程序设计1. 数据库设计- 创建供应商表(Supplier):包括供应商编号、供应商名称、联系人、联系方式等字段。

- 创建产品表(Product):包括产品编号、产品名称、库存数量、进货价、销售价等字段。

- 创建采购订单表(PurchaseOrder):包括订单编号、供应商编号、产品编号、采购数量、总金额等字段。

2. 功能设计- 实时库存跟踪:通过查询产品表中的库存数量字段,可以实时获得库存情况。

当库存不足时,系统可以发出库存不足的警报。

- 供应商管理:可以对供应商信息进行增加、修改和删除操作,并能够查询供应商列表。

- 采购订单生成:当库存不足时,系统可自动根据库存数量和销售预测信息生成采购订单,并自动计算订单总金额。

3. 界面设计使用图形化界面(GUI)来实现库存管理工具,以便用户操作方便、直观。

界面应具备如下功能:- 显示实时库存数量和警报信息。

- 提供供应商管理界面,可实现供应商信息的增加、修改、删除、查询等操作。

- 提供产品管理界面,可实现产品信息的录入、修改、删除、查询等操作。

- 提供采购订单管理界面,可以查看、审核和生成采购订单。

三、代码示例以下是一个简单的代码示例,用于实现库存管理工具的供应商管理功能:```python# 导入所需库import tkinter as tkfrom tkinter import messagebox# 创建主窗口win = ()win.title("库存管理工具 - 供应商管理")win.geometry("400x300")# 添加供应商按钮回调函数def add_supplier():messagebox.showinfo("提示", "添加供应商功能正在开发中...")# 修改供应商按钮回调函数def edit_supplier():messagebox.showinfo("提示", "修改供应商功能正在开发中...")# 删除供应商按钮回调函数def delete_supplier():messagebox.showinfo("提示", "删除供应商功能正在开发中...")# 查询供应商按钮回调函数def query_supplier():messagebox.showinfo("提示", "查询供应商功能正在开发中...")# 添加按钮btn_add = tk.Button(win, text="添加供应商", command=add_supplier) btn_add.pack()# 修改按钮btn_edit = tk.Button(win, text="修改供应商", command=edit_supplier) btn_edit.pack()# 删除按钮btn_delete = tk.Button(win, text="删除供应商",command=delete_supplier)btn_delete.pack()# 查询按钮btn_query = tk.Button(win, text="查询供应商",command=query_supplier)btn_query.pack()# 运行窗口win.mainloop()```以上代码示例使用Python的tkinter库实现了一个简单的供应商管理界面。

用友ERP管理系统编码原则(范本)历史版本

用友ERP管理系统编码原则(范本)历史版本

用友ERP管理系统编码原则1目的因ERP系统的管理需要,为使公司内部运行的管理程序能够文件规范化、明晰化、统一化,使管理工作做到简洁化、数据化,以提高工作效率,特编写本原则。

2范围本编码原则规定了公司组织机构编码、职员编码、供应商编码、客户编码、存货编码等,适用于公司ERP3职责3.1ERP3.23.34③公司产品名称、规格等出现更改或增加。

⑵编码原则的修改由各归口管理部门提出,经审批后交ERP维护专员进行录入、修改和维护。

4.2编码原则修改、删除权限只限于ERP维护专员,不得给其他任何用户该权限。

4.3ERP维护专员不得任意修改、删除编码。

4.4各归口部门必须指定专人对相应编码的录入、维护工作,且必须按照本原则进行职员编码、客户编码、供应商编码、存货编码录入。

5.1本编码由阿拉伯数字、英文大写字母或者阿拉伯数字与英文大写字母结合表示。

5.2本编码每类别位数按需制定,但原则上不超过12位。

6本原则自2012年7月26日用友U8系统正式上线之日起执行。

7各类编码原则见附录。

编制:审核:批准:2012年6月30日附录1组织机构编码、职员编码(更新截止2012年6月30日止)1.1组织机构编码①组织机构编码示图。

③编写说明:本原则中的“部门”是按照企业核算的需要,在实际业务部门基础上构并的一个部门。

该部门可能是企业中实际的部门,也可能是几个部门为方便会计核算而构并的一个虚拟部门。

1.2职员编码②职员编码按组织机构编码顺序号编写,如有员工离职则该编号仍予以保留。

附录2客户编码、供应商编码(更新截止2012年6月30日止)2.1 客户、供应商编码示图。

2.22.3其中供应商编码包括其他类为:2.4其中客户包括其他类及国外类为:3.3包装物编码①包装物编码示图:②包装物分阶编码:3.5成品编码 ①成品编码示图:3.6低值易耗品分阶编码:3.7工程物资分阶编码:。

仓库管理系统-源代码 -VB编程毕业设计

仓库管理系统-源代码 -VB编程毕业设计

材料入库模块源代码如下:Private Sub Command1_Click()If Text1.Text <> "" And Text2.Text <> "" And DTPicker1.Value <> "" And Text4.Text <> "" And Text5.Text <> "" And DataCombo1.Text <> "" And Text7.Text <> "" ThenAdodc1.RefreshAdodc2.RecordSource = "select * from 库存材料清单where 材料号='" & Text1.Text & "'" Adodc2.RefreshIf Adodc2.Recordset.BOF Thenmsg$ = "确定要添加该记录吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "添加记录")If ans = vbOK ThenAdodc1.Recordset.AddNewAdodc1.Recordset.Fields(0) = Text1.TextAdodc1.Recordset.Fields(1) = Text2.TextAdodc1.Recordset.Fields(2) = CStr(DTPicker1.V alue)Adodc1.Recordset.Fields(3) = Text4.TextAdodc1.Recordset.Fields(4) = Text5.TextAdodc1.Recordset.Fields(5) = DataCombo1.TextAdodc1.Recordset.Fields(6) = Text7.TextAdodc1.Recordset.Fields(7) = Text8.TextAdodc1.Recordset.UpdateMsgBox ("保存成功!!*_*")End IfElse MsgBox "材料号不能重复,该材料号已存在!!", 48, "警告"End IfElse MsgBox "资料输入不全,请重新输入!!", 64, "提示"End IfText1.SetFocusText1.Text = ""Text2.Text = ""Text4.Text = ""Text5.Text = ""DataCombo1.Text = ""Text7.Text = ""Text8.Text = ""End SubPrivate Sub Command2_Click()Text1.Text = ""Text2.Text = ""Text4.Text = ""Text5.Text = ""DataCombo1.Text = ""Text7.Text = ""Text8.Text = ""End SubPrivate Sub Command3_Click()Unload MeEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;" ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc1.RecordSource = "库存材料清单"Adodc1.RefreshAdodc2.ConnectionString = adoAdodc3.ConnectionString = adoAdodc3.RecordSource = "gysxx"Adodc3.RefreshEnd SubPrivate Sub Text2_GotFocus()If Not Adodc1.Recordset.BOF ThenAdodc1.Recordset.MoveFirstWhile Not Adodc1.Recordset.EOFIf Adodc1.Recordset.Fields(0) = Text1.Text ThenMsgBox "该材料号已经存在,请重新输入!!", 48, "提示"Text1.Text = ""End IfAdodc1.Recordset.MoveNextWendEnd IfEnd SubPrivate Sub Text7_GotFocus()If Not Adodc3.Recordset.BOF ThenAdodc3.Recordset.MoveFirstWhile Not Adodc3.Recordset.EOFIf Adodc3.Recordset.Fields(0) = DataCombo1.Text ThenText7.Text = Adodc3.Recordset.Fields(1)End IfAdodc3.Recordset.MoveNextWendEnd IfEnd Sub库存管理模块源代码如下:Dim sql As StringPrivate Sub Command1_Click()If DataCombo1.Text = "" And DataCombo2.Text = "" And DataCombo3.Text = "" Then MsgBox "请在组合框中输入你要查询的内容!!", 64, "提示"ElseIf DataCombo1.Text = "" And DataCombo2.Text = "" And DataCombo3.Text <> "" Thensql = "select * from 库存材料清单where 供应商号= '" & DataCombo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCombo1.Text = "" And DataCombo2.Text <> "" And DataCombo3.Text = "" Thensql = "select * from 库存材料清单where 进货日期='" & DataCombo2.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCombo1.Text = "" And DataCombo2.Text <> "" And DataCombo3.Text <> "" Then sql = "select * from 库存材料清单where 进货日期='" & DataCombo2.Text & "' and 供应商号='" & DataCombo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCombo1.Text <> "" And DataCombo2.Text = "" And DataCombo3.Text = "" Thensql = "select * from 库存材料清单where 材料号='" & DataCombo1.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCombo1.Text <> "" And DataCombo2.Text = "" And DataCombo3.Text <> "" Then sql = "select * from 库存材料清单where 材料号='" & DataCombo1.Text & "' and 供应商号='" & DataCombo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCombo1.Text <> "" And DataCombo2.Text <> "" And DataCombo3.Text = "" Then sql = "select * from 库存材料清单where 材料号='" & DataCombo1.Text & "' and 进货日期='" & DataCombo2.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCombo1.Text <> "" And DataCombo2.Text <> "" And DataCombo3.Text <> "" Then sql = "select * from 库存材料清单where 材料号='" & DataCombo1.Text & "' and 进货日期='" & DataCombo2.Text & "' and 供应商号='" & DataCombo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshEnd IfIf Adodc1.Recordset.BOF ThenMsgBox "对不起,该库存不存在!!", 64, "提示"End IfEnd SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Command3_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCommand3.Caption = "锁定"MsgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCommand3.Caption = "修改"MsgBox "您进入锁定状态!"End IfEnd SubPrivate Sub Command4_Click()msg$ = "确定要删除该库存材料记录吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK ThenAdodc1.Recordset.DeleteAdodc1.Recordset.MoveNextEnd IfEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc1.RecordSource = "库存材料清单"Adodc1.RefreshAdodc2.ConnectionString = adoAdodc2.RecordSource = "库存材料清单"Adodc2.RefreshIf er_type <> 1 ThenCommand3.Enabled = FalseCommand4.Enabled = FalseEnd IfEnd Sub美容项目定义模块源代码如下:Private Sub Command1_Click()If Text1.Text <> "" And Text2.Text <> "" And Text3.Text <> "" ThenAdodc2.RecordSource = "select * from 美容项目定义表where 美容项目编号='" & Text1.Text & "'"Adodc2.RefreshIf Adodc2.Recordset.BOF ThenAdodc1.Recordset.AddNewAdodc1.Recordset.Fields(0) = Text1.TextAdodc1.Recordset.Fields(1) = Text2.TextAdodc1.Recordset.Fields(2) = Text3.TextAdodc1.Recordset.UpdateElseMsgBox "该美容项目编号已存在!!", 48, "警告"End IfElseMsgBox "资料输入不全,请重新输入!!", 64, "提示"End IfText1.Text = ""Text2.Text = ""Text3.Text = ""Text1.SetFocusEnd SubPrivate Sub Command2_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""End SubPrivate Sub Command3_Click()Unload MeEnd SubPrivate Sub Command4_Click()msg$ = "确定要删除该美容项目吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "删除记录") If ans = vbOK ThenAdodc1.Recordset.DeleteAdodc1.Recordset.MoveNextEnd IfEnd SubPrivate Sub Command5_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCommand5.Caption = "锁定"MsgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCommand5.Caption = "修改"MsgBox "您进入锁定状态!"End IfEnd SubPrivate Sub Text2_GotFocus()If Not Adodc1.Recordset.BOF ThenAdodc1.Recordset.MoveFirstWhile Not Adodc1.Recordset.EOFIf Adodc1.Recordset.Fields(0) = Text1.Text ThenMsgBox "该美容项目编号已经存在,请重新输入!!", 48, "提示"Text1.Text = ""End IfAdodc1.Recordset.MoveNextWendEnd IfEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc1.RecordSource = "美容项目定义表"Adodc1.RefreshAdodc2.ConnectionString = adoEnd Sub美容项目查询模块源代码如下:Private Sub Command1_Click()If DataCombo1.Text = "" ThenMsgBox ("输入不能为空!!")ElseAdodc2.RecordSource = "select * from 美容项目定义表where 美容项目名称='" & DataCombo1.Text & "'"Adodc2.RefreshDataGrid1.Columns(0).Width = 120XXDataGrid1.Columns(1).Width = 120XXDataGrid1.Columns(2).Width = 120XXEnd IfEnd SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc1.RecordSource = "美容项目定义表"Adodc1.RefreshAdodc2.ConnectionString = adoEnd Sub来车登记模块源代码如下:Dim sql As StringPrivate Sub Command1_Click()If DTPicker1.Value <> "" And Text2.Text <> "" And Text3.Text <> "" And Text4.Text <> "" And DataCombo1.Text <> "" Thenmsg$ = "确定要添加该登记吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "添加登记")If ans = vbOK ThenAdodc1.RefreshAdodc1.Recordset.AddNewAdodc1.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc1.Recordset.Fields(1) = Text2.TextAdodc1.Recordset.Fields(2) = Text3.TextAdodc1.Recordset.Fields(3) = Text4.TextAdodc1.Recordset.Fields(4) = DataCombo1.TextAdodc1.Recordset.Fields(5) = Text5.TextAdodc1.Recordset.UpdateMsgBox ("成功登记!!~-~")ElseExit SubEnd IfDim sql As Stringsql = "select * from 车辆基本信息表where 车牌号码='" & Text2.Text & "'"Adodc3.RecordSource = sqlAdodc3.RefreshIf Adodc3.Recordset.BOF ThenAdodc2.RefreshAdodc2.Recordset.AddNewAdodc2.Recordset.Fields(0) = Text2.TextAdodc2.Recordset.Fields(1) = Text3.TextAdodc2.Recordset.Fields(2) = Text4.TextAdodc2.Recordset.Fields(3) = Text5.TextAdodc2.Recordset.UpdateEnd IfElseMsgBox "资料输入不全,请重新输入!!", 64, "提示"End IfDTPicker1.SetFocusText2.Text = ""Text3.Text = ""Text4.Text = ""DataCombo1.Text = ""Text5.Text = ""End SubPrivate Sub Command2_Click()Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""DataCombo1.Text = ""End SubPrivate Sub Command3_Click()Unload MeEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;" ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc1.RecordSource = "来车登记表"Adodc1.RefreshAdodc2.ConnectionString = adoAdodc2.RecordSource = "车辆基本信息表"Adodc2.RefreshAdodc3.ConnectionString = adoAdodc4.ConnectionString = adoAdodc4.RecordSource = "bmxx"Adodc4.RefreshEnd Sub车辆基本信息管理模块源代码如下:Private Sub Command1_Click()查询车辆基本信息.ShowEnd SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Command3_Click()msg$ = "确定要删除该项信息吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK ThenAdodc1.Recordset.DeleteAdodc1.Recordset.MoveNextEnd IfEnd SubPrivate Sub Command4_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCommand4.Caption = "锁定"MsgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCommand4.Caption = "修改"MsgBox "您进入锁定状态!"End IfEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc1.RecordSource = "车辆基本信息表"Adodc1.RefreshIf er_type <> 1 ThenCommand3.Enabled = FalseCommand4.Enabled = FalseEnd IfEnd Sub车辆美容信息管理模块源代码如下:Private Sub Command1_Click()Dim sum1, x, z As CurrencyDim y, n1, l, l1 As Longsum1 = 0n1 = 0l1 = 0If CStr(DTPicker1.Value) <> "" And Text2.Text <> "" And Text3.Text <> "" And DataCombo1.Text <> "" And DataCombo5.Text <> "" And DataCombo6.Text <> "" Then'修改库存材料清单Dim q, q1 As Longq1 = 0If Not Adodc5.Recordset.BOF ThenAdodc5.RefreshAdodc5.Recordset.MoveFirstWhile Not Adodc5.Recordset.EOFIf Adodc5.Recordset.Fields(0) = DataCombo5.Text And Adodc5.Recordset.Fields(1) = DataCombo6.Text Thenq1 = 1If Adodc5.Recordset.Fields(4) < CLng(Text3.Text) ThenMsgBox "这种材料的库存数量不够!!", 48, "警告"DataCombo5.Text = ""DataCombo6.Text = ""Text2.Text = ""Text3.Text = ""Exit SubElseq = Adodc5.Recordset.Fields(4)Adodc5.Recordset.Fields(4) = q - CLng(Text3.Text)Adodc5.Recordset.UpdateEnd IfEnd IfAdodc5.Recordset.MoveNextWendIf q1 = 0 ThenMsgBox "库存中没有这种材料!!", 48, "警告"End If'修改库存材料清单完毕End IfIf q1 = 1 ThenAdodc6.RefreshIf Not Adodc6.Recordset.BOF ThenAdodc6.Recordset.MoveFirstWhile Not Adodc6.Recordset.EOF '查找一下车辆用料信息表中是否存在这种材料If Adodc6.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc6.Recordset.Fields(1) = DataCombo1.Text And Adodc6.Recordset.Fields(2) = DataCombo5.Text And Adodc6.Recordset.Fields(3) = DataCombo6.Text And Adodc6.Recordset.Fields(4) = Text2.Text Thenl = Adodc6.Recordset.Fields(5)l1 = 1Adodc6.Recordset.Fields(5) = l + CLng(Text3.Text) '如果存在,只修改数量Adodc6.Recordset.UpdateEnd IfAdodc6.Recordset.MoveNextWendEnd IfIf l1 = 0 Then '如果不存在,则在车辆用料信息表中添加新记录Adodc6.Recordset.AddNewAdodc6.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc6.Recordset.Fields(1) = DataCombo1.TextAdodc6.Recordset.Fields(2) = DataCombo5.TextAdodc6.Recordset.Fields(3) = DataCombo6.TextAdodc6.Recordset.Fields(4) = Text2.TextAdodc6.Recordset.Fields(5) = Text3.TextAdodc6.Recordset.UpdateAdodc6.RefreshEnd IfIf Not Adodc9.Recordset.BOF ThenAdodc9.Refresh '在车辆消费信息表中添加该车辆的材料费Adodc9.Recordset.MoveFirstWhile Not Adodc9.Recordset.EOFIf Adodc9.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc9.Recordset.Fields(1) = DataCombo1.Text Thenn1 = 1 '如果车辆消费信息表中存在当天该车的记录时Adodc6.Refresh '在车辆用料信息表中,计算该车的材料费Adodc6.Recordset.MoveFirstWhile Not Adodc6.Recordset.EOFIf Adodc6.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc6.Recordset.Fields(1) = DataCombo1.Text Thenx = Adodc6.Recordset.Fields(4)y = Adodc6.Recordset.Fields(5)z = x * ysum1 = sum1 + zEnd IfAdodc6.Recordset.MoveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCombo1.TextAdodc9.Recordset.Fields(3) = sum1Adodc9.Recordset.Fields(4) = sum1 + Adodc9.Recordset.Fields(2)Adodc9.Recordset.UpdateEnd IfAdodc9.Recordset.MoveNextWendEnd IfIf n1 = 0 Then '车辆消费信息表中无该车辆记录时Adodc9.Recordset.AddNew '向车辆消费信息表中添加材料费记录Adodc6.Refresh '车辆用料信息表Adodc6.Recordset.MoveFirstWhile Not Adodc6.Recordset.EOFIf Adodc6.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc6.Recordset.Fields(1) = DataCombo1.Text Thenx = Adodc6.Recordset.Fields(4)y = Adodc6.Recordset.Fields(5)z = x * ysum1 = sum1 + zEnd IfAdodc6.Recordset.MoveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCombo1.TextAdodc9.Recordset.Fields(3) = sum1Adodc9.Recordset.Fields(4) = sum1Adodc9.Recordset.Update '保存记录End IfEnd IfElseMsgBox "资料输入不全,请重新输入!!", 64, "提示"End IfDataCombo5.Text = ""DataCombo6.Text = ""Text2.Text = ""Text3.Text = ""DataCombo5.SetFocusEnd SubPrivate Sub Command2_Click()DataCombo1.Text = ""DataCombo2.Text = ""DataCombo3.Text = ""DataCombo4.Text = ""Unload MeEnd SubPrivate Sub Command3_Click()修改美容项目.ShowEnd SubPrivate Sub Command4_Click()Dim sum, x, z As CurrencyDim y, n As Longsum = 0 n = 0If DTPicker1.Value <> "" And DataCombo1.Text <> "" And DataCombo2.Text <> "" And DataCombo3.Text <> "" And DataCombo4.Text <> "" ThenAdodc4.Refresh '车辆美容信息登记表Adodc4.Recordset.AddNewAdodc4.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc4.Recordset.Fields(1) = DataCombo1.TextAdodc4.Recordset.Fields(2) = DataCombo4.TextAdodc4.Recordset.Fields(3) = DataCombo2.TextAdodc4.Recordset.Fields(4) = DataCombo3.TextAdodc4.Recordset.UpdateAdodc9.RefreshIf Not Adodc9.Recordset.BOF Then '判断一下表是否为空表Adodc9.RefreshAdodc9.Recordset.MoveFirstWhile Not Adodc9.Recordset.EOFIf Adodc9.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc9.Recordset.Fields(1) = DataCombo1.Text Thenn = 1Adodc4.RefreshAdodc4.Recordset.MoveFirstWhile Not Adodc4.Recordset.EOFIf Adodc4.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc4.Recordset.Fields(1) = DataCombo1.Text Thensum = sum + Adodc4.Recordset.Fields(4)End IfAdodc4.Recordset.MoveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCombo1.TextAdodc9.Recordset.Fields(2) = sumAdodc9.Recordset.Fields(4) = sum + Adodc9.Recordset.Fields(3)Adodc9.Recordset.Update '保存End IfAdodc9.Recordset.MoveNextWendEnd IfIf n = 0 ThenAdodc9.Recordset.AddNew '向车辆消费信息表中添加美容项目消费Adodc4.RefreshAdodc4.Recordset.MoveFirstWhile Not Adodc4.Recordset.EOFIf Adodc4.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc4.Recordset.Fields(1) = DataCombo1.Text Thensum = sum + Adodc4.Recordset.Fields(4)End IfAdodc4.Recordset.MoveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCombo1.TextAdodc9.Recordset.Fields(2) = sumAdodc9.Recordset.Fields(4) = sumAdodc9.Recordset.Update '保存End IfElse MsgBox "资料输入不全,请重新输入!!", 64, "提示"End IfDataCombo2.Text = ""DataCombo3.Text = ""DataGrid1.Columns(0).Width = 1500DataGrid1.Columns(1).Width = 1500DataCombo2.SetFocusEnd SubPrivate Sub Command5_Click()修改用料.ShowEnd SubPrivate Sub Command6_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCommand6.Caption = "锁定"MsgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCommand6.Caption = "修改"MsgBox "您进入锁定状态!"End IfEnd SubPrivate Sub DataCombo2_GotFocus()Adodc7.RecordSource = "select 美容项目,价格from 车辆美容信息登记表where 日期='" & CStr(DTPicker1.Value) & "' and 车牌号码='" & DataCombo1.Text & "'"Adodc7.RefreshEnd SubPrivate Sub DataCombo5_GotFocus()Adodc8.RecordSource = "select 材料号,材料名称,单价,数量from 车辆用料信息表where 日期='" & CStr(DTPicker1.Value) & "' and 车牌号码='" & DataCombo1.Text & "'"Adodc8.RefreshDataGrid2.Columns(0).Width = 1000DataGrid2.Columns(1).Width = 1000DataGrid2.Columns(2).Width = 1000DataGrid2.Columns(3).Width = 1000End SubPrivate Sub DataCombo3_GotFocus()'查询美容项目定义表,美容价格随着美容项目的选择而变If Not Adodc2.Recordset.BOF ThenAdodc2.Recordset.MoveFirstWhile Not Adodc2.Recordset.EOFIf Adodc2.Recordset.Fields(1) = DataCombo2.Text ThenDataCombo3.Text = Adodc2.Recordset.Fields(2)End IfAdodc2.Recordset.MoveNextWendEnd IfEnd SubPrivate Sub DataCombo6_GotFocus()If Not Adodc5.Recordset.BOF Then '根据填入的材料号,材料名称会自动出现Adodc5.Recordset.MoveFirstWhile Not Adodc5.Recordset.EOFIf Adodc5.Recordset.Fields(0) = DataCombo5.Text ThenDataCombo6.Text = Adodc5.Recordset.Fields(1)End IfAdodc5.Recordset.MoveNextWendEnd IfEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc1.RecordSource = "车辆基本信息表"Adodc1.RefreshAdodc2.ConnectionString = adoAdodc2.RecordSource = "美容项目定义表"Adodc2.RefreshAdodc3.ConnectionString = adoAdodc3.RecordSource = "bmxx"Adodc3.RefreshAdodc4.ConnectionString = adoAdodc4.RecordSource = "车辆美容信息登记表"Adodc4.RefreshAdodc5.ConnectionString = adoAdodc5.RecordSource = "库存材料清单"Adodc5.RefreshAdodc6.ConnectionString = adoAdodc6.RecordSource = "车辆用料信息表"Adodc6.RefreshAdodc9.ConnectionString = adoAdodc9.RecordSource = "车辆消费信息表"Adodc9.RefreshIf er_type <> 1 ThenCommand3.Enabled = FalseCommand5.Enabled = FalseEnd IfEnd Sub修改美容项目模块源代码如下:Private Sub Command1_Click()Dim l, x, y As Longl = 0Adodc2.Refresh '在美容项目登记表中删除项目Adodc2.Recordset.MoveFirstWhile Not Adodc2.Recordset.EOFIf Adodc2.Recordset.Fields(0) = Text1.Text And Adodc2.Recordset.Fields(1) = DataCombo1.Text And Adodc2.Recordset.Fields(2) = DataCombo2.Text And Adodc2.Recordset.Fields(3) = DataCombo3.Text And Adodc2.Recordset.Fields(4) = DataCombo4.Text Thenl = 1y = Adodc2.Recordset.Fields(4)msg$ = "确定要删除该美容项目吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK ThenAdodc2.Recordset.DeleteAdodc2.Recordset.MoveNextAdodc2.Recordset.UpdateAdodc2.RefreshEnd IfDataGrid1.Columns(0).Width = 120XXDataGrid1.Columns(1).Width = 120XXDataGrid1.Columns(2).Width = 120XXDataGrid1.Columns(3).Width = 120XXDataGrid1.Columns(4).Width = 120XXEnd IfAdodc2.Recordset.MoveNextWendIf l = 0 Then '要删除的项目不存在时MsgBox ("数据库中没有您要删除的项目!!")End IfAdodc6.Refresh '修改车辆消费信息表中的人工费合计和总金额Adodc6.Recordset.MoveFirstWhile Not Adodc6.Recordset.EOFIf Adodc6.Recordset.Fields(0) = Text1.Text And Adodc6.Recordset.Fields(1) = DataCombo1.Text Thenx = Adodc6.Recordset.Fields(2)Adodc6.Recordset.Fields(2) = x - yAdodc6.Recordset.Fields(4) = Adodc6.Recordset.Fields(2) + Adodc6.Recordset.Fields(3)Adodc6.Recordset.UpdateEnd IfAdodc6.Recordset.MoveNextWendDataCombo2.Text = ""DataCombo3.Text = ""DataCombo4.Text = ""DataCombo2.SetFocusEnd SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Command3_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCommand3.Caption = "锁定"MsgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCommand3.Caption = "修改"MsgBox "您进入锁定状态!"End IfEnd SubPrivate Sub DataCombo2_GotFocus()Adodc1.RecordSource = "select * from 车辆美容信息登记表where 日期='" & Text1.Text & "' and 车牌号码='" & DataCombo1.Text & "'"Adodc1.RefreshEnd SubPrivate Sub Form_Load()Dim ado As String, mpath As Stringmpath = App.pathIf Right(mpath, 1) <> "\" Then mpath = mpath + "\"ado = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + mpath + "database.mdb"Adodc1.ConnectionString = adoAdodc2.ConnectionString = adoAdodc2.RecordSource = "车辆美容信息登记表"Adodc2.RefreshAdodc3.ConnectionString = adoAdodc3.RecordSource = "车辆基本信息表"Adodc3.RefreshAdodc5.ConnectionString = adoAdodc5.RecordSource = "美容项目定义表"Adodc5.RefreshAdodc6.ConnectionString = adoAdodc6.RecordSource = "车辆消费信息表"Adodc6.Refresh'Text1.SetFocusEnd Sub修改用料模块源代码如下:Private Sub Command1_Click()Dim l, x, y, z, m, l1 As Longl = 0l1 = 0Adodc3.Refresh '在车辆用料信息表中删除信息If Not Adodc3.Recordset.BOF ThenAdodc3.Recordset.MoveFirstWhile Not Adodc3.Recordset.EOFIf Adodc3.Recordset.Fields(0) = Text1.Text And Adodc3.Recordset.Fields(1) = DataCombo1.Text And Adodc3.Recordset.Fields(2) = DataCombo2.Text And Adodc3.Recordset.Fields(3) = DataCombo3.Text And Adodc3.Recordset.Fields(4) = Text2.Text Thenl = 1z = Adodc3.Recordset.Fields(5)m = z - CLng(Text3.Text)If m > 0 Thenmsg$ = "确定要修改该用料信息吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "修改记录")If ans = vbOK Thenl1 = 1Adodc3.Recordset.Fields(5) = mAdodc3.Recordset.UpdateAdodc3.Refreshy = Adodc3.Recordset.Fields(4) * CLng(Text3.Text)End IfElseIf m = 0 Thenmsg$ = "确定要删除该用料信息吗?"ans = MsgBox(msg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK Thenl1 = 1y = Adodc3.Recordset.Fields(4) * CLng(Text3.Text)Adodc3.Recordset.DeleteAdodc3.Recordset.MoveNextAdodc3.RefreshEnd IfElseIf m < 0 ThenMsgBox ("您要删除的数量大于该车实际用量!!")End IfDataGrid1.Columns(0).Width = 120XXDataGrid1.Columns(1).Width = 120XXDataGrid1.Columns(2).Width = 120XXDataGrid1.Columns(3).Width = 120XXDataGrid1.Columns(4).Width = 120XXDataGrid1.Columns(5).Width = 120XXIf l1 = 1 ThenAdodc4.Refresh '修改车辆消费信息表中的材料费合计和总金额If Not Adodc4.Recordset.BOF ThenAdodc4.Recordset.MoveFirstWhile Not Adodc4.Recordset.EOFIf Adodc4.Recordset.Fields(0) = Text1.Text And Adodc4.Recordset.Fields(1) = DataCombo1.Text Thenx = Adodc4.Recordset.Fields(3)Adodc4.Recordset.Fields(3) = x - yAdodc4.Recordset.Fields(4) = Adodc4.Recordset.Fields(2) + Adodc4.Recordset.Fields(3)Adodc4.Recordset.UpdateEnd IfAdodc4.Recordset.MoveNextWendEnd IfAdodc2.Refresh '修改库存材料清单If Not Adodc2.Recordset.BOF ThenAdodc2.Recordset.MoveFirstWhile Not Adodc2.Recordset.EOFIf Adodc2.Recordset.Fields(0) = DataCombo2.Text And Adodc2.Recordset.Fields(1) = DataCombo3.Text ThenAdodc2.Recordset.Fields(4) = Adodc2.Recordset.Fields(4) + CLng(Text3.Text)Adodc2.Recordset.UpdateEnd IfAdodc2.Recordset.MoveNextWendEnd If '修改库存材料清单完毕End IfDataCombo2.Text = ""DataCombo3.Text = ""Text2.Text = ""Text3.Text = ""DataCombo2.SetFocusExit SubEnd IfAdodc3.Recordset.MoveNextWendEnd IfIf l = 0 Then '要删除的项目不存在时。

ERP课程设计报告书--库存管理系统

ERP课程设计报告书--库存管理系统

摘要计算机作为一种高效能的管理工具,在现代的企业管理中发挥了极其重要的作用。

进销存是当前重要的商业经营形式之一。

本系统基于N/S架构,前台应用程序界面采用Eclipse开发,系统的后台数据库则是采用PHP结合MYSQL作为开发工具。

采用本系统使企业通过局域网来管理业务,企业内部的经营能获得是实时,准确的管理信息。

改变了以往人工管理的灵活性差,误差多,信息前后不一致等很多方面的不足,并且为企业的准确决策提供了依据.本文首先介绍了一些理论知识,其次,比较详细地介绍了对系统的功能分析和模块设计及相关基于数据库的访问方法,将数据库技术与 PHP技术结合起来;然后,介绍系统的详细设计:包括各个模块的主要功能、使用方法和设计中的一些非常重要的代码;最后阐述了系统存在的问题和不足,以便于将来更好地进行改进。

本文的目的是通过调研、分析、设计和实施,完成的开发;通过对往来数据高效、自动的处理,运用WEB技术将系统的各个部分有机地结合在一起,实现数据共享,提高往来管理的效率。

关键字: 进销存;数据库;系统分析;系统设计目录前言----------------------------------------------------------------1 第一章技术和平台的介绍---------------------------------------------2 1. B/S技术--------------------------------------------------------2 1.1 B/S 的历史-----------------------------------------------------21.2 B/S 的特点-----------------------------------------------------22. MYSQL技术------------------------------------------------------33. ECLIPSE 技术平台------------------------------------------------3 3.1 ECLIPSE的历史--------------------------------------------------3 3.2 ECLIPSE的基本概念----------------------------------------------3 第二章系统需求分析------------------------------------------------41. 需求背景--------------------------------------------------------42. 目标分析--------------------------------------------------------6 3.用户工作流程----------------------------------------------------6 4.用户业务流程分析------------------------------------------------6 5.系统的功能结构图-------------------------------------------------7 6.系统用例图设计---------------------------------------------------7 第三章数据库设计----------------------------------------------------91. 系统E-R模型图---------------------------------------------------92. 系统数据字典----------------------------------------------------10 第四章系统设计与实现-----------------------------------------------121.系统设计思想-----------------------------------------------------122.系统设计原则-----------------------------------------------------123.业务流程分析-----------------------------------------------------124.模块功能界面设计-------------------------------------------------13 4.1 系统登录模块---------------------------------------------------13 4.2 管理菜单-------------------------------------------------------144.3 进出货模块-----------------------------------------------------15 4.4 库存信息查询---------------------------------------------------16 4.5 库存余量报警---------------------------------------------------17 第五章数据库分析---------------------------------------------------20 1.MYSQL简单介绍---------------------------------------------------20 结论---------------------------------------------------------------19 参考文献-----------------------------------------------------------21 附录(程序代码)---------------------------------------------------22前言随着中国市场经济的日趋成熟,中国企业面对的竞争压力也越来越大,企业要想生存、发展,要想在激烈的市场竞争中立于不败之地,没有现代化的管理是万万不行的,进销存系统的全面自动化则是其中极其重要的部分。

ERP课程设计代码

ERP课程设计代码

ERP课程设计代码一、教学目标本节课的教学目标是让学生掌握ERP(企业资源计划)的基本概念、核心模块及其应用。

具体来说,知识目标包括:了解ERP的定义、发展历程、核心思想及其在企业管理中的重要作用;掌握ERP系统的常见模块,如销售管理、采购管理、库存管理、财务管理 etc.;理解ERP系统的实施过程和注意事项。

技能目标则要求学生能够运用ERP知识分析企业问题,提出合理的解决方案,并能够操作ERP软件进行基本的数据录入和管理。

情感态度价值观目标则是培养学生对ERP技术的兴趣,认识到ERP在提高企业效率、降低成本方面的价值,以及培养学生的团队协作能力和创新思维。

二、教学内容本节课的教学内容主要包括ERP的基本概念、核心模块及其应用。

首先,介绍ERP的定义和发展历程,让学生了解ERP的起源和演变。

然后,详细讲解ERP系统的核心模块,如销售管理、采购管理、库存管理、财务管理 etc.,并通过实例展示各模块在实际企业运营中的应用。

接下来,介绍ERP系统的实施过程和注意事项,让学生了解如何成功实施ERP系统。

最后,结合实际案例,让学生运用ERP知识分析和解决企业问题。

三、教学方法为了提高学生的学习兴趣和主动性,本节课将采用多种教学方法。

首先,采用讲授法,系统地传授ERP的基本概念和核心模块。

其次,通过案例分析法,让学生结合实际案例深入理解ERP系统的应用。

再次,运用讨论法,鼓励学生积极参与课堂讨论,分享自己的看法和经验。

最后,安排实验环节,让学生动手操作ERP软件,巩固所学知识。

四、教学资源为了支持教学内容和教学方法的实施,我们将选择和准备以下教学资源。

首先,教材《企业资源计划(ERP)导论》,作为学生学习的基础资料。

其次,收集相关的参考书籍和学术论文,为学生提供更多的学习资源。

再次,制作多媒体教学课件,通过图片、视频等形式生动展示ERP知识。

最后,准备实验设备,如计算机、ERP软件等,让学生能够亲自动手操作,提高实际操作能力。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

主界面程序using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU;namespace SJZU.SWEIMS.GUI.SWEIMS{public partial class Frm_Main: Form{public Frm_Main(){InitializeComponent();}private void Frm_Main_Load(object sender,EventArgs e){toolStripStatusLabel6.Text= DateTime.Now.ToString();}private void查询分析ToolStripMenuItem3_Click(object sender, EventArgs e){Frm_Warehouse_Query frm_Warehouse_Query= newFrm_Warehouse_Query();frm_Warehouse_Query.ShowDialog();}private void添加仓库信息ToolStripMenuItem_Click(object sender, EventArgs e){Frm_Warehouse_Add frm_Warehouse_Add= newFrm_Warehouse_Add();frm_Warehouse_Add.ShowDialog();}private void修改仓库信息ToolStripMenuItem_Click(object sender, EventArgs e){Frm_Warehouse_Update frm_Warehouse_Update= newFrm_Warehouse_Update();frm_Warehouse_Update.ShowDialog();}private void删除仓库信息ToolStripMenuItem_Click(object sender, EventArgs e){Frm_Warehouse_Delete frm_Warehouse_Delete= newFrm_Warehouse_Delete();frm_Warehouse_Delete.ShowDialog();}}}仓库信息添加界面using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU.SWEIMS.BusinessModel;using SJZU.SWEIMS.BusinessLogic;namespace SJZU.SWEIMS.GUI.SWEIMS{public partial class Frm_Warehouse_Add: Form{public Frm_Warehouse_Add(){InitializeComponent();}private void Frm_Warehouse_Add_Load(object sender,EventArgs e){}//添加按钮事件private void btnAdd_Click(object sender,EventArgs e){if (string.IsNullOrEmpty(txtWarehouseCode.Text.Trim())){MessageBox.Show("请将数据完整输入!", "提示", MessageBoxButtons.OK);}else{WarehouseManage warehouseManage= new WarehouseManage();WarehouseTable warehouseTable= new WarehouseTable();warehouseTable.WarehouseCode=(string)txtWarehouseCode.Text;warehouseTable.WarehouseName=(string)txtWarehouseName.Text;warehouseTable.Property= (string)txtProperty.Text;warehouseTable.Department=(string)txtDepartment.Text;warehouseTable.Address= (string)txtAddress.Text;warehouseTable.Tel= (string)txtTel.Text;warehouseTable.Director= (string)txtDirector.Text;warehouseTable.CreateBy= (string)txtCreateBy.Text;warehouseTable.CreateTime=int.Parse(dtpCreateTime.Value.ToString("yyyyMMdd"));warehouseTable.Summary= (string)txtSummary.Text;int i =warehouseManage.AddWarehouseTable(warehouseTable);if (i > 0){MessageBox.Show("已插入" +i+"条记录!", "提示", MessageBoxButtons.OK);}else{MessageBox.Show("插入失败!","提示", MessageBoxButtons.OK);}}}//取消按钮事件private void btnCanel_Click(object sender,EventArgs e){txtWarehouseCode.Text= null;txtWarehouseName.Text= null;txtProperty.Text= null;txtDepartment.Text= null;txtAddress.Text= null;txtTel.Text=null;txtDirector.Text= null;txtCreateBy.Text= null;txtSummary.Text= null;}//退出按钮事件private void btnExit_Click(object sender,EventArgs e){this.Close();}}}仓库信息删除界面using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU.SWEIMS.BusinessLogic;namespace SJZU.SWEIMS.GUI.SWEIMS{public partial class Frm_Warehouse_Delete: Form{public Frm_Warehouse_Delete(){InitializeComponent();}//点开删除界面时,向下拉菜单中加载可选的仓库编号private void Frm_Warehouse_Delete_Load(object sender, EventArgs e){AddWarehouseCode();}private void AddWarehouseCode(){cboWarehouseCode.DataSource= new WarehouseManage().GetWarehouseCode();cboWarehouseCode.DisplayMember= "WAREHOUSECODE";}//查询选择的仓库信息private void btnQuery_Click(object sender,EventArgs e){if (string.IsNullOrEmpty(cboWarehouseCode.Text)){MessageBox.Show("请选择出库单编号!");}else{dgvWarehouseDetails.DataSource= new WarehouseManage().GetWarehouseTable(cboWarehouseCode.Text);}}//删除选中的仓库private void btnDelete_Click(object sender,EventArgs e){if (string.IsNullOrEmpty(cboWarehouseCode.Text)){MessageBox.Show("请选择出库单编号!");}else{int i = newWarehouseManage().DeleteWarehouse(cboWarehouseCode.Text);MessageBox.Show("已经删除"+i+"条记录!");dgvWarehouseDetails.DataSource= null;AddWarehouseCode();}}//点击退出,关闭窗口private void btnExit_Click(object sender,EventArgs e){this.Close();}}}仓库信息更新界面using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU.SWEIMS.BusinessModel;using SJZU.SWEIMS.BusinessLogic;using System.Data.SqlClient;using SJZU.SWEIMS.DBUtility;namespace SJZU.SWEIMS.GUI.SWEIMS{public partial class Frm_Warehouse_Update: Form{WarehouseManage warehouseManage= new WarehouseManage();SqlDataAdapter adapter;DataTable table;public Frm_Warehouse_Update(){InitializeComponent();}private void Frm_Warehouse_Update_Load(object sender, EventArgs e){cboWarehouseCode.DataSource=warehouseManage.GetWarehouseCode();cboWarehouseCode.DisplayMember= "WAREHOUSECODE";}//查询仓库信息private void btnQuery_Click(object sender,EventArgs e){if (string.IsNullOrEmpty(cboWarehouseCode.Text)){MessageBox.Show("请选择要查询的仓库编号!");}else{string warehouseCode= cboWarehouseCode.Text;string strsql="select* from WAREHOUSE where WAREHOUSECODE=" + warehouseCode;string connectionString=SQLHelper._connectionString;SqlConnection conn= newSqlConnection(connectionString);adapter =new SqlDataAdapter(strsql,conn);SqlCommandBuilder builder= new SqlCommandBuilder(adapter);adapter.InsertCommand= builder.GetInsertCommand();adapter.DeleteCommand= builder.GetDeleteCommand();adapter.UpdateCommand= builder.GetUpdateCommand();table = new DataTable();adapter.Fill(table);dgvWarehouseDetails.DataSource= table;}}private void btnUpdate_Click(object sender,EventArgs e){dgvWarehouseDetails.EndEdit();try{adapter.Update(table);MessageBox.Show("保存成功!");}catch (SqlException err){MessageBox.Show(err.Message,"保存成功!");}}private void btnExit_Click(object sender,EventArgs e){this.Close();}}}仓库信息查询界面using using using using using using using System;System.Collections.Generic; ponentModel; System.Data;System.Drawing;System.Text;System.Windows.Forms;using SJZU.SWEIMS.BusinessModel;using SJZU.SWEIMS.BusinessLogic;namespace SJZU.SWEIMS.GUI.SWEIMS{public partial class Frm_Warehouse_Query: Form{public Frm_Warehouse_Query(){InitializeComponent();}private void Frm_Warehouse_Query_Load(object sender, EventArgs e){}//按选择的条件查询仓库信息private void btnQuery_Click(object sender,EventArgs e){int startTime=int.Parse(dtpStart.Value.ToString("yyyyMMdd"));int endTime=int.Parse(dtpEnd.Value.ToString("yyyyMMdd"));if (startTime>endTime){MessageBox.Show("开始时间不能晚于结束时间!");}else{//按时间查询,仓库编号和负责人都不是查询条件if (cbWarehouseCode.Checked== false &&cbDirector.Checked== false){dgvWarehouseDetails.DataSource= new WarehouseManage().GetWarehouseTable(startTime,endTime);}//按时间和仓库编号查询else if (cbWarehouseCode.Checked== true &&cbDirector.Checked== false){string warehouseCode= txtWarehouseCode.Text;if (string.IsNullOrEmpty(warehouseCode.Trim())){MessageBox.Show("请输入仓库编号!");}else{dgvWarehouseDetails.DataSource= new WarehouseManage().GetWarehouseTable(startTime,endTime, warehouseCode);}}//按时间和负责人查询else if (cbWarehouseCode.Checked== false && cbDirector.Checked== true){string director= txtDirector.Text;if (string.IsNullOrEmpty(director.Trim())){MessageBox.Show("请输入负责人!");}else{dgvWarehouseDetails.DataSource= new WarehouseManage().GetWarehouseTable(startTime,endTime,director,9);}}//按时间,仓库编号,负责人查询else if (cbWarehouseCode.Checked== true && cbDirector.Checked== true){string warehouseCode= txtWarehouseCode.Text;string director= txtDirector.Text;if (string.IsNullOrEmpty(warehouseCode.Trim())|| string.IsNullOrEmpty(director.Trim())){MessageBox.Show("所选条件不能为空!");}else{dgvWarehouseDetails.DataSource= new WarehouseManage().GetWarehouseTable(startTime,endTime, warehouseCode,director);}}}}private void btnExit_Click(object sender,EventArgs e){this.Close();}}}逻辑层代码using System;using System.Collections.Generic;using System.Text;using System.Data.SqlClient;using SJZU.SWEIMS.DBUtility;using SJZU.SWEIMS.BusinessModel;using System.Data;namespace SJZU.SWEIMS.BusinessLogic{public class WarehouseManage{//向数据库WAREHOUSE表中添加仓库数据public int AddWarehouseTable(WarehouseTable warehouseTable){string strsql="insert into WAREHOUSE(WAREHOUSECODE,"+ "WAREHOUSENAME,"+ "PROPERTY,"+ "DEPARTMENT,"+ "ADDRESS,"+ "TEL,"+ "DIRECTOR,"+ "CREATEBY,"+ "CREATETIME,"+ "SUMMARY)"+ "VALUES(@WAREHOUSECODE,"+ "@WAREHOUSENAME,"+ "@PROPERTY,"+ "@DEPARTMENT,"+ "@ADDRESS,"+ "@TEL,"+ "@DIRECTOR,"+ "@CREATEBY,"+ "@CREATETIME,"+ "@SUMMARY)";SqlParameter[]commandParms= new SqlParameter[]{ newSqlParameter("@WAREHOUSECODE", warehouseTable.WarehouseCode),new SqlParameter("@WAREHOUSENAME", warehouseTable.WarehouseName),new SqlParameter("@PROPERTY", warehouseTable.Property),new SqlParameter("@DEPARTMENT", warehouseTable.Department),newSqlParameter("@ADDRESS",warehouseTable.Address),newSqlParameter("@TEL",warehouseTable.Tel),new SqlParameter("@DIRECTOR", warehouseTable.Director),new SqlParameter("@CREATEBY", warehouseTable.CreateBy),newSqlParameter("@CREATETIME",warehouseTable.CreateTime),newSqlParameter("@SUMMARY",warehouseTable.Summary)};int i = SQLHelper.ExecuteSql(strsql,commandParms);return i;}//取得仓库编号public DataTable GetWarehouseCode(){string strSql="select WAREHOUSECODE from WAREHOUSE";return SQLHelper.Query(strSql).Tables[0];}//根据仓库编号查询仓库详细信息public DataTable GetWarehouseTable(string warehouseCode){string strSql="select* from WAREHOUSE where WAREHOUSECODE=@WAREHOUSECODE";SqlParameter[]commandParms= new SqlParameter[]{ new SqlParameter("@WAREHOUSECODE", warehouseCode)};return SQLHelper.Query(strSql,commandParms).Tables[0];}//根据仓库编号删除仓库信息public int DeleteWarehouse(string warehouseCode){string strSql="delete from WAREHOUSE where WAREHOUSECODE=@WAREHOUSECODE";SqlParameter[]commandParms= new SqlParameter[]{ newSqlParameter("@WAREHOUSECODE", warehouseCode)};return SQLHelper.ExecuteSql(strSql,commandParms);}//根据时间阶段查询仓库信息public DataTable GetWarehouseTable(int startTime,int endTime){string strSql="select* from WAREHOUSE where CREATETIME >= @startTime and CREATETIME<= @endTime";SqlParameter[]commandParms= new SqlParameter[]{ new SqlParameter("@startTime", startTime), new SqlParameter("@endTime", endTime) };return SQLHelper.Query(strSql,commandParms).Tables[0];}//根据时间阶段和仓库编号查询public DataTable GetWarehouseTable(int startTime,int endTime, string warehouseCode){string strSql="select* from WAREHOUSE where CREATETIME >= @startTime and CREATETIME<= @endTime andWAREHOUSECODE=@warehouseCode";SqlParameter[]commandParms= new SqlParameter[]{ new SqlParameter("@startTime", startTime), new SqlParameter("@endTime", endTime),new SqlParameter("@warehouseCode",warehouseCode)};return SQLHelper.Query(strSql,commandParms).Tables[0];}//根据时间阶段和负责人查询public DataTable GetWarehouseTable(int startTime,int endTime,string director,int i){string strSql="select* from WAREHOUSE where CREATETIME >= @startTime and CREATETIME<= @endTime and DIRECTOR=@director";SqlParameter[]commandParms= new SqlParameter[]{ new SqlParameter("@startTime", startTime), new SqlParameter("@endTime", endTime),new SqlParameter("@director", director)};return SQLHelper.Query(strSql,commandParms).Tables[0];}//根据时间阶段,仓库编号和负责人查询public DataTable GetWarehouseTable(int startTime,int endTime, string warehouseCode,string director){string strSql="select* from WAREHOUSE where CREATETIME >= @startTime and CREATETIME<= @endTime andWAREHOUSECODE=@warehouseCode and DIRECTOR =@director";SqlParameter[]commandParms= new SqlParameter[]{ new SqlParameter("@startTime", startTime), new SqlParameter("@endTime", endTime), new SqlParameter("@warehouseCode", warehouseCode),new SqlParameter("@director", director)};return SQLHelper.Query(strSql,commandParms).Tables[0];}}}模型层代码using System;using System.Collections.Generic;using System.Text;namespace SJZU.SWEIMS.BusinessModel{public class WarehouseTable{private string warehouseCode;public string WarehouseCode{get { return warehouseCode;}set { warehouseCode= value;}}private string warehouseName;public string WarehouseName{get { return warehouseName;}set { warehouseName= value;}}private string property;public string Property{get { return property;}set { property=value; }}private string department;public string Department{get { return department;}set { department= value; }} private string address;public string Address{get { return address;}set { address=value; }}private string tel;public string Tel{get { return tel;}set { tel=value; }}private string director;public string Director{get { return director;}set { director=value; }}private string createBy;public string CreateBy{get { return createBy;}set { createBy=value; }}private int createTime;public int CreateTime{get { return createTime;}set { createTime= value; } }private string summary;public string Summary{get { return summary;}set { summary=value; }}} }。

相关文档
最新文档