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

合集下载

pm仓库管理系统源代码

pm仓库管理系统源代码

< " "><><>< "" "; 4.1">< 1.0 ><><>< " ">< " " "0x800025">< "" ""><><><> < "">< "" "仓库管理系统"> < "" "仓库管理系统"> < "" "1"><><> < "">< "" "简介">< "" "仓库管理系统1"> < "" "1"><><> < "">< "" "使用说明">< "" "仓库管理系统2">< "" "1"><><><> < "">< "" "登记信息">< "" "仓库管理系统2_1">< "" "1"><><><> < "">< "" "货物信息">< "" "仓库管理系统2_1_1"> <><> < "">< "" "仓库信息">< "" "仓库管理系统2_1_2"> <><> < "">< "" "供应商">< "" "仓库管理系统2_1_3"> <>< "" "住来客户">< "" "仓库管理系统2_1_4"> <><> < "">< "" "库存状况">< "" "仓库管理系统2_1_5"> <><><> < "">< "" "单据管理">< "" "仓库管理系统2_2">< "" "1"><><><> < "">< "" "入库单">< "" "仓库管理系统2_2_1"> <><> < "">< "" "出库单">< "" "仓库管理系统2_2_2"><> < "">< "" "借入单">< "" "仓库管理系统2_2_3"> <><> < "">< "" "借出单">< "" "仓库管理系统2_2_4"> <><> < "">< "" "调拔单">< "" "仓库管理系统2_2_5"> <><> < "">< "" "报损单">< "" "仓库管理系统2_2_6"> <><> < "">< "" "月盘点">< "" "仓库管理系统2_2_7"> <><><> < "">< "" "查询统计">< "" "仓库管理系统2_3">< "" "1"><><><> < "">< "" "单据查询">< "" "仓库管理系统2_3_1"> <><> < "">< "" "库存查询">< "" "仓库管理系统2_3_2"> <><> < "">< "" "高级查询">< "" "仓库管理系统2_3_3"> <><> < "">< "" "自定义查询">< "" "仓库管理系统2_3_4"> <>< "" "管理自定义查询">< "" "仓库管理系统2_3_5"> <><> < "">< "" "货物出入统计">< "" "仓库管理系统2_3_6"> <><> < "">< "" "职员操作统计">< "" "仓库管理系统2_3_7"> <><><> < "">< "" "维护设置">< "" "仓库管理系统2_4">< "" "1"><><><> < "">< "" "公司信息">< "" "仓库管理系统2_4_1"><> < "">< "" "职员信息">< "" "仓库管理系统2_4_2"> <><> < "">< "" "查看日志">< "" "仓库管理系统2_4_3"> <><> < "">< "" "数据清除">< "" "仓库管理系统2_4_4"> <><> < "">< "" "系统初始化">< "" "仓库管理系统2_4_5"> <><> < "">< "" "备份数据库">< "" "仓库管理系统2_4_6"> <><> < "">< "" "还原数据库">< "" "仓库管理系统2_4_7"> <><> < "">< "" "还原到昨天数据库">< "" "仓库管理系统2_4_8"> <><> < "">< "" "修改密码">< "" "仓库管理系统2_4_9"> <><> < "">< "" "用户管理">< "" "仓库管理系统2_4_10"> <><> < "">< "" "换用户登陆">< "" "仓库管理系统2_4_11"> <><><> < "">< "" "帮助使用">< "" "仓库管理系统2_5"> < "" "1"><><><> < "">< "" "技术支持">< "" "仓库管理系统3">< "" "1"><><><><>< " "><><>< "" "; 4.1">< 1.0 ><><><><> < "">< "" "货物信息">< "" "货物信息">< "" "仓库管理系统2_1_1"><><> < "">< "" "仓库信息">< "" "仓库信息">< "" "仓库管理系统2_1_2"> <><> < "">< "" "供应商">< "" "供应商">< "" "仓库管理系统2_1_3"> <><> < "">< "" "往来客户">< "" "往来客户">< "" "仓库管理系统2_1_4"> <><> < "">< "" "帮助使用">< "" "帮助使用">< "" "仓库管理系统2_5"> <><> < "">< "" "库存状况">< "" "库存状况">< "" "仓库管理系统2_1_5"> <><> < "">< "" "入库单">< "" "入库单">< "" "仓库管理系统2_2_1"> <><> < "">< "" "出库单">< "" "出库单">< "" "仓库管理系统2_2_2"> <><> < "">< "" "借入单">< "" "借入单">< "" "仓库管理系统2_2_3"> <><> < "">< "" "借出单">< "" "借出单">< "" "仓库管理系统2_2_4"> <><> < "">< "" "调拔单">< "" "调拔单">< "" "仓库管理系统2_2_5"> <><> < "">< "" "报损单">< "" "报损单">< "" "仓库管理系统2_2_6"> <><> < "">< "" "月盘点">< "" "月盘点">< "" "仓库管理系统2_2_7"> <><> < "">< "" "单据查询">< "" "单据查询">< "" "仓库管理系统2_3_1"> <><> < "">< "" "库存查询">< "" "库存查询">< "" "仓库管理系统2_3_2"> <><> < "">< "" "高级查询">< "" "高级查询">< "" "仓库管理系统2_3_3"> <><> < "">< "" "自定义查询">< "" "自定义查询">< "" "仓库管理系统2_3_4"> <><> < "">< "" "管理自定义查询">< "" "管理自定义查询">< "" "仓库管理系统2_3_5"> <><> < "">< "" "货物出入统计">< "" "货物出入统计">< "" "仓库管理系统2_3_6"> <><> < "">< "" "职员操作统计">< "" "职员操作统计">< "" "仓库管理系统2_3_7"> <><> < "">< "" "公司信息">< "" "公司信息">< "" "仓库管理系统2_4_1"> <><> < "">< "" "职员信息">< "" "职员信息">< "" "仓库管理系统2_4_2"> <><> < "">< "" "查看日志">< "" "查看日志">< "" "仓库管理系统2_4_3"><><> < "">< "" "数据清除">< "" "数据清除">< "" "仓库管理系统2_4_4"> <><> < "">< "" "系统初始化">< "" "系统初始化">< "" "仓库管理系统2_4_5"> <><> < "">< "" "备份数据库">< "" "备份数据库">< "" "仓库管理系统2_4_6"> <><> < "">< "" "还原数据库">< "" "还原数据库">< "" "仓库管理系统2_4_7"> <><> < "">< "" "还原到昨天数据库">< "" "还原到昨天数据库">< "" "仓库管理系统2_4_8"> <><> < "">< "" "修改密码">< "" "修改密码">< "" "仓库管理系统2_4_9"> <><> < "">< "" "用户管理">< "" "用户管理">< "" "仓库管理系统2_4_10"> <><> < "">< "" "换用户登陆">< "" "换用户登陆">< "" "仓库管理系统2_4_11"> <><> < "">< "" "技术支持">< "" "技术支持">< "" "仓库管理系统3"> <><><><>[]== 1.1= 仓库管理系统= 仓库管理系统= 仓库管理系统= 仓库管理系统0x804 中文(中国)仓库管理系统 1.0[]仓库管理系统[]H0=仓库管理系统 ; 0H1=仓库管理系统1 ; 1H2=仓库管理系统2 ; 2H2=仓库管理系统3 ; 3h21=仓库管理系统2_1 ; 21H211=仓库管理系统2_1_1 ; 211 H212=仓库管理系统2_1_2 ; 212 H213=仓库管理系统2_1_3 ; 213 H214=仓库管理系统2_1_4 ; 214 H215=仓库管理系统2_1_5 ; 215 H221=仓库管理系统2_2_1 ; 221 H222=仓库管理系统2_2_2 ; 222 H223=仓库管理系统2_2_3 ; 223 H224=仓库管理系统2_2_4 ; 224 H225=仓库管理系统2_2_5 ; 225 H226=仓库管理系统2_2_6 ; 226 H227=仓库管理系统2_2_7 ; 227 H23=仓库管理系统2_3 ; 23H231=仓库管理系统2_3_1 ; 231 H232=仓库管理系统2_3_2 ; 232 H233=仓库管理系统2_3_3 ; 233 H234=仓库管理系统2_3_4 ; 234 H235=仓库管理系统2_3_5 ; 235 H236=仓库管理系统2_3_6 ; 236 H237=仓库管理系统2_3_7 ; 237H24=仓库管理系统2_4 ; 24H241=仓库管理系统2_4_1 ; 241H2410=仓库管理系统2_4_10 ; 2410 H2411=仓库管理系统2_4_11 ; 2411 H242=仓库管理系统2_4_2 ; 242H243=仓库管理系统2_4_3 ; 243H244=仓库管理系统2_4_4 ; 244H245=仓库管理系统2_4_5 ; 245H246=仓库管理系统2_4_6 ; 246H247=仓库管理系统2_4_7 ; 247H248=仓库管理系统2_4_8 ; 248H249=仓库管理系统2_4_9 ; 249H25=仓库管理系统2_5 ; 25H3=仓库管理系统3 ; 3[]仓库管理系统[]。

库存管理系统

库存管理系统

库存管理系统作者:潘鲲鹏指导老师:陈小玉【摘要】随着现代工业的发展,计算机信息管理系统越来越受到企业重视。

本文主要分析了库存管理系统的一些基本功能和组成情况,包括系统的需求分析、系统结构,功能模块划分以及数据库模式分析等,重点对应用程序的实际开发实现作了介绍。

达到了数据的一致性和安全性,且应用程序功能完备,符合了库存管理系统作为典型的信息管理系统(MIS)的要求。

同时简单介绍了Visual Basic编程环境和Access数据库管理系统的功能特点,库存管理系统是企业物流管理中不可或缺的一部分。

关键词:库存管理,数据库,信息管理,VB【关键词】库存管理,数据库,信息管理,VB第一章绪论库存管理系统是一个企事业单位不可缺少的一部分,它的内容对于企业的决策者和管理者来说都是至关重要的,因此,库存管理系统应该能够为用户提供充足的信息和快捷的查询手段,但一直以来人们使用传统的人工方式管理库存,这种管理方式存在着许多缺点,诸如效率低,保密性差等,而且时间一长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。

作为计算机应用的一部分,使用计算机对产品库存信息进行管理,具有着人工管理无法比拟的优点,它检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等,可减少更多的人力物力,这些都能够极大地提高货品库存的管理效率,也是企业库存管理科学化、正规化,与世界接轨的重要条件。

因此,开发一个库存管理系统是很有必要的,具有其特有的技术意义和管理意义。

1.1管理信息系统的概述管理信息系统(简称MIS)是在管理科学、系统科学、计算机科学等的基础上发展起来的综合性边缘科学。

在21世纪信息高速发展的时代中,管理信息系统具有很重要的作用,它的预测和辅助决策的功能,即利用现代管理的决策和支持。

管理信息系统是一个由人、机(计算机)组成的能进行管理信息的收集、传递、存储、加工、维护和使用的系统。

它能观测企业或组织的各种运动情况,利用过去的数据预测未来;从全局出发辅助决策;利用信息控制企业或组织行为,帮助其实现长远的规划目标。

java仓库管理系统课程设计源代码

java仓库管理系统课程设计源代码

一、项目背景介绍1.1 仓库管理系统的重要性仓库管理系统是一种对仓库内物品进行全面管理和监控的信息系统。

在现代物流管理中,仓库管理系统扮演着至关重要的角色,可以提高仓库的利用率、降低存货成本、提高物流效率,为企业节省大量人力和物力资源,是企业管理中不可或缺的一部分。

1.2 项目意义本课程设计拟设计并实现一套基于Java语言的仓库管理系统,旨在通过应用软件技术和信息管理技术,实现对进销存等多类业务流程的自动化管理,并在实际操作中验证其运行效果和实用性,为学生提供一种将所学知识应用于实践的机会。

二、系统功能需求2.1 基本功能1) 系统登入:要求用户输入用户名和密码进行登入验证;2) 信息录入:包括商品信息、入库信息、出库信息等的录入;3) 信息查询:可以根据商品编号、名称、类别等条件查询商品信息;4) 库存管理:可以实时查看库存状况,并进行库存的盘点与调剂;5) 报表输出:可以输出商品进销存报表,方便管理人员进行决策;6) 权限管理:不同用户具有不同的权限,管理员具有对系统进行设置的权限。

2.2 进一步功能1) 供应商管理:可以录入供应商信息,并进行供应商的评价和选择;2) 客户管理:可以录入客户信息,并对客户进行分类管理;3) 交易管理:支持交易的生成、记录和统计。

三、技术选型和开发环境3.1 技术选型本系统采用Java语言作为主要开发语言,使用MySQL作为数据库,前端采用Swing技术进行界面设计,后端采用JDBC进行数据传输和交互。

3.2 开发工具1) 开发环境:Eclipse2) 数据库工具:Navicat3) 版本管理工具:Git4) 项目管理工具:Maven四、系统设计4.1 系统架构设计本系统采用MVC(Model-View-Controller)架构,将业务逻辑、数据表示和用户界面分离,使得系统更加易于维护和升级。

4.2 数据库设计1) 商品表:包括商品编号、名称、类别、进价、售价、库存等字段;2) 入库表:包括入库单号、商品编号、数量、日期等字段;3) 出库表:包括出库单号、商品编号、数量、日期等字段;4) 用户表:包括用户名、密码、权限等字段。

access数据库库存管理系统

access数据库库存管理系统

数据库作业——库存管理制作步骤学院:文法学院班级:行政1301姓名:成尧目录一.创建ACCESS 3二.创建表3三.建立窗体73.1 创建一般窗体73.2 创建库存管理登陆系统113.3 创建导航窗体17四.创建查询174.1 创建更新库存查询 184.2 查询入库/出库信息 204.3 创建查询控制窗体224.4 设置报警处理23234.4.2 创建报警报表244.5 催货处理25五.宏27六.创建报表28七.ER图31八..设计理念36一 .创建ACCESS启动ACCESS 2010单击快捷选项中的新建。

在屏幕右侧出现如下图样,更改成需要的文件名,并选择好保存路径,单击创建。

创建“库存管理系统.mdb”空数据库。

??二.创建表根据表表的结构在“库存管理系统.mdb”中创建表.(1)单击创建选项中的表按钮。

(2)对默认表1 进行编辑,右击表1单击设计视图,更改表名称,这里我把它改为仓库表,单击确定按钮,表格创完毕。

(3)再次右击仓库表,在弹出的选项框中选择数据表视图(H)。

(4)在表中输入相应的数据,完善表的结构。

仓库表创建完成后,右击,单击保存。

(5)在图片一栏中选中方框右击点击插入对象(6)单击由文件创建——浏览选择自己需要的图片,点击打开确定(7)以同样的方法分别依次创建登录,库存表,商品出库表,商品入库表,商品信息表。

(8)所需的六个表创建完毕,在ACCESS界面的左侧有显示,如若想打开其中的一个表,可以选中它双击。

?(9)设置各表间的关系?按上图所示的关系创建表间关系。

三.建立窗体3.1 创建一般窗体(1)单击创建选项卡中的“窗体设计”,显示窗体的“设计视图”。

(2)单击“窗体设计工具”下设计选项上“控件”组中的“标签”控件,移动鼠标指针到“主体”节的适当位置,按下鼠标左键并(从左上往右下方向)拖动鼠标到适当位置,松开鼠标左键,显示出一个矩形标签,在矩形框中输入“库存管理系统”,如下图所示(3)确保“设计”选项卡上的“控件”组中的“使用控件向导”按钮已经按下。

仓库管理系统VBAccess源代码

仓库管理系统VBAccess源代码

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

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

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

作者联系方式:E-mail最终运行效果打开软件出现如下登录界面输入系统预设用户名及密码(11)单击“登录”或单击“新用户”添加新用户进入如下主界面:建立工程1、创建标准EXE2、按“打开”3、添加MDI窗体——打开4、编辑菜单在空白处右击——点击“菜单编辑器”在“标题”里输入“系统”,在“名称”里输入“Sys”(注意此处不能为汉字)“确定”退到MDI界面点击“系统”——“退出”如下,然后编写代码。

代码如下:PrivateSubExit_Click()EndEndSub数据库的建立VB6.0中可以创建Access数据库。

如下建立一个“用户表”的数据库,用来存放用户信息及一些出入库管理信息。

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

登录界面窗口的建立最终界面如下:单击“确定”在工具栏中会出现“”图标,单击它并拖动到相应位置即可。

其它元件不在一一说明。

2、本窗体代码如下:PrivateSubCommand1_Click()'“登录”、“确定”按钮IfCommand1.Caption="确定"AndCommand2.Caption="取消"Then'如果为“确定”则添加新用户IfText1.Text=""Then'提示用户输入用户名MsgBox"请输入用户名!",,"登录信息提示:"ExitSubElse'DimusenameAsString'检测用户名是否已经存在DimstrSAsStringusename=Trim(Text1.Text)strS="select*from用户登录信息表where用户名='"&usename&"'"mandType=adCmdTextAdodc1.RecordSource=strSAdodc1.RefreshMsgBox"您输入的用户已存在!",,"登录提示信息:"Text1.Text=""Text2.Text=""Text3.Text=""Text1.SetFocusExitSubEndIfEndIfIfText2.Text=""Then'提示用户密码不能为空MsgBox"密码不能为空!",,"登录提示信息:"Text2.SetFocusExitSubEndIfIfText3.Text=""ThenMsgBox"请再次输入密码!",,"登录提示信息:"Text3.SetFocusExitSubEndIfIfText2.Text<>Text3.TextThenMsgBox"两次输入的密码不一致,请确认!",,"登录提示信息:"Text2.Text=""Text3.Text=""Text2.SetFocusExitSubElseMsgBox("添加新用户成功,现在您可以登陆系统了!")Label3.Visible=FalseText3.Visible=FalseCommand1.Caption="登录"Else'“登录”按钮,用户登录DimstrSnoAsStringDimstrSelectAsStringstrSno=Trim(Text1.Text)'检测用户名是否存在strSelect="select密码from用户登录信息表where用户名='"&strSno&"'" mandType=adCmdTextAdodc1.RecordSource=strSelectAdodc1.RefreshMsgBox"用户名不存在,请重新输入!",,"登录提示信息:"Text1.Text=""Text2.Text=""Text1.SetFocusExitSubEndIfForm1.Hide'UnloadMeForm2.Show'MsgBox"登陆成功!",,"登录提示信息:"ElseMsgBox"密码不正确,请重新输入!",,"登录提示信息:"Text2.Text=""Text2.SetFocusEndIfEndIfEndSubPrivateSubCommand2_Click()'“退出”或“取消”按钮IfCommand2.Caption="取消"ThenLabel3.Visible=FalseText3.Visible=FalseCommand1.Caption="登录"Command2.Caption="退出"Text1.Text=""Text2.Text=""Text1.SetFocusElseEnd'UnloadMeEndIfEndSubPrivateSubCommand3_Click()'“新用户”按钮Label3.Visible=TrueText3.Visible=TrueText1.Text=""Text2.Text=""Text3.Text=""Command1.Caption="确定"Command2.Caption="取消"PrivateSubCommand3_MouseDown(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle) Label6.Visible=TrueEndSubPrivateSubCommand3_MouseUp(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle) Label6.Visible=FalseEndSubPrivateSubForm_Load()Label3.Visible=FalseText3.Visible=FalseEndSubPrivateSubTimer1_Timer()'时间time1控件的time事件代码,用来'显示向左移动的欢迎字幕IfLabel4.Left+Label4.Width>0Then'当标签右边位置大于0时,标签向左移Label4.MoveLabel4.Left-80Else'否则标签从头开始Label4.Left=Form1.ScaleWidthEndIfIfLabel5.Left+Label5.Width>0ThenLabel5.MoveLabel5.Left-80ElseLabel5.Left=Form1.ScaleWidthEndIfEndSub主界面窗体如下:代码: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="出库信息"DimXHAsStringn="select*from出库表where型号='"&XH&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndSubPrivateSubCKCZ_Click()'Form2.HideForm6.ShowEndSubPrivateSubCKJSHR_Click()Frame2.Caption="出库信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from出库表where经手人='"&JSHR&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCKSHJ_Click()Frame2.Caption="出库信息"DimCHKRQAsStringDimnAsStringCHKRQ=InputBox("出库日期,格式为:月/日/年如:12/1/2011","请输入",0) n="select*from出库表where出库日期='"&CHKRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCKZCX_Click()Frame2.Caption="出库信息"DimZBAsStringZB="select*from出库表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid1EndSubPrivateSubCommand1_Click()IfText1.Text=""Then'提示用户输入用户名MsgBox"请输入用户名!",,"登录信息提示:"ExitSubElse'DimusenameAsString'检测用户名是否已经存在strS="select*from用户登录信息表where用户名='"&usename&"'"mandType=adCmdTextAdodc1.RecordSource=strSAdodc1.RefreshMsgBox"您输入的用户已存在!",,"登录提示信息:"Text1.Text=""Text2.Text=""Text3.Text=""Text1.SetFocusExitSubEndIfEndIfIfText2.Text=""Then'提示用户密码不能为空MsgBox"密码不能为空!",,"登录提示信息:"Text2.SetFocusExitSubEndIfIfText3.Text=""ThenMsgBox"请再次输入密码!",,"登录提示信息:"Text3.SetFocusExitSubEndIfIfText2.Text<>Text3.TextThenMsgBox"两次输入的密码不一致,请确认!",,"登录提示信息:"Text2.Text=""Text3.Text=""Text2.SetFocusExitSubElseeDimXAsIntegerX=MsgBox("成功添加新用户,是否要重新登录!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbYesThenUnloadMeForm3.ShowEndIf'MsgBox("成功添加新用户!")'Label3.Visible=False'Text3.Visible=False'Command1.Caption="登录"'Command2.Caption="退出"EndIfFrame1.Visible=FalseFrame2.Visible=TrueText1.Text=""Text2.Text="'"EndSubPrivateSubCommand2_Click()Frame1.Visible=FalseFrame2.Visible=TrueEndSubPrivateSubCXDL_Click()Form3.Show'UnloadMeEndSubPrivateSubExit_Click()EndUnloadForm1UnloadForm2UnloadForm3UnloadForm4UnloadForm5UnloadForm6UnloadForm7UnloadForm8EndSubPrivateSubForm_Load()UnloadForm1Frame1.Visible=FalseCallInitGrid0Me.Height=MDIForm1.Height-1060Me.Width=MDIForm1.Width-560Me.Top=MDIForm1.TopMe.Left=MDIForm1.LeftEndSubPrivateSubGHCZ_Click()'Form2.HideForm8.ShowEndSubPrivateSubGHPMCX_Click()Frame2.Caption="归还信息" DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)n="select*from归还表where品名='"&pm&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHRCX_Click()Frame2.Caption="归还信息"JCR=InputBox("归还人","请输入",0)n="select*from归还表where归还人='"&JCR&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHSJCX_Click()Frame2.Caption="归还信息"DimJCRQAsStringDimnAsStringJCRQ=InputBox("归还日期,格式为:月/日/年如:12/1/2011","请输入",0) n="select*from归还表where归还日期='"&JCRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHXHCX_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.HideForm7.ShowEndSubPrivateSubJCHPMCHX_Click()Frame2.Caption="借出信息"DimpmAsStringDimnAsStringmandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCHXHCHX_Click()Frame2.Caption="借出信息"DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)n="select*from借出表where型号='"&XH&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCRCX_Click()Frame2.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()Frame2.Caption="借出信息"DimZBAsStringZB="select*from借出表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid2Frame2.Caption="归还信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from归还表where经手人='"&JSHR&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJSHRCX_Click()Frame2.Caption="借出信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from借出表where经手人='"&JSHR&"'" mandType=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="入库信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from入库表where经手人='"&JSHR&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1Frame2.Caption="入库信息"DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)IfLen(pm)>0Thenn="select*from入库表where品名='"&pm&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid1EndSubPrivateSubRKSHJ_Click()Frame2.Caption="入库信息"DimRKRQAsStringDimnAsStringRKRQ=InputBox("入库日期,格式为:月/日/年如:12/1/2011","请输入",0) n="select*from入库表where入库日期='"&RKRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubRKXHCHX_Click()Frame2.Caption="入库信息"DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)IfLen(XH)>0Thenn="select*from入库表where型号='"&XH&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid1EndSubPrivateSubRKZCX_Click()Frame2.Caption="入库信息"DimZBAsStringZB="select*from入库表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid1EndSubPrivateSubTimer1_Timer()IfLabel4.Left+Label4.Width>0Then'当标签右边位置大于0时,标签向左移Label4.MoveLabel4.Left-80Else'否则标签从头开始Label4.Left=Form2.ScaleWidthEndIfIfLabel5.Left+Label5.Width>0ThenLabel5.MoveLabel5.Left-80ElseLabel5.Left=Form2.ScaleWidthEndIfIfLabel6.Left+Label6.Width>0ThenLabel6.MoveLabel6.Left-80ElseLabel6.Left=Form2.ScaleWidthEndIfIfLabel7.Left+Label7.Width>0ThenLabel7.MoveLabel7.Left-80ElseLabel7.Left=Form2.ScaleWidthEndIfEndSubPrivateSubXGMM_Click()'Form2.HideForm4.ShowEndSubPrivateSubXHCX_Click()Frame2.Caption="库存信息"DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)IfLen(XH)>0Then'AndVal(XH)<>0n="select*from库存表where型号='"&XH&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid0EndSubPrivateSubZB_Click()Frame2.Caption="库存信息"DimZBAsString'DimNAsString'PM=InputBox("产品名","请输入",0)ZB="select*from库存表"'where品名='"&PM&"'" mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid0EndSubPrivateSubInitGrid0()WithDataGrid1.Columns(0).Width=1600.Columns(1).Width=2200.Columns(2).Width=2200.Columns(3).Width=1000.Columns(4).Width=1000.Columns(5).Width=4000EndWithEndSubPrivateSubInitGrid1()WithDataGrid1.Columns(0).Width=800.Columns(1).Width=1600.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(0).Caption="学号"'.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=1000.Columns(7).Width=800.Columns(8).Width=4000EndWithEndSub用户重新登录界面代码:PrivateSubCommand1_Click()DimstrSnoAsStringDimstrSelectAsStringstrSno=Trim(Text1.Text)'检测用户名是否存在strSelect="select密码from用户登录信息表where用户名='"&strSno&"'"mandType=adCmdTextAdodc1.RecordSource=strSelectAdodc1.RefreshMsgBox"用户名不存在,请重新输入!",,"登录提示信息:" Text1.Text=""Text2.Text=""Text1.SetFocusExitSubEndIfUnloadMeForm2.Show'MsgBox"登陆成功!",,"登录提示信息:"ElseMsgBox"密码不正确,请重新输入!",,"登录提示信息:"Text2.Text=""Text2.SetFocusEndIfEndSubPrivateSubCommand2_Click()UnloadMeForm2.ShowEndSub修改用户密码界面代码:PrivateSubCommand1_Click()IfTrim(Text1.Text)<>Form2.TextUserNameThenMsgBox"用户名不正确,请确认!",,"信息提示!"Text1.Text=""Text1.SetFocusExitSubElseDimnameAsStringDimnamesAsStringname=Trim(Text1.Text)names="select*from用户登录信息表where用户名='"&name&"'" mandType=adCmdTextAdodc1.RecordSource=namesAdodc1.RefreshIfText2.Text=""ThenMsgBox"请输入旧密码!",,"信息提示!"Text2.SetFocusExitSubEndIfMsgBox"旧密码不正确,请确认!",,"信息提示!"Text2.Text=""Text2.SetFocusEndIfIfText3.Text=""ThenMsgBox"请输入新密码!",,"信息提示!"Text3.SetFocusExitSubEndIfIfText4.Text=""ThenMsgBox"请再次输入新密码!",,"信息提示!"Text4.SetFocusExitSubEndIfIfTrim(Text3.Text)<>Trim(Text4.Text)ThenMsgBox"两次输入的新密码不一致!",,"信息提示!"Text3.Text=""Text4.Text=""Text3.SetFocusExitSubElseMsgBox("密码修改成功!")UnloadMe'Form2.ShowEndIfEndIfEndSubPrivateSubCommand2_Click()UnloadMe'Form2.ShowEndSub入库管理代码:PrivateSubCommand1_Click()IfText1.Text=""AndText2.Text=""ThenMsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!" ExitSubText1.SetFocusElseIfText3.Text=""AndText4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"Text3.SetFocusExitSubEndIfIfText5.Text=""ThenMsgBox"请经手人签名!",vbCritical,"提示信息!"Text5.SetFocusExitSubAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Text1.Text)n=Val(Text3.Text)pms="select*from库存表where品名='"&pm&"'"WithForm2EndWithElseEndIfEndIfDimXAsIntegerX=MsgBox("产品入库登记成功,是否继续添加产品!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbNoThenUnloadMe'Form2.ShowElseText1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""Text5.Text=""Text6.Text=""Text7.Text=""Text1.SetFocusEndIfDimZBAsStringZB="select*from入库表"'where品名='"&PM&"'"EndSubPrivateSubCommand2_Click()Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""Text5.Text=""Text6.Text=""Text7.Text=""Text1.SetFocusEndSubPrivateSubCommand3_Click()UnloadMe'Form2.ShowEndSub出库管理代码:PrivateSubCommand1_Click()IfCombo1.Text=""AndCombo2.Text=""Then'text1.Text=""AndText2.Text=""ThenMsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!"ExitSubElseIfText1.Text=""AndCombo3.Text=""Then'Text4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"Text2.SetFocusExitSubEndIfIfText2.Text=""ThenMsgBox"请经手人签名!",vbCritical,"提示信息!"Text2.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms="select*from库存表where品名='"&pm&"'"EndIfDimXAsIntegerX=MsgBox("产品出库登记成功,是否继续添加产品!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbNoThenUnloadMe'Form2.ShowEndIfCombo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""DimZBAsStringZB="select*from出库表"'where品名='"&PM&"'"EndSubPrivateSubCommand2_Click()Combo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""EndSubPrivateSubCommand3_Click()UnloadMe'Form2.ShowEndSubPrivateSubForm_Load()Adodc2.RefreshLoopEndSub借出管理代码:PrivateSubCommand1_Click()IfCombo1.Text=""AndCombo2.Text=""Then'text1.Text=""AndText2.Text=""ThenMsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!"ExitSubElseIfText1.Text=""AndCombo3.Text=""Then'Text4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"Text1.SetFocusExitSubEndIfIfText2.Text=""ThenMsgBox"请经手人签名!",vbCritical,"提示信息!"Text2.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms="select*from库存表where品名='"&pm&"'"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&"'"EndSubPrivateSubCommand2_Click()Combo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""EndSubPrivateSubCommand3_Click()UnloadMeForm2.ShowEndSubPrivateSubForm_Load()Adodc2.RefreshLoopEndSub归还管理代码: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,"提示信息!"Text3.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms="select*from库存表where品名='"&pm&"'"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&"'"EndSubPrivateSubCommand2_Click()Combo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""EndSubPrivateSubCommand3_Click()UnloadMeForm2.ShowEndSubPrivateSubForm_Load()'DimiAsString'i=0'Adodc2.Refresh'i=i+1'LoopCallpmEndSubPrivateSubpm()DimiAsVariantDimjAsVariantDimkAsVariantDimaAsVariantDimbAsVariantDimcAsVariantDimsAsVariantDimDAsVarianti=0j=0Adodc2.Refreshi=i+1LoopD=Split(a,",")Ifj<iThens=D(2)Combo1.AddItems'k=0'Ifk<jAndD(k)<>D(j)Then'IfD(k)<>D(j)Then'Combo1.AddItemD(j)'k=k+1'Else'k=k+1'EndIf'EndIfj=j+1EndIfText5.Text=s'a+","+D(2)+D(1)'+""+Val(i)+""+Val(j)+""+Val(k) Text6.Text=j'Combo1.AddItemD(1)EndSub。

VB公司仓库管理系统

VB公司仓库管理系统

第一章公司介绍与系统的需求分析1.1公司简介佳雪公司是一个专销电动机的公司,主要业务是进行电动机的进货与分销,作为一个销售的中介公司,其要求有入库与出库的主要数据库,可以简单的记录数据,并且可以进行多方面的查询,使得公司有较详细的数据统计与分析。

其主要业务如以下图所示:1.图1.1.12.查询功能1)按型号查询有两个结果:A生成入库量、出库量、节余量B生成两个数据来源表,包括出库来源与入库来源;2)按单位查询结果:生成型号、产品名称、时间(入/出库)、单价再生成出入库的两个基本情况表,包括供应商和顾客的基本情况,如型号、出/入库时间,单价,发票编号、结帐情况;3.本系统主要运用Visual Basic的内嵌数据库Access来记录数据;4.产品信息:序号(自动生成)、型号(文本)、入库时间(日期)、出库时间(日期)、数量(数字)、发票编号(文本)、单价(货币)、厂商名称(文本)、供应商名称(文本)、厂商与供应商的电话(数字)、结帐情况(是/否)[是为0,否为-1]1.2分析与描述一.根据1.1章节的具体要求,总结出以下的数据流程:图1.2.1 数据流程二.根据以上情况,按要求设计了几个相关的数据库 表:出库、入库查询:查询结余、出库查询、入库查询、型号出库查询、型号入库查询 ● 主要的出库表属性如以下表所示:表1.2.1● 由于入库表与出库想类似,所以在此不做详细介绍。

● 为了方便查询,因此在出库与入库的基础上增加了几个查询表,具体字段如下:1.查询结余:型号、产品名称、出库数量、入库数量2.出库查询:顾客名称、型号、出库时间、单价、出库数量OF SUM 、发票编号、结帐情况3.入库查询:供应商名称、型号、入库时间、单价、入库数量OF SUM、发票编号、结帐情况4.出库型号查询:型号、产品名称、顾客名称、单价、发票编号、结帐情况5.入库型号查询:型号、产品名称、供应商名称、单价、发票编号、结帐情况1.3数据库的主要特点数据库中的每一个表都必须符合下面几个特征:*表中的每一个单元的内容只有一个值*所有字段的名称都不相同*记录的前后次序和字段的左右次序可以变化,不受限制*数据库中的表的上下次序不受限制*表中不应有内容完全相同的记录*表中的每一个字段都必须有相同的数据类型使用Visual Basic开发应用程序的两个主要思想:*可视设计*事件驱动编程Visual Basic应用程序不同于其他语言开发的单一性程序。

仓库管理系统代码大全

仓库管理系统代码大全

系统主函数(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 System.Runtime 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、首页,用户登录界面'连接SQL数据库时必写语句Imports System.Data.SqlClientPublic Class Frm_UserloginPrivate Sub Bt_login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bt_login.ClickIf Txt_UserId.Text = ""ThenMsgBox("用户名不能为空,请输入用户名!", MsgBoxStyle.OkOnly, "温馨提示") Exit SubEnd IfIf Txt_Paw.Text = ""ThenMsgBox("密码不能为空,请输入密码!", MsgBoxStyle.OkOnly, "温馨提示")Exit SubEnd If'连接数据库Dim conn As New SqlConnection'conn.ConnectionString = "user id=sa;password=;database=test;data source=."连接SQL2000数据库的方法'连接SQL Server2005数据库的方法conn.ConnectionString = "server=.;integrated security=sspi;database=NO.4"conn.Open()Dim constr As String'判断输入的数据是否正确Dim UserName, password As StringUserName = Trim(Txt_UserId.Text)password = Trim(Txt_Paw.Text)constr = "select * from t1 where id='" & UserName & " 'and Psd='" & password & "'"Dim da As New SqlDataAdapter(constr, conn)Dim ds As New DataSetda.Fill(ds)If ds.Tables(0).Rows.Count >= 1 ThenMDIParent1.ShowDialog()Me.Hide()ElseMsgBox("用户名或密码错误", MsgBoxStyle.OkOnly, "温馨提示")Txt_UserId.Text = ""Txt_Paw.Text = ""Txt_Paw.Focus()Txt_UserId.Focus()End IfEnd SubPrivate Sub Bt_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bt_cancel.ClickTxt_UserId.Text = ""Txt_Paw.Text = ""Txt_Paw.Focus()Txt_UserId.Focus()End SubEnd ClassImports System.Data.SqlClientPublic Class Frm_yhlbDim conn As New SqlConnection()Dim flag As IntegerDim ds As New DataSetPrivate Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load‘添加数据库中的数据到DGW控件中GroupBox1.Enabled = Falsebaocun.Enabled = Falsequxiao.Enabled = Falseconn.ConnectionString = "server=(local);integrated security=sspi;database=NO.4"conn.Open()Dim st As Stringst = "select * from t1"Dim da As New SqlDataAdapter(st, conn)Dim ds As New DataSetda.Fill(ds)DGW1.ColumnCount = ds.Tables(0).Columns.CountDGW1.RowCount = ds.Tables(0).Rows.Count'DGW1.ColumnCount = 4 '列'DGW1.RowCount = 4 '行For i = 0 To ds.Tables(0).Rows.Count - 1For j = 0 To ds.Tables(0).Columns.Count - 1DGW1.Rows(i).Cells(j).Value = ds.Tables(0).Rows(i).ItemArray(j)Next jFor j = 0 To ds.Tables(0).Columns.Count - 1DGW1.Columns(j).HeaderText = ds.Tables(0).Columns(j).ColumnNameNextNext iEnd SubFunction f_diaoyong(ByVal st As String) As Long'Dim st As String'st = "select * from t1"Dim da As New SqlDataAdapter(st, conn)Dim ds As New DataSetda.Fill(ds)DGW1.ColumnCount = ds.Tables(0).Columns.CountDGW1.RowCount = ds.Tables(0).Rows.Count'DGW1.ColumnCount = 4 '列'DGW1.RowCount = 4 '行For i = 0 To ds.Tables(0).Rows.Count - 1For j = 0 To ds.Tables(0).Columns.Count - 1DGW1.Rows(i).Cells(j).Value = ds.Tables(0).Rows(i).ItemArray(j)Next jFor j = 0 To ds.Tables(0).Columns.Count - 1DGW1.Columns(j).HeaderText = ds.Tables(0).Columns(j).ColumnNameNextNext iEnd FunctionPrivate Sub tianjia_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tianjia.Clickflag = -1GroupBox1.Enabled = Truebaocun.Enabled = Truequxiao.Enabled = TrueTextBox1.Enabled = TrueTextBox2.Text = ""TextBox1.Text = ""TextBox1.Focus()TextBox3.Text = ""End SubPrivate Sub baocun_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles baocun.ClickIf flag = -1 ThenDim a, b, c As Stringa = Trim(TextBox1.Text)b = Trim(TextBox2.Text)c = Trim(TextBox3.Text)Dim str As StringDim da As New SqlDataAdapter("select * from t1", conn)da.Fill(ds)For i = 0 To ds.Tables(0).Rows.Count - 1str = Trim(ds.Tables(0).Rows(i).ItemArray(0))If Trim(TextBox1.Text) = str ThenMsgBox("对不起,你的ID重复,请重新输入!", MsgBoxStyle.OkOnly, "用户消息提示框")TextBox1.Text = ""TextBox1.Focus()Exit SubEnd IfNextDim stre = "Insert into t1 values('"& Trim(a) & " ',' "& Trim(b) & " ', ' "& Trim(c) & " ' )"Dim com As New SqlCommand(stre, conn)com.ExecuteNonQuery()ElseIf flag = 1 ThenDim name1, mima1, a1 As Stringname1 = TextBox2.Textmima1 = TextBox3.Texta1 = TextBox1.Texta1 = DGW1.SelectedRows(0).Cells(0).ValueDim stre = "update t1 set name= ' " & name1 & " ', psd= ' " & mima1 & " 'where id='" & a1 & " ' "Dim com As New SqlCommand(stre, conn)com.ExecuteNonQuery()End IfTextBox1.Text = ""TextBox1.Focus()TextBox2.Text = ""TextBox3.Text = ""baocun.Enabled = Falsequxiao.Enabled = FalseGroupBox1.Enabled = FalseCall f_diaoyong("select * from t1")End SubPrivate Sub quxiao_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles quxiao.ClickTextBox1.Text = ""TextBox1.Focus()TextBox2.Text = ""TextBox3.Text = ""DGW1.Enabled = Falsebaocun.Enabled = Falsequxiao.Enabled = FalseGroupBox1.Enabled = FalseEnd SubPrivate Sub xiugai_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xiugai.Clickflag = 1TextBox1.Enabled = Falsebaocun.Enabled = Truequxiao.Enabled = TrueGroupBox1.Enabled = TrueTextBox1.Text = DGW1.SelectedRows(0).Cells(0).ValueTextBox2.Text = DGW1.SelectedRows(0).Cells(1).ValueTextBox3.Text = DGW1.SelectedRows(0).Cells(2).ValueEnd SubPrivate Sub tuichu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tuichu.ClickEndEnd SubPrivate Sub shanchu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles shanchu.ClickDim yh As Stringyh = TextBox1.Textyh = DGW1.SelectedRows(0).Cells(0).ValueDim stre = "delete from t1 where id='" & yh & " '"Dim com As New SqlCommand(stre, conn)com.ExecuteNonQuery()MsgBox("确定删除!", MsgBoxStyle.OkOnly, "提示信息")baocun.Enabled = Truequxiao.Enabled = TrueDGW1.Enabled = FalseCall f_diaoyong("select * from t1")End SubEnd Class。

仓库管理系统VBAccess源代码

仓库管理系统VBAccess源代码

仓库管理系统V B A c c e s s源代码 SANY标准化小组 #QS8QHH-HHGX8Q8-GNHHJ8-HHMHGN#仓库管理系统项目的建立这是本人利用闲暇之余在VB6.0上制作的一个简陋的类库管系统,现图文结合的方式一步一步展现制作过程。

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

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

作者联系方式:E-mail 最终运行效果打开软件出现如下登录界面输入系统预设用户名及密码(11)单击“登录”或单击“新用户”添加新用户进入如下主界面:建立工程1、创建标准EXE2、按“打开”3、添加MDI窗体——打开4、编辑菜单在空白处右击——点击“菜单编辑器”在“标题”里输入“系统”,在“名称”里输入“Sys”(注意此处不能为汉字)点击“下一个”再点击“”“确定”退到MDI界面点击“系统”——“退出”如下,然后编写代码。

代码如下:PrivateSubExit_Click()EndEndSub数据库的建立VB6.0中可以创建Access数据库。

如下建立一个“用户表”的数据库,用来存放用户信息及一些出入库管理信息。

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

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

其它元件不在一一说明。

2、本窗体代码如下:PrivateSubCommand1_Click()'“登录”、“确定”按钮IfCommand1.Caption="确定"AndCommand2.Caption="取消"Then'如果为“确定”则添加新用户MsgBox"请输入用户名!",,"登录信息提示:"ExitSubElse'DimusenameAsString'检测用户名是否已经存在DimstrSAsStringusename=Trim(Text1.Text)strS="select*from用户登录信息表where用户名='"&usename&"'" mandType=adCmdTextAdodc1.RecordSource=strSAdodc1.RefreshMsgBox"您输入的用户已存在!",,"登录提示信息:"Text1.Text=""Text2.Text=""Text3.Text=""Text1.SetFocusExitSubEndIfEndIfIfText2.Text=""Then'提示用户密码不能为空MsgBox"密码不能为空!",,"登录提示信息:"Text2.SetFocusExitSubEndIfIfText3.Text=""ThenMsgBox"请再次输入密码!",,"登录提示信息:"Text3.SetFocusExitSubEndIfIfText2.Text<>Text3.TextThenMsgBox"两次输入的密码不一致,请确认!",,"登录提示信息:" Text2.Text=""Text3.Text=""Text2.SetFocusExitSubElseMsgBox("添加新用户成功,现在您可以登陆系统了!")Label3.Visible=FalseText3.Visible=FalseCommand1.Caption="登录"Command2.Caption="退出"EndIfElse'“登录”按钮,用户登录DimstrSnoAsStringDimstrSelectAsStringstrSno=Trim(Text1.Text)'检测用户名是否存在strSelect="select密码from用户登录信息表where用户名='"&strSno&"'" mandType=adCmdTextAdodc1.RecordSource=strSelectAdodc1.RefreshMsgBox"用户名不存在,请重新输入!",,"登录提示信息:"Text1.Text=""Text2.Text=""Text1.SetFocusExitSubEndIfForm1.Hide'UnloadMeForm2.Show'MsgBox"登陆成功!",,"登录提示信息:"ElseMsgBox"密码不正确,请重新输入!",,"登录提示信息:"Text2.Text=""Text2.SetFocusEndIfEndIfEndSubPrivateSubCommand2_Click()'“退出”或“取消”按钮IfCommand2.Caption="取消"ThenLabel3.Visible=FalseText3.Visible=FalseCommand1.Caption="登录"Command2.Caption="退出"Text1.Text=""Text2.Text=""Text1.SetFocusElseEnd'UnloadMeEndIfEndSubPrivateSubCommand3_Click()'“新用户”按钮Label3.Visible=TrueText3.Visible=TrueText1.Text=""Text2.Text=""Text3.Text=""Command1.Caption="确定"Command2.Caption="取消"Text1.SetFocusEndSubPrivateSubCommand3_MouseDown(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle) Label6.Visible=TrueEndSubPrivateSubCommand3_MouseUp(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle) Label6.Visible=FalseEndSubPrivateSubForm_Load()Label3.Visible=FalseText3.Visible=FalseEndSubPrivateSubTimer1_Timer()'时间time1控件的time事件代码,用来'显示向左移动的欢迎字幕IfLabel4.Left+Label4.Width>0Then'当标签右边位置大于0时,标签向左移Else'否则标签从头开始Label4.Left=Form1.ScaleWidthEndIfIfLabel5.Left+Label5.Width>0ThenElseLabel5.Left=Form1.ScaleWidthEndIfEndSub主界面窗体如下:代码: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&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndSubPrivateSubCKCZ_Click()'Form2.HideForm6.ShowEndSubPrivateSubCKJSHR_Click()Frame2.Caption="出库信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from出库表where经手人='"&JSHR&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCKSHJ_Click()Frame2.Caption="出库信息"DimCHKRQAsStringDimnAsStringCHKRQ=InputBox("出库日期,格式为:月/日/年如:12/1/2011","请输入",0) n="select*from出库表where出库日期='"&CHKRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubCKZCX_Click()Frame2.Caption="出库信息"DimZBAsStringZB="select*from出库表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid1EndSubPrivateSubCommand1_Click()IfText1.Text=""Then'提示用户输入用户名MsgBox"请输入用户名!",,"登录信息提示:"ExitSubElse'DimusenameAsString'检测用户名是否已经存在DimstrSAsStringusename=Trim(Text1.Text)strS="select*from用户登录信息表where用户名='"&usename&"'"mandType=adCmdTextAdodc1.RecordSource=strSAdodc1.RefreshMsgBox"您输入的用户已存在!",,"登录提示信息:"Text1.Text=""Text2.Text=""Text3.Text=""Text1.SetFocusExitSubEndIfEndIfIfText2.Text=""Then'提示用户密码不能为空MsgBox"密码不能为空!",,"登录提示信息:"Text2.SetFocusExitSubEndIfIfText3.Text=""ThenMsgBox"请再次输入密码!",,"登录提示信息:"Text3.SetFocusExitSubEndIfIfText2.Text<>Text3.TextThenMsgBox"两次输入的密码不一致,请确认!",,"登录提示信息:"Text2.Text=""Text3.Text=""Text2.SetFocusExitSubElseeDimXAsIntegerX=MsgBox("成功添加新用户,是否要重新登录!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbYesThenUnloadMeForm3.ShowEndIf'MsgBox("成功添加新用户!")'Label3.Visible=False'Text3.Visible=False'Command1.Caption="登录"'Command2.Caption="退出"EndIfFrame1.Visible=FalseFrame2.Visible=TrueText1.Text=""Text2.Text="'"Text3.Text=""'Form3.ShowEndSubPrivateSubCommand2_Click() Frame1.Visible=FalseFrame2.Visible=TrueEndSubPrivateSubCXDL_Click()Form3.Show'UnloadMeEndSubPrivateSubExit_Click()EndUnloadForm1UnloadForm2UnloadForm3UnloadForm4UnloadForm5UnloadForm6UnloadForm7UnloadForm8EndSubPrivateSubForm_Load() UnloadForm1Frame1.Visible=False CallInitGrid0Me.Height=MDIForm1.Height-1060 Me.Width=MDIForm1.Width-560 Me.Top=MDIForm1.TopMe.Left=MDIForm1.LeftEndSubPrivateSubGHCZ_Click()'Form2.HideForm8.ShowEndSubFrame2.Caption="归还信息"DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)n="select*from归还表where品名='"&pm&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHRCX_Click()Frame2.Caption="归还信息"DimJCRAsStringDimnAsStringJCR=InputBox("归还人","请输入",0)n="select*from归还表where归还人='"&JCR&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHSJCX_Click()Frame2.Caption="归还信息"DimJCRQAsStringDimnAsStringJCRQ=InputBox("归还日期,格式为:月/日/年如:12/1/2011","请输入",0) n="select*from归还表where归还日期='"&JCRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubGHXHCX_Click()Frame2.Caption="归还信息"DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)n="select*from归还表where型号='"&XH&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubFrame2.Caption="归还信息"DimZBAsStringZB="select*from归还表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCCZ_Click()'Form2.HideForm7.ShowEndSubPrivateSubJCHPMCHX_Click()Frame2.Caption="借出信息"DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)n="select*from借出表where品名='"&pm&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCHXHCHX_Click()Frame2.Caption="借出信息"DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)n="select*from借出表where型号='"&XH&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJCRCX_Click()Frame2.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()Frame2.Caption="借出信息"DimZBAsStringZB="select*from借出表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid2EndSubPrivateSubJSHRCHX_Click()Frame2.Caption="归还信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from归还表where经手人='"&JSHR&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid2EndSubPrivateSubJSHRCX_Click()Frame2.Caption="借出信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from借出表where经手人='"&JSHR&"'"mandType=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="入库信息"DimJSHRAsStringDimnAsStringJSHR=InputBox("经手人","请输入",0)n="select*from入库表where经手人='"&JSHR&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubRKPMCHX_Click()Frame2.Caption="入库信息"DimpmAsStringDimnAsStringpm=InputBox("产品名","请输入",0)IfLen(pm)>0Thenn="select*from入库表where品名='"&pm&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid1EndSubPrivateSubRKSHJ_Click()Frame2.Caption="入库信息"DimRKRQAsStringDimnAsStringRKRQ=InputBox("入库日期,格式为:月/日/年如:12/1/2011","请输入",0)n="select*from入库表where入库日期='"&RKRQ&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshCallInitGrid1EndSubPrivateSubRKXHCHX_Click()Frame2.Caption="入库信息"DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)IfLen(XH)>0Thenn="select*from入库表where型号='"&XH&"'"mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid1EndSubPrivateSubRKZCX_Click()Frame2.Caption="入库信息"DimZBAsStringZB="select*from入库表"mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid1EndSubPrivateSubTimer1_Timer()IfLabel4.Left+Label4.Width>0Then'当标签右边位置大于0时,标签向左移Else'否则标签从头开始Label4.Left=Form2.ScaleWidthEndIfIfLabel5.Left+Label5.Width>0ThenElseLabel5.Left=Form2.ScaleWidthEndIfIfLabel6.Left+Label6.Width>0ThenElseLabel6.Left=Form2.ScaleWidthEndIfIfLabel7.Left+Label7.Width>0ThenElseLabel7.Left=Form2.ScaleWidthEndIfEndSubPrivateSubXGMM_Click()'Form2.HideForm4.ShowEndSubPrivateSubXHCX_Click()Frame2.Caption="库存信息"DimXHAsStringDimnAsStringXH=InputBox("产品型号","请输入",0)IfLen(XH)>0Then'AndVal(XH)<>0n="select*from库存表where型号='"&XH&"'" mandType=adCmdTextAdodc2.RecordSource=nAdodc2.RefreshEndIfCallInitGrid0EndSubPrivateSubZB_Click()Frame2.Caption="库存信息"DimZBAsString'DimNAsString'PM=InputBox("产品名","请输入",0)ZB="select*from库存表"'where品名='"&PM&"'" mandType=adCmdTextAdodc2.RecordSource=ZBAdodc2.RefreshCallInitGrid0EndSubPrivateSubInitGrid0()WithDataGrid1.Columns(0).Width=1600.Columns(1).Width=2200.Columns(2).Width=2200.Columns(3).Width=1000.Columns(4).Width=1000.Columns(5).Width=4000EndWithEndSubPrivateSubInitGrid1()WithDataGrid1.Columns(0).Width=800.Columns(1).Width=1600.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(0).Caption="学号"'.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=1000.Columns(7).Width=800.Columns(8).Width=4000EndWithEndSub用户重新登录界面代码:PrivateSubCommand1_Click()DimstrSnoAsStringDimstrSelectAsStringstrSno=Trim(Text1.Text)'检测用户名是否存在strSelect="select密码from用户登录信息表where用户名='"&strSno&"'" mandType=adCmdTextAdodc1.RecordSource=strSelectAdodc1.RefreshMsgBox"用户名不存在,请重新输入!",,"登录提示信息:"Text1.Text=""Text2.Text=""Text1.SetFocusEndIfUnloadMeForm2.Show'MsgBox"登陆成功!",,"登录提示信息:"ElseMsgBox"密码不正确,请重新输入!",,"登录提示信息:"Text2.Text=""Text2.SetFocusEndIfEndSubPrivateSubCommand2_Click()UnloadMeForm2.ShowEndSub修改用户密码界面代码:PrivateSubCommand1_Click()IfTrim(Text1.Text)<>Form2.TextUserNameThenMsgBox"用户名不正确,请确认!",,"信息提示!"Text1.Text=""Text1.SetFocusExitSubElseDimnameAsStringDimnamesAsStringname=Trim(Text1.Text)names="select*from用户登录信息表where用户名='"&name&"'" mandType=adCmdTextAdodc1.RecordSource=namesAdodc1.RefreshIfText2.Text=""ThenMsgBox"请输入旧密码!",,"信息提示!"Text2.SetFocusExitSubEndIfMsgBox"旧密码不正确,请确认!",,"信息提示!"Text2.Text=""Text2.SetFocusExitSubEndIfIfText3.Text=""ThenMsgBox"请输入新密码!",,"信息提示!"Text3.SetFocusEndIfIfText4.Text=""ThenMsgBox"请再次输入新密码!",,"信息提示!"Text4.SetFocusExitSubEndIfIfTrim(Text3.Text)<>Trim(Text4.Text)ThenMsgBox"两次输入的新密码不一致!",,"信息提示!"Text3.Text=""Text4.Text=""Text3.SetFocusExitSubElseMsgBox("密码修改成功!")UnloadMe'Form2.ShowEndIfEndIfEndSubPrivateSubCommand2_Click()UnloadMe'Form2.ShowEndSub入库管理代码:PrivateSubCommand1_Click()IfText1.Text=""AndText2.Text=""ThenMsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!" ExitSubText1.SetFocusElseIfText3.Text=""AndText4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"Text3.SetFocusExitSubEndIfIfText5.Text=""ThenMsgBox"请经手人签名!",vbCritical,"提示信息!"Text5.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Text1.Text)n=Val(Text3.Text)pms="select*from库存表where品名='"&pm&"'"WithForm2EndWithElseEndIfEndIfDimXAsIntegerX=MsgBox("产品入库登记成功,是否继续添加产品!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbNoThenUnloadMe'Form2.ShowElseText1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""Text5.Text=""Text6.Text=""Text7.Text=""Text1.SetFocusEndIfDimZBAsStringZB="select*from入库表"'where品名='"&PM&"'"EndSubPrivateSubCommand2_Click()Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""Text5.Text=""Text6.Text=""Text7.Text=""Text1.SetFocusEndSubPrivateSubCommand3_Click()UnloadMe'Form2.ShowEndSub出库管理代码:PrivateSubCommand1_Click()IfCombo1.Text=""AndCombo2.Text=""Then'text1.Text=""AndText2.Text=""ThenMsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!"ExitSubElseIfText1.Text=""AndCombo3.Text=""Then'Text4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"Text2.SetFocusExitSubEndIfIfText2.Text=""ThenMsgBox"请经手人签名!",vbCritical,"提示信息!"Text2.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms="select*from库存表where品名='"&pm&"'"EndIfDimXAsIntegerX=MsgBox("产品出库登记成功,是否继续添加产品!",vbYesNo+vbQuestion+vbDefaultButton1,"提示信息!") IfX=vbNoThenUnloadMe'Form2.ShowEndIfCombo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""DimZBAsStringZB="select*from出库表"'where品名='"&PM&"'"EndSubPrivateSubCommand2_Click()Combo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""EndSubPrivateSubCommand3_Click()UnloadMe'Form2.ShowEndSubPrivateSubForm_Load()Adodc2.RefreshLoopEndSub借出管理代码: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.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms="select*from库存表where品名='"&pm&"'"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&"'"EndSubPrivateSubCommand2_Click()Combo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""EndSubPrivateSubCommand3_Click()UnloadMeForm2.ShowEndSubPrivateSubForm_Load()Adodc2.RefreshLoopEndSub归还管理代码:PrivateSubCommand1_Click()IfCombo1.Text=""AndCombo2.Text=""Then'text1.Text=""AndText2.Text=""ThenMsgBox"“品名”和“型号”不能同时为空,必须输入其中一项!",,"提示信息!"ExitSubElseIfText1.Text=""AndCombo3.Text=""Then'Text4.Text=""ThenMsgBox"请输入产品“数量”或“单位”之一!",,"提示信息!"Text1.SetFocusExitSubEndIfIfText2.Text=""ThenMsgBox"请经手人签名!",vbCritical,"提示信息!"Text2.SetFocusExitSubEndIfIfText3.Text=""ThenMsgBox"请输入归还人姓名!",vbCritical,"提示信息!"Text3.SetFocusExitSubEndIfAdodc1.RefreshEndIfDimpmAsStringDimpmsAsStringDimnAsStringDimmAsStringpm=Trim(Combo1.Text)n=Val(Text1.Text)pms="select*from库存表where品名='"&pm&"'"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&"'"EndSubPrivateSubCommand2_Click()Combo1.Text=""Combo2.Text=""Combo3.Text=""Text1.Text=""Text2.Text=""Text3.Text=""Text4.Text=""EndSubPrivateSubCommand3_Click()UnloadMeForm2.ShowEndSubPrivateSubForm_Load()'DimiAsString'i=0'Adodc2.Refresh'i=i+1'LoopCallpmEndSubPrivateSubpm()DimiAsVariantDimjAsVariantDimkAsVariantDimaAsVariantDimbAsVariantDimcAsVariantDimsAsVariantDimDAsVarianti=0j=0Adodc2.Refreshi=i+1LoopD=Split(a,",")Ifj<iThens=D(2)Combo1.AddItems'k=0'Ifk<jAndD(k)<>D(j)Then'IfD(k)<>D(j)Then'Combo1.AddItemD(j)'k=k+1'Else'k=k+1'EndIf'EndIfj=j+1EndIfText5.Text=s'a+","+D(2)+D(1)'+""+Val(i)+""+Val(j)+""+Val(k) Text6.Text=j'Combo1.AddItemD(1) EndSub。

pm仓库管理系统源代码

pm仓库管理系统源代码

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD><meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1"><!- Sitemap 1.0 -></HEAD><BODY><OBJECT type="text/site properties”〉<param name="Window Styles" value="0x800025"><param name="lmageType" value="Folder"></OBJECT><UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="仓库管理系统 "><param name="Local" value="仓库管理系统.htm"><param name="lmageNumber" value="1"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="简介"><param name="Local" value="仓库管理系统.htm/#1"><param name="lmageNumber" value="1"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="使用说明"><param name="Local" value="仓库管理系统.htm/#2"><param name="lmageNumber" value="1"></OBJECT><UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="登记信息”〉<param name="Local" value="仓库管理系统.htm/#2_1"><param name="lmageNumber" value="1"></OBJECT><UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="货物信息"><param name="Local" value="仓库管理系统.htm/#2_1_1"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="仓库信息 "><param name="Local" value="仓库管理系统,htm/#2_1_2"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="供应商"><param name="Local" value="仓库管理系</OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="住来客户 "><param name="Local" value="仓库管理系</OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="库存状况 "><param name="Local" value="仓库管理系</OBJECT></UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="单据管理"><param name="Local" value="仓库管理系统,htm/#2_2"><param name="lmageNumber" value="1"></OBJECT><UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="入库单"><param name="Local" value="仓库管理系</OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="出库单"><param name="Local" value="仓库管理系</OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="借入单"><param name="Local" value="仓库管理系</OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="借出单"><param name="Local" value="仓库管理系</OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="调拔单"><param name="Local" value="仓库管理系统,htm/#2_2_5"><LI> <OBJECT type="text/sitemap"><param name="Name" value="报损单"><param name="Local" value="仓库管理系统,htm/#2_2_6"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="月盘点"><param name="Local" value="仓库管理系统,htm/#2_2_7"></OBJECT></UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="查询统计"><param name="Local" value="仓库管理系统,htm/#2_3"><param name="lmageNumber" value="1"></OBJECT><UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="单据查询 "><param name="Local" value="仓库管理系统,htm/#2_3_1"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="库存查询 "><param name="Local" value="仓库管理系统,htm/#2_3_2"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="高级查询 "><param name="Local" value="仓库管理系统,htm/#2_3_3"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="自定义查询 "><param name="Local" value="仓库管理系统,htm/#2_3_4"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="管理自定义查询 "><param name="Local" value="仓库管理系</OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="货物出入统计 "><param name="Local" value="仓库管理系统,htm/#2_3_6"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="职员操作统计"><param name="Local" value="仓库管理系统,htm/#2_3_7"></UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="维护设置"><param name="Local" value="仓库管理系统,htm/#2_4"><param name="lmageNumber" value="1"></OBJECT><UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="公司信息 "><param name="Local" value="仓库管理系统.htm/#2_4_1"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="职员信息 "><param name="Local" value="仓库管理系统,htm/#2_4_2"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="查看日志 "><param name="Local" value="仓库管理系统,htm/#2_4_3"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="数据清除"><param name="Local" value="仓库管理系统,htm/#2_4_4"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="系统初始化 "><param name="Local" value="仓库管理系统,htm/#2_4_5"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="备份数据库"><param name="Local" value="仓库管理系统,htm/#2_4_6"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="还原数据库”><param name="Local" value="仓库管理系统,htm/#2_4_7"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="还原到昨天数据库 "><param name="Local" value="仓库管理系统,htm/#2_4_8"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="修改密码 "><param name="Local" value="仓库管理系统,htm/#2_4_9"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="用户管理 "><param name="Local" value="仓库管理系统,htm/#2_4_10"></OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="换用户登陆”><param name="Local" value="仓库管理系统.htm/#2_4_11"></OBJECT></UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="帮助使用"><param name="Local" value="仓库管理系统.htm/#2_5"><param name="lmageNumber" value="1"></OBJECT></UL><LI> <OBJECT type="text/sitemap"><param name="Name" value="技术支持 "><param name="Local" value="仓库管理系统,htm/#3"><param name="lmageNumber" value="1"></OBJECT></UL></BODY></HTML><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD><meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1"><!-- Sitemap 1.0 --></HEAD><BODY><UL><LI>〈OBJECT type="text/sitemap"><param name="Name" value="货物信息"><param name="Name" value="货物信息"><param name="Local" value="仓库管理系统.htm/#2_1_1"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="仓库信息"><param name="Name" value="仓库信息"><param name="Local" value="仓库管理系统.htm/#2_1_2"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="供应商"><param name="Name" value="供应商"><param name="Local" value="仓库管理系统.htm/#2_1_3"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="往来客户"><param name="Name" value="往来客户"><param name="Local" value="仓库管理系统.htm/#2_1_4"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="帮助使用"><param name="Name" value="帮助使用"><param name="Local" value="仓库管理系统.htm/#2_5"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="库存状况"><param name="Name" value="库存状况"><param name="Local" value="仓库管理系统.htm/#2_1_5"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="入库单"><param name="Name" value="入库单"><param name="Local" value="仓库管理系统.htm/#2_2_1"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="出库单"><param name="Name" value="出库单"><param name="Local" value="仓库管理系统.htm/#2_2_2"> </OBJECT> <LI>〈OBJECT type="text/sitemap"><param name="Name" value="借入单"><param name="Name" value="借入单"><param name="Local" value="仓库管理系统.htm/#2_2_3"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="借出单"><param name="Name" value="借出单"><param name="Local" value="仓库管理系统.htm/#2_2_4"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="调拔单"><param name="Name" value="调拔单"><param name="Local" value="仓库管理系统.htm/#2_2_5"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="报损单"><param name="Name" value="报损单"><param name="Local" value="仓库管理系统.htm/#2_2_6"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="月盘点"><param name="Name" value="月盘点"><param name="Local" value="仓库管理系统.htm/#2_2_7"> </OBJECT><LI> <OBJECT type="text/sitemap"><param name="Name" value="单据查询"><param name="Name" value="单据查询"><param name="Local" value="仓库管理系统.htm/#2_3_1"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="库存查询"><param name="Name" value="库存查询"><param name="Local" value="仓库管理系统.htm/#2_3_2"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="高级查询"><param name="Name" value="高级查询"><param name="Local" value="仓库管理系统.htm/#2_3_3"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="自定义查询"><param name="Name" value="自定义查询 "><param name="Local" value="仓库管理系统.htm/#2_3_4"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="管理自定义查询 "><param name="Name" value="管理自定义查询 "><param name="Local" value="仓库管理系统.htm/#2_3_5"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="货物出入统计 "><param name="Name" value="货物出入统计 "><param name="Local" value="仓库管理系统.htm/#2_3_6"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="职员操作统计"><param name="Name" value="职员操作统计"><param name="Local" value="仓库管理系统.htm/#2_3_7"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="公司信息 "><param name="Name" value="公司信息 "><param name="Local" value="仓库管理系统.htm/#2_4_1"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="职员信息 "><param name="Name" value="职员信息 "><param name="Local" value="仓库管理系统.htm/#2_4_2"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="查看日志 "><param name="Name" value="查看日志 "><param name="Local" value="仓库管理系统.htm/#2_4_3"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="数据清除"><param name="Name" value="数据清除"><param name="Local" value="仓库管理系统.htm/#2_4_4"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="系统初始化 "><param name="Name" value="系统初始化 "><param name="Local" value="仓库管理系统.htm/#2_4_5"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="备份数据库"><param name="Name" value="备份数据库"><param name="Local" value="仓库管理系统.htm/#2_4_6"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="还原数据库 "><param name="Name" value="还原数据库 "><param name="Local" value="仓库管理系统.htm/#2_4_7"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="还原到昨天数据库 "><param name="Name" value="还原到昨天数据库 "><param name="Local" value="仓库管理系统.htm/#2_4_8"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="修改密码"><param name="Name" value="修改密码"><param name="Local" value="仓库管理系统.htm/#2_4_9"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="用户管理 "><param name="Name" value="用户管理 "><param name="Local" value="仓库管理系统.htm/#2_4_10"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="换用户登陆"><param name="Name" value="换用户登陆"><param name="Local" value="仓库管理系统.htm/#2_4_11"> </OBJECT> <LI> <OBJECT type="text/sitemap"><param name="Name" value="技术支持 "><param name="Name" value="技术支持 "><param name="Local" value="仓库管理系统.htm/#3"></OBJECT></UL></BODY></HTML>[Option 司Binary Index = NoCompatibility = 1.1 Or later Compiled file = 仓库管理系统.chm Contents file = 仓库管理系统.hhc Default topic = 仓库管理系统.htmDisplay compile progress=No Index file =仓库管理系统.hhk Language=0x804 中文(中国) Title=仓库管理系统 1.0[File s]仓库管理系统.htm [ALIAS]H0=仓库管理系统H1 =仓库管理系统H2=仓库管理系统H2=仓库管理系统 h21 =仓库管理系统 .htm ; 0 .htm/#1 ; 1 .htm/#2 ; 2.htm/#3 ; 3.htm/#2_1 ; 21.htm/#2_1_1 ; 211.htm/#2_1_2 ; 212.htm/#2_1_3 ; 213 .htm/#2_1_4 ; 214 .htm/#2_1_5 ; 215 .htm/#2_2_1 ; 221 .htm/#2_2_2 ; 222.htm/#2_2_3 ; 223.htm/#2_2_4 ; 224.htm/#2_2_5 ; 225.htm/#2_2_6 ; 226.htm/#2_2_7 ; 227H23=仓库管理系统.htm/#2_3 ; 23 H231 =仓库管理系统 H232=仓库管理系统H233=仓库管理系统H234=仓库管理系统H235=仓库管理系统H236=仓库管理系统H237=仓库管理系统H24=仓库管理系统.htm/#2_4 ; 24H241 =仓库管理系统.htm/#2_4_1 ; 241H2410=仓库管理系统.htm/#2_4_10 ; 2410H2411 =仓库管理系统.htm/#2_4_11 ; 2411H242=仓库管理系统.htm/#2_4_2 ; 242H246=仓库管理系统.htm/#2_4_6 ; 246H211 =仓库管理系统 H212=仓库管理系统 H213=仓库管理系统 H214=仓库管理系统H215=仓库管理系统H221 =仓库管理系统 H222=仓库管理系统 H223=仓库管理系统 H224=仓库管理系统 H225=仓库管理系统 H226=仓库管理系统 H227=仓库管理系统 .htm/#2_3_1 ; 231.htm/#2_3_2 ; 232.htm/#2_3_3 ; 233 .htm/#2_3_4 ; 234 .htm/#2_3_5 ; 235 .htm/#2_3_6 ; 236 .htm/#2_3_7 ; 237H243=仓库管理系统H244=仓库管理系统H245=仓库管理系统 .htm/#2_4_3 ; 243 .htm/#2_4_4 ; 244 .htm/#2_4_5 ; 245H247=仓库管理系统,htm/#2_4_7 ; 247 H248=仓库管理系统.htm/#2_4_8 ; 248 H249=仓库管理系统.htm/#2_4_9 ; 249 H25=仓库管理系统.htm/#2_5 ; 25H3=仓库管理系统.htm/#3 ; 3[MAP]#include仓库管理系统.h [INFOTYPES]。

数据库VB编写公司产品信息管理系统界面源代码

数据库VB编写公司产品信息管理系统界面源代码

If (Adodc1.Recordset.RecordCount = 0) Then '无记录才可注册新用户
If KEY1.Text = KEY2.Text Then
Adodc1.Recordset.AddNew
Adodc1.Recordset("用户名") = USERNAME.Text
strName = "'" + FIND_USER.Text + "'"
Adodc1.RecordSource = "select * from 产品清单 where 型号 = " + strName
Adodc1.Refresh
End SLeabharlann b ///////////////////////////////////////////////
制作人:成都信息工程学院 => 缪林
///////////////////////////////////////////////
本数据库操作软件实现的是公司产品信息管理,在VB平台上创建可操作界面,实现功能有:
Adodc1.Refresh
DataGrid1.Col = UserCol
Adodc1.Recordset.Delete '删除
Adodc1.Recordset.Update
Adodc1.RecordSource = "select * from 产品清单"
Adodc1.Recordset("价格") = blank3.Text
Adodc1.Recordset("产地") = blank4.Text

PB仓库管理系统(流程图+ER图+源代码+论文设计)-论文

PB仓库管理系统(流程图+ER图+源代码+论文设计)-论文

PB仓库管理系统(流程图+ER图+源代码+论文设计)-论文PB仓库管理系统(流程图+ER图+源代码+论文设计)一、论文题目:仓库管理信息系统的开发二、题目研究内容:当今社会为信息社会,世界已进入在计算机信息管理领域中激烈竞争的时代。

信息已成为继劳动力、土地、资本之后的又一大资源,谁控制的信息越多,谁利用信息资源的效率越高,谁就会在各方面的竞争中,占有一席之地,谁就会更有优势,这一点已得到举世公认。

随着WTO的加入和我国工业的迅猛发展,为了抓住机遇,在竞争占得先机,作为生产企业的一个必不可少的重要环节—仓库管理的信息化、计算机化也就迫在眉捷了。

开发仓库管理信息系统即有宏观上的意义,那就是顺应时代信息化、现代化潮流,提高效益,促进国民经济结构优化;也有微观上的意义,那就是可以提高管理的现代化程序,加强管理的信息化手段,提高工作效率,增加单位效益。

仓库管理的对象是很多的,广而言之,它可以包括:商业、企业仓库的商品,图书馆仓库的图书,博物馆仓库的展品等等。

在这里本文仅涉及工业企业的产品仓库。

它主要包括下列三部分:1、没有经过企业加工,而为企业生产或其他各方面所需要的原材料、燃料、半成品、部件等,如钢材、轴承、发动机、电动机等。

2、已经过企业加工,但尚未加工完毕的在制品。

3、企业已加工完毕,储而待销的成品与备件等。

仓库管理系统对仓库进行全面的管理和监控,缩短了仓库信息流转时间,使企业的物料管理层次分明、井然有序,为采购、销售和生产提供依据;智能化的预警功能可自动提示存货的短缺、超储等异常状况;减少资金积压。

完善的仓库管理功能,可对企业的存货进行全面的控制和管理,降低仓库成本,增强企业的市场竞争力。

仓库管理信息系统研究的内容涉及仓库管理的全过程,包括入库、出库、仓库余额管理等等。

三、调研情况1、国内外现状研究:网学网是个大垃圾网站,只会抄六维论文上面的论文计算机在管理中的应用开始于1954年,当时美国首先用计算机处理工资单。

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

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

材料入库模块源代码如下:Private Sub Co米米and1_Click()If Text1.Text <> "" And Text2.Text <> "" And DTPicker1.Value <> "" And Text4.Text <> "" And Text5.Text <> "" And DataCo米bo1.Text <> "" And Text7.Text <> "" ThenAdodc1.RefreshAdodc2.RecordSource = "select * fro米库存材料清单where 材料号='" & Text1.Text & "'" Adodc2.RefreshIf Adodc2.Recordset.BOF Then米sg$ = "确定要添加该记录吗?"ans = 米sgBox(米sg$, 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) = DataCo米bo1.TextAdodc1.Recordset.Fields(6) = Text7.TextAdodc1.Recordset.Fields(7) = Text8.TextAdodc1.Recordset.Update米sgBox ("保存成功!!*_*")End IfElse 米sgBox "材料号不能重复,该材料号已存在!!", 48, "警告"End IfElse 米sgBox "资料输入不全,请重新输入!!", 64, "提示"End IfText1.SetFocusText1.Text = ""Text2.Text = ""Text4.Text = ""Text5.Text = ""DataCo米bo1.Text = ""Text7.Text = ""Text8.Text = ""End SubPrivate Sub Co米米and2_Click()Text1.Text = ""Text2.Text = ""Text4.Text = ""Text5.Text = ""DataCo米bo1.Text = ""Text7.Text = ""Text8.Text = ""End SubPrivate Sub Co米米and3_Click()Unload 米eEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;" ado = ado + "Data Source=" + 米path + "database.米db"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.米oveFirstWhile Not Adodc1.Recordset.EOFIf Adodc1.Recordset.Fields(0) = Text1.Text Then米sgBox "该材料号已经存在,请重新输入!!", 48, "提示"Text1.Text = ""End IfAdodc1.Recordset.米oveNextWendEnd IfEnd SubPrivate Sub Text7_GotFocus()If Not Adodc3.Recordset.BOF ThenAdodc3.Recordset.米oveFirstWhile Not Adodc3.Recordset.EOFIf Adodc3.Recordset.Fields(0) = DataCo米bo1.Text ThenText7.Text = Adodc3.Recordset.Fields(1)End IfAdodc3.Recordset.米oveNextWendEnd IfEnd Sub库存管理模块源代码如下:Di米sql As StringPrivate Sub Co米米and1_Click()If DataCo米bo1.Text = "" And DataCo米bo2.Text = "" And DataCo米bo3.Text = "" Then米sgBox "请在组合框中输入你要查询的内容!!", 64, "提示"ElseIf DataCo米bo1.Text = "" And DataCo米bo2.Text = "" And DataCo米bo3.Text <> "" Then sql = "select * fro米库存材料清单where 供应商号= '" & DataCo米bo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCo米bo1.Text = "" And DataCo米bo2.Text <> "" And DataCo米bo3.Text = "" Then sql = "select * fro米库存材料清单where 进货日期='" & DataCo米bo2.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCo米bo1.Text = "" And DataCo米bo2.Text <> "" And DataCo米bo3.Text <> "" Then sql = "select * fro米库存材料清单where 进货日期='" & DataCo米bo2.Text & "' and 供应商号='" & DataCo米bo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCo米bo1.Text <> "" And DataCo米bo2.Text = "" And DataCo米bo3.Text = "" Then sql = "select * fro米库存材料清单where 材料号='" & DataCo米bo1.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCo米bo1.Text <> "" And DataCo米bo2.Text = "" And DataCo米bo3.Text <> "" Then sql = "select * fro米库存材料清单where 材料号='" & DataCo米bo1.Text & "' and 供应商号='" & DataCo米bo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCo米bo1.Text <> "" And DataCo米bo2.Text <> "" And DataCo米bo3.Text = "" Then sql = "select * fro米库存材料清单where 材料号='" & DataCo米bo1.Text & "' and 进货日期='" & DataCo米bo2.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshElseIf DataCo米bo1.Text <> "" And DataCo米bo2.Text <> "" And DataCo米bo3.Text <> "" Thensql = "select * fro米库存材料清单where 材料号='" & DataCo米bo1.Text & "' and 进货日期='" & DataCo米bo2.Text & "' and 供应商号='" & DataCo米bo3.Text & "'"Adodc1.RecordSource = sqlAdodc1.RefreshEnd IfIf Adodc1.Recordset.BOF Then米sgBox "对不起,该库存不存在!!", 64, "提示"End IfEnd SubPrivate Sub Co米米and2_Click()Unload 米eEnd SubPrivate Sub Co米米and3_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCo米米and3.Caption = "锁定"米sgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCo米米and3.Caption = "修改"米sgBox "您进入锁定状态!"End IfEnd SubPrivate Sub Co米米and4_Click()米sg$ = "确定要删除该库存材料记录吗?"ans = 米sgBox(米sg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK ThenAdodc1.Recordset.DeleteAdodc1.Recordset.米oveNextEnd IfEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + 米path + "database.米db"Adodc1.ConnectionString = adoAdodc1.RecordSource = "库存材料清单"Adodc1.RefreshAdodc2.ConnectionString = adoAdodc2.RecordSource = "库存材料清单"Adodc2.RefreshIf er_type <> 1 ThenCo米米and3.Enabled = FalseCo米米and4.Enabled = FalseEnd IfEnd Sub美容项目定义模块源代码如下:Private Sub Co米米and1_Click()If Text1.Text <> "" And Text2.Text <> "" And Text3.Text <> "" ThenAdodc2.RecordSource = "select * fro米美容项目定义表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.UpdateElse米sgBox "该美容项目编号已存在!!", 48, "警告"End IfElse米sgBox "资料输入不全,请重新输入!!", 64, "提示"End IfText1.Text = ""Text2.Text = ""Text3.Text = ""Text1.SetFocusEnd SubPrivate Sub Co米米and2_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""End SubPrivate Sub Co米米and3_Click()Unload 米eEnd SubPrivate Sub Co米米and4_Click()米sg$ = "确定要删除该美容项目吗?"ans = 米sgBox(米sg$, vbOKCancel + vbDefaultButton2, "删除记录") If ans = vbOK ThenAdodc1.Recordset.DeleteAdodc1.Recordset.米oveNextEnd IfEnd SubPrivate Sub Co米米and5_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCo米米and5.Caption = "锁定"米sgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCo米米and5.Caption = "修改"米sgBox "您进入锁定状态!"End IfEnd SubPrivate Sub Text2_GotFocus()If Not Adodc1.Recordset.BOF ThenAdodc1.Recordset.米oveFirstWhile Not Adodc1.Recordset.EOFIf Adodc1.Recordset.Fields(0) = Text1.Text Then米sgBox "该美容项目编号已经存在,请重新输入!!", 48, "提示"Text1.Text = ""End IfAdodc1.Recordset.米oveNextWendEnd IfEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + 米path + "database.米db"Adodc1.ConnectionString = adoAdodc1.RecordSource = "美容项目定义表"Adodc1.RefreshAdodc2.ConnectionString = adoEnd Sub美容项目查询模块源代码如下:Private Sub Co米米and1_Click()If DataCo米bo1.Text = "" Then米sgBox ("输入不能为空!!")ElseAdodc2.RecordSource = "select * fro米美容项目定义表where 美容项目名称='" & DataCo 米bo1.Text & "'"Adodc2.RefreshDataGrid1.Colu米ns(0).Width = 1200DataGrid1.Colu米ns(1).Width = 1200DataGrid1.Colu米ns(2).Width = 1200End IfEnd SubPrivate Sub Co米米and2_Click()Unload 米eEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + 米path + "database.米db"Adodc1.ConnectionString = adoAdodc1.RecordSource = "美容项目定义表"Adodc1.RefreshAdodc2.ConnectionString = adoEnd Sub来车登记模块源代码如下:Di米sql As StringPrivate Sub Co米米and1_Click()If DTPicker1.Value <> "" And Text2.Text <> "" And Text3.Text <> "" And Text4.Text <> "" And DataCo米bo1.Text <> "" Then米sg$ = "确定要添加该登记吗?"ans = 米sgBox(米sg$, 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) = DataCo米bo1.TextAdodc1.Recordset.Fields(5) = Text5.TextAdodc1.Recordset.Update米sgBox ("成功登记!!~-~")ElseExit SubEnd IfDi米sql As Stringsql = "select * fro米车辆基本信息表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 IfElse米sgBox "资料输入不全,请重新输入!!", 64, "提示"End IfDTPicker1.SetFocusText2.Text = ""Text3.Text = ""Text4.Text = ""DataCo米bo1.Text = ""Text5.Text = ""End SubPrivate Sub Co米米and2_Click()Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""DataCo米bo1.Text = ""End SubPrivate Sub Co米米and3_Click()Unload 米eEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;" ado = ado + "Data Source=" + 米path + "database.米db"Adodc1.ConnectionString = adoAdodc1.RecordSource = "来车登记表"Adodc1.RefreshAdodc2.ConnectionString = adoAdodc2.RecordSource = "车辆基本信息表"Adodc2.RefreshAdodc3.ConnectionString = adoAdodc4.ConnectionString = adoAdodc4.RecordSource = "b米xx"Adodc4.RefreshEnd Sub车辆基本信息管理模块源代码如下:Private Sub Co米米and1_Click()查询车辆基本信息.ShowEnd SubPrivate Sub Co米米and2_Click()Unload 米eEnd SubPrivate Sub Co米米and3_Click()米sg$ = "确定要删除该项信息吗?"ans = 米sgBox(米sg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK ThenAdodc1.Recordset.DeleteAdodc1.Recordset.米oveNextEnd IfEnd SubPrivate Sub Co米米and4_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCo米米and4.Caption = "锁定"米sgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCo米米and4.Caption = "修改"米sgBox "您进入锁定状态!"End IfEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + 米path + "database.米db"Adodc1.ConnectionString = adoAdodc1.RecordSource = "车辆基本信息表"Adodc1.RefreshIf er_type <> 1 ThenCo米米and3.Enabled = FalseCo米米and4.Enabled = FalseEnd IfEnd Sub车辆美容信息管理模块源代码如下:Private Sub Co米米and1_Click()Di米su米1, x, z As CurrencyDi米y, n1, l, l1 As Longsu米1 = 0n1 = 0l1 = 0If CStr(DTPicker1.Value) <> "" And Text2.Text <> "" And Text3.Text <> "" And DataCo米bo1.Text <> "" And DataCo米bo5.Text <> "" And DataCo米bo6.Text <> "" Then'修改库存材料清单Di米q, q1 As Longq1 = 0If Not Adodc5.Recordset.BOF ThenAdodc5.RefreshAdodc5.Recordset.米oveFirstWhile Not Adodc5.Recordset.EOFIf Adodc5.Recordset.Fields(0) = DataCo米bo5.Text And Adodc5.Recordset.Fields(1) = DataCo米bo6.Text Thenq1 = 1If Adodc5.Recordset.Fields(4) < CLng(Text3.Text) Then米sgBox "这种材料的库存数量不够!!", 48, "警告"DataCo米bo5.Text = ""DataCo米bo6.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.米oveNextWendIf q1 = 0 Then米sgBox "库存中没有这种材料!!", 48, "警告"End If'修改库存材料清单完毕End IfIf q1 = 1 ThenAdodc6.RefreshIf Not Adodc6.Recordset.BOF ThenAdodc6.Recordset.米oveFirstWhile Not Adodc6.Recordset.EOF '查找一下车辆用料信息表中是否存在这种材料If Adodc6.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc6.Recordset.Fields(1) = DataCo米bo1.Text And Adodc6.Recordset.Fields(2) = DataCo米bo5.Text And Adodc6.Recordset.Fields(3) = DataCo米bo6.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.米oveNextWendEnd IfIf l1 = 0 Then '如果不存在,则在车辆用料信息表中添加新记录Adodc6.Recordset.AddNewAdodc6.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc6.Recordset.Fields(1) = DataCo米bo1.TextAdodc6.Recordset.Fields(2) = DataCo米bo5.TextAdodc6.Recordset.Fields(3) = DataCo米bo6.TextAdodc6.Recordset.Fields(4) = Text2.TextAdodc6.Recordset.Fields(5) = Text3.TextAdodc6.Recordset.UpdateAdodc6.RefreshEnd IfIf Not Adodc9.Recordset.BOF ThenAdodc9.Refresh '在车辆消费信息表中添加该车辆的材料费Adodc9.Recordset.米oveFirstWhile Not Adodc9.Recordset.EOFIf Adodc9.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc9.Recordset.Fields(1) = DataCo米bo1.Text Thenn1 = 1 '如果车辆消费信息表中存在当天该车的记录时Adodc6.Refresh '在车辆用料信息表中,计算该车的材料费Adodc6.Recordset.米oveFirstWhile Not Adodc6.Recordset.EOFIf Adodc6.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc6.Recordset.Fields(1) = DataCo米bo1.Text Thenx = Adodc6.Recordset.Fields(4)y = Adodc6.Recordset.Fields(5)z = x * ysu米1 = su米1 + zEnd IfAdodc6.Recordset.米oveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCo米bo1.TextAdodc9.Recordset.Fields(3) = su米1Adodc9.Recordset.Fields(4) = su米1 + Adodc9.Recordset.Fields(2)Adodc9.Recordset.UpdateEnd IfAdodc9.Recordset.米oveNextWendEnd IfIf n1 = 0 Then '车辆消费信息表中无该车辆记录时Adodc9.Recordset.AddNew '向车辆消费信息表中添加材料费记录Adodc6.Refresh '车辆用料信息表Adodc6.Recordset.米oveFirstWhile Not Adodc6.Recordset.EOFIf Adodc6.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc6.Recordset.Fields(1) = DataCo米bo1.Text Thenx = Adodc6.Recordset.Fields(4)y = Adodc6.Recordset.Fields(5)z = x * ysu米1 = su米1 + zEnd IfAdodc6.Recordset.米oveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCo米bo1.TextAdodc9.Recordset.Fields(3) = su米1Adodc9.Recordset.Fields(4) = su米1Adodc9.Recordset.Update '保存记录End IfEnd IfElse米sgBox "资料输入不全,请重新输入!!", 64, "提示"End IfDataCo米bo5.Text = ""DataCo米bo6.Text = ""Text2.Text = ""Text3.Text = ""DataCo米bo5.SetFocusEnd SubPrivate Sub Co米米and2_Click()DataCo米bo1.Text = ""DataCo米bo2.Text = ""DataCo米bo3.Text = ""DataCo米bo4.Text = ""Unload 米eEnd SubPrivate Sub Co米米and3_Click()修改美容项目.ShowEnd SubPrivate Sub Co米米and4_Click()Di米su米, x, z As CurrencyDi米y, n As Longsu米= 0 n = 0If DTPicker1.Value <> "" And DataCo米bo1.Text <> "" And DataCo米bo2.Text <> "" And DataCo米bo3.Text <> "" And DataCo米bo4.Text <> "" ThenAdodc4.Refresh '车辆美容信息登记表Adodc4.Recordset.AddNewAdodc4.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc4.Recordset.Fields(1) = DataCo米bo1.TextAdodc4.Recordset.Fields(2) = DataCo米bo4.TextAdodc4.Recordset.Fields(3) = DataCo米bo2.TextAdodc4.Recordset.Fields(4) = DataCo米bo3.TextAdodc4.Recordset.UpdateAdodc9.RefreshIf Not Adodc9.Recordset.BOF Then '判断一下表是否为空表Adodc9.RefreshAdodc9.Recordset.米oveFirstWhile Not Adodc9.Recordset.EOFIf Adodc9.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc9.Recordset.Fields(1) = DataCo米bo1.Text Thenn = 1Adodc4.RefreshAdodc4.Recordset.米oveFirstWhile Not Adodc4.Recordset.EOFIf Adodc4.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc4.Recordset.Fields(1) = DataCo米bo1.Text Thensu米= su米+ Adodc4.Recordset.Fields(4)End IfAdodc4.Recordset.米oveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCo米bo1.TextAdodc9.Recordset.Fields(2) = su米Adodc9.Recordset.Fields(4) = su米+ Adodc9.Recordset.Fields(3)Adodc9.Recordset.Update '保存End IfAdodc9.Recordset.米oveNextWendEnd IfIf n = 0 ThenAdodc9.Recordset.AddNew '向车辆消费信息表中添加美容项目消费Adodc4.RefreshAdodc4.Recordset.米oveFirstWhile Not Adodc4.Recordset.EOFIf Adodc4.Recordset.Fields(0) = CStr(DTPicker1.Value) And Adodc4.Recordset.Fields(1) = DataCo米bo1.Text Thensu米= su米+ Adodc4.Recordset.Fields(4)End IfAdodc4.Recordset.米oveNextWendAdodc9.Recordset.Fields(0) = CStr(DTPicker1.V alue)Adodc9.Recordset.Fields(1) = DataCo米bo1.TextAdodc9.Recordset.Fields(2) = su米Adodc9.Recordset.Fields(4) = su米Adodc9.Recordset.Update '保存End IfElse 米sgBox "资料输入不全,请重新输入!!", 64, "提示"End IfDataCo米bo2.Text = ""DataCo米bo3.Text = ""DataGrid1.Colu米ns(0).Width = 1500DataGrid1.Colu米ns(1).Width = 1500DataCo米bo2.SetFocusEnd SubPrivate Sub Co米米and5_Click()修改用料.ShowEnd SubPrivate Sub Co米米and6_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCo米米and6.Caption = "锁定"米sgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCo米米and6.Caption = "修改"米sgBox "您进入锁定状态!"End IfEnd SubPrivate Sub DataCo米bo2_GotFocus()Adodc7.RecordSource = "select 美容项目,价格fro米车辆美容信息登记表where 日期='" & CStr(DTPicker1.Value) & "' and 车牌号码='" & DataCo米bo1.Text & "'"Adodc7.RefreshEnd SubPrivate Sub DataCo米bo5_GotFocus()Adodc8.RecordSource = "select 材料号,材料名称,单价,数量fro米车辆用料信息表where 日期='" & CStr(DTPicker1.Value) & "' and 车牌号码='" & DataCo米bo1.Text & "'"Adodc8.RefreshDataGrid2.Colu米ns(0).Width = 1000DataGrid2.Colu米ns(1).Width = 1000DataGrid2.Colu米ns(2).Width = 1000DataGrid2.Colu米ns(3).Width = 1000End SubPrivate Sub DataCo米bo3_GotFocus()'查询美容项目定义表,美容价格随着美容项目的选择而变If Not Adodc2.Recordset.BOF ThenAdodc2.Recordset.米oveFirstWhile Not Adodc2.Recordset.EOFIf Adodc2.Recordset.Fields(1) = DataCo米bo2.Text ThenDataCo米bo3.Text = Adodc2.Recordset.Fields(2)End IfAdodc2.Recordset.米oveNextWendEnd IfEnd SubPrivate Sub DataCo米bo6_GotFocus()If Not Adodc5.Recordset.BOF Then '根据填入的材料号,材料名称会自动出现Adodc5.Recordset.米oveFirstWhile Not Adodc5.Recordset.EOFIf Adodc5.Recordset.Fields(0) = DataCo米bo5.Text ThenDataCo米bo6.Text = Adodc5.Recordset.Fields(1)End IfAdodc5.Recordset.米oveNextWendEnd IfEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + 米path + "database.米db"Adodc1.ConnectionString = adoAdodc1.RecordSource = "车辆基本信息表"Adodc1.RefreshAdodc2.ConnectionString = adoAdodc2.RecordSource = "美容项目定义表"Adodc2.RefreshAdodc3.ConnectionString = adoAdodc3.RecordSource = "b米xx"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 ThenCo米米and3.Enabled = FalseCo米米and5.Enabled = FalseEnd IfEnd Sub修改美容项目模块源代码如下:Private Sub Co米米and1_Click()Di米l, x, y As Longl = 0Adodc2.Refresh '在美容项目登记表中删除项目Adodc2.Recordset.米oveFirstWhile Not Adodc2.Recordset.EOFIf Adodc2.Recordset.Fields(0) = Text1.Text And Adodc2.Recordset.Fields(1) = DataCo米bo1.Text And Adodc2.Recordset.Fields(2) = DataCo米bo2.Text And Adodc2.Recordset.Fields(3) = DataCo米bo3.Text And Adodc2.Recordset.Fields(4) = DataCo米bo4.Text Thenl = 1y = Adodc2.Recordset.Fields(4)米sg$ = "确定要删除该美容项目吗?"ans = 米sgBox(米sg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK ThenAdodc2.Recordset.DeleteAdodc2.Recordset.米oveNextAdodc2.Recordset.UpdateAdodc2.RefreshEnd IfDataGrid1.Colu米ns(0).Width = 1200DataGrid1.Colu米ns(1).Width = 1200DataGrid1.Colu米ns(2).Width = 1200DataGrid1.Colu米ns(3).Width = 1200DataGrid1.Colu米ns(4).Width = 1200End IfAdodc2.Recordset.米oveNextWendIf l = 0 Then '要删除的项目不存在时米sgBox ("数据库中没有您要删除的项目!!")End IfAdodc6.Refresh '修改车辆消费信息表中的人工费合计和总金额Adodc6.Recordset.米oveFirstWhile Not Adodc6.Recordset.EOFIf Adodc6.Recordset.Fields(0) = Text1.Text And Adodc6.Recordset.Fields(1) = DataCo米bo1.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.米oveNextWendDataCo米bo2.Text = ""DataCo米bo3.Text = ""DataCo米bo4.Text = ""DataCo米bo2.SetFocusEnd SubPrivate Sub Co米米and2_Click()Unload 米eEnd SubPrivate Sub Co米米and3_Click()If DataGrid1.AllowUpdate = False ThenDataGrid1.AllowUpdate = TrueDataGrid1.AllowDelete = TrueCo米米and3.Caption = "锁定"米sgBox "您巳进入修改状态!"ElseDataGrid1.AllowUpdate = FalseDataGrid1.AllowDelete = TrueCo米米and3.Caption = "修改"米sgBox "您进入锁定状态!"End IfEnd SubPrivate Sub DataCo米bo2_GotFocus()Adodc1.RecordSource = "select * fro米车辆美容信息登记表where 日期='" & Text1.Text & "' and 车牌号码='" & DataCo米bo1.Text & "'"Adodc1.RefreshEnd SubPrivate Sub For米_Load()Di米ado As String, 米path As String米path = App.pathIf Right(米path, 1) <> "\" Then 米path = 米path + "\"ado = "Provider=米icrosoft.Jet.OLEDB.4.0;Persist Security Info=False;"ado = ado + "Data Source=" + 米path + "database.米db"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 Co米米and1_Click()Di米l, x, y, z, 米, l1 As Longl = 0l1 = 0Adodc3.Refresh '在车辆用料信息表中删除信息If Not Adodc3.Recordset.BOF ThenAdodc3.Recordset.米oveFirstWhile Not Adodc3.Recordset.EOFIf Adodc3.Recordset.Fields(0) = Text1.Text And Adodc3.Recordset.Fields(1) = DataCo米bo1.Text And Adodc3.Recordset.Fields(2) = DataCo米bo2.Text And Adodc3.Recordset.Fields(3) = DataCo米bo3.Text And Adodc3.Recordset.Fields(4) = Text2.Text Thenl = 1z = Adodc3.Recordset.Fields(5)米= z - CLng(Text3.Text)If 米> 0 Then米sg$ = "确定要修改该用料信息吗?"ans = 米sgBox(米sg$, vbOKCancel + vbDefaultButton2, "修改记录")If ans = vbOK Thenl1 = 1Adodc3.Recordset.Fields(5) = 米Adodc3.Recordset.UpdateAdodc3.Refreshy = Adodc3.Recordset.Fields(4) * CLng(Text3.Text)End IfElseIf 米= 0 Then米sg$ = "确定要删除该用料信息吗?"ans = 米sgBox(米sg$, vbOKCancel + vbDefaultButton2, "删除记录")If ans = vbOK Thenl1 = 1y = Adodc3.Recordset.Fields(4) * CLng(Text3.Text)Adodc3.Recordset.DeleteAdodc3.Recordset.米oveNextAdodc3.RefreshEnd IfElseIf 米< 0 Then米sgBox ("您要删除的数量大于该车实际用量!!")End IfDataGrid1.Colu米ns(0).Width = 1200DataGrid1.Colu米ns(1).Width = 1200DataGrid1.Colu米ns(2).Width = 1200DataGrid1.Colu米ns(3).Width = 1200DataGrid1.Colu米ns(4).Width = 1200DataGrid1.Colu米ns(5).Width = 1200If l1 = 1 ThenAdodc4.Refresh '修改车辆消费信息表中的材料费合计和总金额If Not Adodc4.Recordset.BOF ThenAdodc4.Recordset.米oveFirstWhile Not Adodc4.Recordset.EOFIf Adodc4.Recordset.Fields(0) = Text1.Text And Adodc4.Recordset.Fields(1) = DataCo米bo1.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.米oveNextWendEnd IfAdodc2.Refresh '修改库存材料清单If Not Adodc2.Recordset.BOF ThenAdodc2.Recordset.米oveFirstWhile Not Adodc2.Recordset.EOFIf Adodc2.Recordset.Fields(0) = DataCo米bo2.Text And Adodc2.Recordset.Fields(1) = DataCo米bo3.Text ThenAdodc2.Recordset.Fields(4) = Adodc2.Recordset.Fields(4) + CLng(Text3.Text)Adodc2.Recordset.UpdateEnd IfAdodc2.Recordset.米oveNextWendEnd If '修改库存材料清单完毕End IfDataCo米bo2.Text = ""DataCo米bo3.Text = ""Text2.Text = ""。

仓库管理系统源代码

仓库管理系统源代码
/*******************************************************************************************************************/
/********************************************仓库管理系统***********************************************************/
{
printf("\tCan not open the temp file!");
getch();
exit(1);
}
printf("please input the num you want to amend:");
getchar();
scanf("%d",&x);
y=(x-1)*sizeof(infom);
rewind(fp); /*把指针移回文件开始*/
if(fseek(fp,y,0)!=0)/*把指针指向Y*/
{
printf("can not move there!\n");
exit(1);
remove("c:\\123.dat"); /*删除文件123*/
rename("c:\\456.dat","c:\\123.dat"); /*对文件456重命名*/
}
else
printf("Can not find this record!\n");
getch();

VB库存管理系统(有源程序)(可编辑)

VB库存管理系统(有源程序)(可编辑)

VB库存管理系统(有源程序)源程序代码等全套设计联系 174320523 各专业都有第一章引言新的世纪、新的千年和新的时代,同时向我们走来。

即将过去的二十世纪是伟大的,正在向我们走来的新世纪将更加伟大。

人类将从传统的物质经济迈向崭新的知识经济时代。

在知识经济时代,以电脑为核心的信息技术,将成为时代的标志,单位是知识的前沿领域,单位的一些管理者应该首先冲入智能化、网络化的行列。

那么库存管理应该用哪些软件、怎样来设计呢?Visual Basic 6.0是由软件界巨头、著名的微软公司可视化编程语言、由于其可视化程度高、代码简洁易读,因此是最容易入门的编程之一。

Visual Basic6.0使用了Microsoft Windows图形用户界面的许多先进特性和设计思想,提供了向导自动生成代码,支持拖放技术、属性提示与检查、语法检查等内置自动化,大大降低了编写代码的工作量,特别是提供了极其丰富的控件,使得Visual Basic 6.0成为最简捷、最有效的开发 Windows应用程序工具。

随着网络技术的不断发展,Visual Basic 6.0的应用范围也从开发单机软件发展到开发网上颁式应用程序。

Visual Basic 6.0不但受到广大初、中级计算机爱好者的欢迎,也越来越受到高级程序员的欢迎。

第二章概述2.1 程序设计的目的和意义库存管理系统是一个企业不可缺少的部分,它的内容对于单位的决策者和管理者来说都至关重要,所以库存管理系统应该能够为用户提供充足的信息和快捷的查询手段。

但一直以来人们使用传统人工的方式管理文件库存,这种管理方式存在着许多缺点,如:效率低、保密性差,另外时间一长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。

随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已为人们深刻认识,它已进入人类社会的各个领域并发挥着越来越重要的作用。

作为计算机应用的一部分,使用计算机对库存信息进行管理,具有着手工管理所无法比拟的优点.例如:检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。

好用的VB--仓库管理系统

好用的VB--仓库管理系统

摘要仓库管理系统是为了实现企业产品管理的系统化、规范化和自动化,从而提高企业管理效率而设计的。

它完全取代了原来一直用人工管理的工作方式,避免了由于管理人员的工作疏忽以及管理质量问题所造成的各种错误,为及时、准确、高效的完成仓库管理提供了强有力的工具和管理手段。

仓库管理系统是一个中小型数据库管理系统,它界面美观、操作简单、安全性高,基本满足了仓库管理的要求。

整个系统由基本信息、单据中心、查询统计、报表打印、维护设置、帮助等模块组成.本系统是在以ACCESS2000作为后台数据库,以Visual Basic为编程语言来开发的。

仓库管理系统在运行阶段,效果好,数据准确性高,提高了工作效率,同时也实现了仓库管理计算机化。

关键字:仓库,管理系统,数据库AbstractThe administrative system of the warehouse is designed for realizing the systematization ,standardization and automization of enterprise's products management and improving efficiency of enterprises management。

It completely replaces the working way of artificial management originally ,prevents from various kinds of mistakes because of administrative staff neglect and the quality problem of management and offeres powerful tool and management way to complet storehouse management for prompt ,accurate ,high—efficient 。

VB对Microsoft Access数据库的运用代码

VB对Microsoft Access数据库的运用代码

VB对Microsoft Access数据库的调用管理.用VB6.0计算机编程语言,和Microsoft Access的数据库建立连接。

以便对VB窗口控键,通过VB编程代码对Access数据库进行读取,存储,修改,编辑,管理和计算。

(基本功能如下图)编辑窗体界面及所需参数设计:VB窗体界面编辑及所需参数设计是下面相应控件属性及编程的基础和前提,.通过VB软件的工程下拉菜单的引用命令实现VB和Microsoft Access的数据库建立连接,以便进一步通过VB界面来对数据库的进一步操作。

具体对数据库的一般操作:首记录;上记录;下记录,末记录及搜索,修改,保存,新增记录等功能的详细VB代码如下:Public mydb As DatabasePublic myrs As RecordsetDim step1 As IntegerPrivate Sub Timer1_Timer()Call mymoveEnd SubPublic Sub mymove()Label17.Move Label17.Left + 50 * step1If Label17.Left + 1 * Label17.Width > Form1.Width Then step1 = -1ElseIf Label17.Left < 0 Thenstep1 = 1End IfEnd SubPrivate Sub Command10_Click()Form1.ShowForm2.HideForm3.HideEnd SubPrivate Sub Command11_Click()Form3.ShowForm2.HideForm1.HideEnd SubPrivate Sub Form_Load()Dim i As SingleSet mydb = OpenDatabase(App.Path + "\合同数据库.mdb")Set myrs = mydb.OpenRecordset("合同数据库", dbOpenDynaset)Command9.Enabled = False step1 = -1Timer1.Interval = 100Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""Text14.Text = ""End SubPrivate Sub Command1_Click() '首记录Dim nm As StringDim nm1 As StringDim nm2 As StringCommand9.Enabled = FalseCommand12.Enabled = TrueCommand13.Enabled = TrueCommand2.Enabled = FalseCommand4.Enabled = TrueCommand1.Enabled = FalseCommand3.Enabled = Truemyrs.MoveFirstCall shuchuEnd SubPrivate Sub Command2_Click() '上记录Dim nm As StringDim nm1 As StringDim nm2 As StringCommand9.Enabled = FalseCommand12.Enabled = TrueCommand13.Enabled = TrueCommand3.Enabled = TrueCommand4.Enabled = Truemyrs.MovePreviousIf myrs.BOF Thenmyrs.MoveFirstCommand2.Enabled = FalseCommand1.Enabled = FalseElse' myrs.MovePreviousEnd IfCall shuchu' List1.AddItem myrs.Fields(1)End SubPrivate Sub Command3_Click() '下记录Dim nm As StringDim nm1 As StringDim nm2 As StringCommand9.Enabled = False Command12.Enabled = True Command13.Enabled = TrueCommand1.Enabled = TrueCommand2.Enabled = TrueIf myrs.EOF Thenmyrs.MoveLastCommand3.Enabled = FalseCommand4.Enabled = False End Ifmyrs.MoveNextIf myrs.EOF Thenmyrs.MoveLastCommand3.Enabled = FalseCommand4.Enabled = FalseEnd IfCall shuchuEnd SubPrivate Sub Command4_Click() '末记录Dim nm As StringDim nm1 As StringDim nm2 As StringCommand9.Enabled = FalseCommand12.Enabled = TrueCommand13.Enabled = Truemyrs.MoveLastCommand1.Enabled = TrueCommand2.Enabled = TrueCommand3.Enabled = FalseCommand4.Enabled = False'Command4.Enabled = FalseCall shuchuEnd SubPrivate Sub Command6_Click() '快速查询Dim findph As StringDim nm As StringDim nm1 As StringDim nm2 As StringCommand4.Enabled = Falsefindph = InputBox("请输入合同号=", "按合同号搜索")If findph <> "" Thenfindph = "合同号='" & findph & "'"'findph = "IP地址='" & findph & "'"myrs.FindFirst (findph)If myrs.NoMatch ThenMsgBox "没有相应合同号的资料记录", vbInformation, "信息"ElseCall shuchuEnd IfEnd IfEnd SubPrivate Sub Command13_Click() '新增记录Command9.Enabled = TrueText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""'List1.ClearCommand12.Enabled = Falsemyrs.AddNewText1.SetFocusMsgBox "现在你可以填写数据了,填写完毕后确定请按保存按钮", vbInformation, "系统提示"End SubPrivate Sub Command12_Click() '编辑myrs.EditText1.SetFocusMsgBox "现在你可以修改数据了,修改完后确定请按保存按钮", vbInformation, "系统提示"Command9.Enabled = TrueEnd SubPrivate Sub Command8_Click() '重新输入Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""Text14.Text = ""' List1.ClearEnd SubPrivate Sub Command9_Click() '保存myrs.Fields("合同号") = Text1.Textmyrs.Fields("ID号") = Text2.Textmyrs.Fields("产品类型") = Text3.Textmyrs.Fields("产品代号") = Text10.Textmyrs.Fields("定货数") = Text4.Textmyrs.Fields("单价") = Text5.Textmyrs.Fields("收到合同日期") = Text6.Textmyrs.Fields("交货日期") = Text7.Textmyrs.Fields("图纸投入生产日期") = Text9.Textmyrs.Fields("完成人员") = Text8.Textmyrs.Fields("备注") = Text11.Textmyrs.Fields("Order NO") = Text12.Textmyrs.Fields("产品净重") = Text13.Textmyrs.Fields("客户代码") = Text14.TextMsgBox "合同资料记录保存成功", vbInformation, "信息"myrs.UpdateCommand12.Enabled = True'Command4.Enabled = TrueCommand9.Enabled = FalseEnd SubPrivate Sub Command5_Click() myrs.Closemydb.CloseEndEnd SubPublic Sub shuchu() ' 输出子程序Dim xx As StringDim yy As StringDim kk As StringDim ph As SingleText1.Text = myrs.Fields(0)Text2.Text = myrs.Fields(1)Text3.Text = myrs.Fields(2)Text4.Text = myrs.Fields(4)Text5.Text = myrs.Fields(5)Text6.Text = myrs.Fields(6)Text7.Text = myrs.Fields(7)Text8.Text = myrs.Fields(9)Text9.Text = myrs.Fields(8)Text10.Text = myrs.Fields(3)Text11.Text = myrs.Fields(10)Text12.Text = myrs.Fields(11)Text13.Text = myrs.Fields(12)Text14.Text = myrs.Fields(13) End Sub。

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

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

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

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

作者联系方式:E-mail1、2、3、4、EndVB6.0中可以创建Access数据库。

如下建立一个“用户表”的数据库,用来存放用户信息及一些出入库管理信息。

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

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

其它元件不在一一说明。

2、本窗体代码如下:Private Sub Command1_Click() '“登录”、“确定”按钮If Command1.Caption = "确定" And Command2.Caption = "取消" Then '如果为“确定”则添加新用户If Text1.Text = "" Then '提示用户输入用户名MsgBox "请输入用户名!", , "登录信息提示:"Exit SubElse 'Dim usename As String '检测用户名是否已经存在Dim strS As Stringusename = Trim(Text1.Text)strS = "select * from 用户登录信息表 where 用户名='" & usename & "'"mandType = adCmdTextAdodc1.RecordSource = strSAdodc1.RefreshMsgBox "您输入的用户已存在!", , "登录提示信息:"Text1.Text = ""Text2.Text = ""Text3.Text = ""Text1.SetFocusExit SubEnd IfEnd IfIf Text2.Text = "" Then '提示用户密码不能为空MsgBox "密码不能为空!", , "登录提示信息:"Text2.SetFocusExit SubEnd IfIf Text3.Text = "" ThenMsgBox "请再次输入密码!", , "登录提示信息:"Text3.SetFocusExit SubEnd IfIf Text2.Text <> Text3.Text ThenMsgBox "两次输入的密码不一致,请确认!", , "登录提示信息:"Text2.Text = ""Text3.Text = ""Exit SubElseMsgBox ("添加新用户成功,现在您可以登陆系统了!")Label3.Visible = FalseText3.Visible = FalseCommand1.Caption = "登录"Command2.Caption = "退出"End IfElse '“登录”按钮,用户登录 Dim strSno As StringDim strSelect As StringText3.Visible = FalseCommand1.Caption = "登录"Command2.Caption = "退出"Text1.Text = ""Text2.Text = ""Text1.SetFocusElseEnd 'Unload MeEnd IfPrivate Sub Command3_Click() '“新用户”按钮 Label3.Visible = TrueText3.Visible = TrueText1.Text = ""Text2.Text = ""Text3.Text = ""Command1.Caption = "确定"Command2.Caption = "取消"Text1.SetFocusEnd SubPrivate Sub Command3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)如下:代码:Private Sub AddNew_Click()Frame1.Visible = TrueFrame2.Visible = FalseEnd SubPrivate Sub CHKPMCHX_Click()Frame2.Caption = "出库信息"pm = InputBox("产品名", "请输入", 0)n = "select * from 出库表 where 品名 = '" & pm & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid1End SubPrivate Sub CHKXHCHX_Click()Frame2.Caption = "出库信息"Dim XH As StringDim n As StringCHKRQ = InputBox("出库日期,格式为:月/日/年如:12/1/2011", "请输入", 0) n = "select * from 出库表 where 出库日期 = '" & CHKRQ & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid1End SubPrivate Sub CKZCX_Click()ZB = "select * from 出库表 "mandType = adCmdTextAdodc2.RecordSource = ZBAdodc2.RefreshCall InitGrid1End SubPrivate Sub Command1_Click()If Text1.Text = "" Then '提示用户输入用户名 MsgBox "请输入用户名!", , "登录信息提示:"Exit SubEnd IfIf Text2.Text <> Text3.Text ThenMsgBox "两次输入的密码不一致,请确认!", , "登录提示信息:"Text2.Text = ""Text3.Text = ""Text2.SetFocusExit SubElseeX = MsgBox("成功添加新用户,是否要重新登录!", vbYesNo + vbQuestion + vbDefaultButton1, "提示信息!") If X = vbYes ThenUnload MeForm3.ShowEnd If'MsgBox ("成功添加新用户!")'Label3.Visible = False'Text3.Visible = False'Command1.Caption = "登录"'Command2.Caption = "退出"End IfEndEnd SubPrivate Sub Form_Load()Unload Form1Frame1.Visible = FalseCall InitGrid0Me.Height = MDIForm1.Height - 1060Me.Width = MDIForm1.Width - 560Me.Top = MDIForm1.TopMe.Left = MDIForm1.LeftPrivate Sub GHCZ_Click()'Form2.HideForm8.ShowEnd SubPrivate Sub GHPMCX_Click()Frame2.Caption = "归还信息"Dim pm As StringDim n As Stringpm = InputBox("产品名", "请输入", 0)n = "select * from 归还表 where 品名 = '" & pm & "'" mandType = adCmdTextEnd SubPrivate Sub GHXHCX_Click()Frame2.Caption = "归还信息"Dim XH As StringDim n As StringXH = InputBox("产品型号", "请输入", 0)n = "select * from 归还表 where 型号 = '" & XH & "'" mandType = adCmdTextAdodc2.RecordSource = nPrivate Sub GHZCX_Click()Frame2.Caption = "归还信息"Dim ZB As StringZB = "select * from 归还表 "mandType = adCmdTextAdodc2.RecordSource = ZBAdodc2.RefreshCall InitGrid2End SubEnd SubPrivate Sub JCRCX_Click()Frame2.Caption = "借出信息"Dim JCR As StringDim n As StringJCR = InputBox("借出人", "请输入", 0)n = "select * from 借出表 where 借出人 = '" & JCR & "'" mandType = adCmdTextAdodc2.RecordSource = nPrivate Sub JCSHJCX_Click()Frame2.Caption = "借出信息"Dim JCRQ As StringDim n As StringJCRQ = InputBox("借出日期,格式为:月/日/年如:12/1/2011", "请输入", 0) n = "select * from 借出表 where 借出日期 = '" & JCRQ & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshDim n As StringJSHR = InputBox("经手人", "请输入", 0)n = "select * from 借出表 where 经手人 = '" & JSHR & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub PMCX_Click()Dim pm As StringDim n As Stringpm = InputBox("产品名", "请输入", 0)n = "select * from 库存表 where 品名 = '" & pm & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid0End SubPrivate Sub RKCZ_Click()'Form2.HideEnd SubPrivate Sub RKSHJ_Click()Frame2.Caption = "入库信息"Dim RKRQ As StringDim n As StringRKRQ = InputBox("入库日期,格式为:月/日/年如:12/1/2011", "请输入", 0) n = "select * from 入库表 where 入库日期 = '" & RKRQ & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid1End SubPrivate Sub RKXHCHX_Click()Frame2.Caption = "入库信息"Dim XH As StringDim n As StringXH = InputBox("产品型号", "请输入", 0)If Len(XH) > 0 Thenn = "select * from 入库表 where 型号 = '" & XH & "'" mandType = adCmdTextAdodc2.RecordSource = nElseLabel6.Move Label6.Left - 80ElseLabel6.Left = Form2.ScaleWidthEnd IfIf Label7.Left + Label7.Width > 0 ThenLabel7.Move Label7.Left - 80ElseLabel7.Left = Form2.ScaleWidthEnd IfEnd SubPrivate Sub XGMM_Click()'Form2.HideForm4.ShowEnd SubPrivate Sub XHCX_Click()Frame2.Caption = "库存信息"Dim XH As StringDim n As StringXH = InputBox("产品型号", "请输入", 0)If Len(XH) > 0 Then 'And Val(XH) <> 0n = "select * from 库存表 where 型号 = '" & XH & "'"End WithEnd SubPrivate Sub InitGrid1()With DataGrid1.Columns(0).Width = 800.Columns(1).Width = 1600.Columns(2).Width = 1600.Columns(3).Width = 800.Columns(4).Width = 800.Columns(5).Width = 1000.Columns(6).Width = 800.Columns(7).Width = 4000End WithEnd SubPrivate Sub InitGrid2()With DataGrid1'.Columns(0).Caption = "学号"' .Columns(1).Caption = "课程名"'.Columns(2).Caption = "学分"' .Columns(3).Caption = "成绩"'设置DtgCond的列宽Text1.Text = ""Text2.Text = ""Text1.SetFocusExit SubEnd IfUnload MeForm2.Show'MsgBox "登陆成功!", , "登录提示信息:"ElseMsgBox "密码不正确,请重新输入!", , "登录提示信息:"Text2.Text = ""Text2.SetFocusEnd IfEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd Sub修改用户密码界面代码:ElseEnd IfIf Text3.Text = "" ThenMsgBox "请输入新密码!", , "信息提示!"Text3.SetFocusExit SubEnd IfIf Text4.Text = "" ThenMsgBox "请再次输入新密码!", , "信息提示!" Text4.SetFocusExit SubEnd IfIf Trim(Text3.Text) <> Trim(Text4.Text) ThenMsgBox "两次输入的新密码不一致!", , "信息提示!" Text3.Text = ""Text4.Text = ""Text3.SetFocusExit SubElseMsgBox ("密码修改成功!")Unload Me'Form2.ShowEnd SubEnd Sub代码:ElseText5.SetFocusExit SubEnd IfAdodc1.RefreshEnd IfDim pm As StringDim pms As StringDim n As StringDim m As Stringpm = Trim(Text1.Text)n = Val(Text3.Text)pms = "select * from 库存表 where 品名='" & pm & "'"With Form2End WithElseEnd IfEnd IfDim X As IntegerX = MsgBox("产品入库登记成功,是否继续添加产品!", vbYesNo + vbQuestion + vbDefaultButton1, "提示信息!") If X = vbNo ThenUnload MeElseEnd SubEnd SubUnload Me'Form2.ShowEnd Sub出库管理代码:Private Sub Command1_Click()If Combo1.Text = "" And Combo2.Text = "" Then ' text1.Text = "" And Text2.Text = "" ThenMsgBox "“品名”和“型号”不能同时为空,必须输入其中一项!", , "提示信息!" Exit SubElseIf Text1.Text = "" And Combo3.Text = "" Then ' Text4.Text = "" ThenMsgBox "请输入产品“数量”或“单位”之一!", , "提示信息!"Text2.SetFocusExit SubEnd IfIf Text2.Text = "" ThenMsgBox "请经手人签名!", vbCritical, "提示信息!"Text2.SetFocusDim ZB As StringZB = "select * from 出库表 " 'where 品名 = '" & PM & "'"End SubPrivate Sub Command2_Click()Combo1.Text = ""Combo2.Text = ""Combo3.Text = ""Text1.Text = ""Text2.Text = ""Text3.Text = ""End SubPrivate Sub Command3_Click()Unload Me'Form2.ShowEnd SubPrivate Sub Form_Load()Adodc2.RefreshLoopEnd Sub代码:Elsepm = Trim(Combo1.Text)n = Val(Text1.Text)pms = "select * from 库存表 where 品名='" & pm & "'"End IfDim X As IntegerX = MsgBox("产品借出登记成功,是否继续添加产品!", vbYesNo + vbQuestion + vbDefaultButton1, "提示信息!") If X = vbNo ThenUnload MeForm2.ShowEnd IfCombo2.Text = ""Combo3.Text = ""Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Dim ZB As StringZB = "select * from 借出表 " 'where 品名 = '" & PM & "'"End SubPrivate Sub Command2_Click()End SubEnd SubLoopEnd Sub代码:ElseIf Text1.Text = "" And Combo3.Text = "" Then ' Text4.Text = "" Then MsgBox "请输入产品“数量”或“单位”之一!", , "提示信息!"Text1.SetFocusExit SubEnd IfIf Text2.Text = "" ThenMsgBox "请经手人签名!", vbCritical, "提示信息!"Text2.SetFocusExit SubEnd IfIf Text3.Text = "" ThenMsgBox "请输入归还人姓名!", vbCritical, "提示信息!" Text3.SetFocusExit SubEnd IfAdodc1.RefreshEnd IfDim pm As StringDim pms As StringDim n As StringEnd SubText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""End SubPrivate Sub Command3_Click()Unload MeForm2.ShowEnd SubPrivate Sub Form_Load()' Dim i As String' i = 0' Adodc2.Refresh' i = i + 1' LoopCall pmEnd SubPrivate Sub pm()Dim i As VariantDim j As VariantDim k As Varianti = 0j = 0LoopText5.Text = s 'a + "," + D(2) + D(1) '+ " " + Val(i) + " " + Val(j) + " " + Val(k) Text6.Text = j'Combo1.AddItem D(1)End Sub。

相关文档
最新文档