仓库管理系统代码大全

合集下载

SAP仓库管理代码大全

SAP仓库管理代码大全

WM Transaction Code 仓库管理模块事务代码大全1.1 LE-WM 仓库管理 Warehouse Management仓库管理事务码描述LB01 Create Transfer Requirement 创建转储需求LB02 Change transfer requirement 修改转储需求LB03 Display Transfer Requirement 显示转储需求LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for MLEat.Doc. 转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff. 清除分散的库存差异LD11 Clear differences for decentral.sys. 清除分散系统的差异LI01 Create System Inventory Record 创建系统库存记录LI02 Change System Inventory Record 修改系统库存记录LI03 Display System Inventory Record 显示系统库存记录LI04 Print System Inventory Record 打印系统库存记录LI05 Inventory History for Storage Bin 仓位的库存历史LI06 Block stor.types for annual invent. 冻结年库存仓储类型LI11 Enter Inventory Count 输入库存盘点LI12 Change inventory count 修改库存盘点LI13 Display Inventory Count 显示库存盘点数LI14 Start Inventory Recount 库存重新盘点开始LI20 Clear Inventory Differences WM 清除库存差异仓库管理WMLI21 Clear Inventory Differences in MM-IM 清除 MM-IM 中的库存差额LL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem. 转储需求编号范围LN02 Number Ranges for Transfer Orders 转储单编号范围LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number 参考号编号范围LN08 Number Range Maintenance: LVS_LENUM 编号范围维护: LVS_LENUMLP10 Direct picking for PO 直接为采购单(PO)分检LP11 WM staging of crate parts WM 装箱部件待运LP12 Staging release order parts (WM-PP) 待运下达订单零件LP21 WM replenishment for fixed bins WM 固定仓位补充LP22 Replenishm. Planning for Fixed Bins 补充。

SAP仓库管理代码大全

SAP仓库管理代码大全

WM Transaction Code 仓库管理模块事务代码大全1.1 LE-WM 仓库管理 Warehouse Management仓库管理事务码描述LB01 Create Transfer Requirement 创建转储需求LB02 Change transfer requirement 修改转储需求LB03 Display Transfer Requirement 显示转储需求LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for MLEat.Doc. 转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff. 清除分散的库存差异LD11 Clear differences for decentral.sys. 清除分散系统的差异LI01 Create System Inventory Record 创建系统库存记录LI02 Change System Inventory Record 修改系统库存记录LI03 Display System Inventory Record 显示系统库存记录LI04 Print System Inventory Record 打印系统库存记录LI05 Inventory History for Storage Bin 仓位的库存历史LI06 Block stor.types for annual invent. 冻结年库存仓储类型LI11 Enter Inventory Count 输入库存盘点LI12 Change inventory count 修改库存盘点LI13 Display Inventory Count 显示库存盘点数LI14 Start Inventory Recount 库存重新盘点开始LI20 Clear Inventory Differences WM 清除库存差异仓库管理WMLI21 Clear Inventory Differences in MM-IM 清除 MM-IM 中的库存差额LL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem. 转储需求编号范围LN02 Number Ranges for Transfer Orders 转储单编号范围LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number 参考号编号范围LN08 Number Range Maintenance: LVS_LENUM 编号范围维护: LVS_LENUMLP10 Direct picking for PO 直接为采购单(PO)分检LP11 WM staging of crate parts WM 装箱部件待运LP12 Staging release order parts (WM-PP) 待运下达订单零件LP21 WM replenishment for fixed bins WM 固定仓位补充LP22 Replenishm. Planning for Fixed Bins 补充。

SAP仓库管理代码大全

SAP仓库管理代码大全

WM Transaction Code 仓库管理模块事务代码大全1.1 LE-WM 仓库管理 Warehouse Management仓库管理事务码描述LB01 Create Transfer Requirement 创建转储需求LB02 Change transfer requirement 修改转储需求LB03 Display Transfer Requirement 显示转储需求LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for MLEat.Doc. 转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff. 清除分散的库存差异LD11 Clear differences for decentral.sys. 清除分散系统的差异LI01 Create System Inventory Record 创建系统库存记录LI02 Change System Inventory Record 修改系统库存记录LI03 Display System Inventory Record 显示系统库存记录LI04 Print System Inventory Record 打印系统库存记录LI05 Inventory History for Storage Bin 仓位的库存历史LI06 Block stor.types for annual invent. 冻结年库存仓储类型LI11 Enter Inventory Count 输入库存盘点LI12 Change inventory count 修改库存盘点LI13 Display Inventory Count 显示库存盘点数LI14 Start Inventory Recount 库存重新盘点开始LI20 Clear Inventory Differences WM 清除库存差异仓库管理WMLI21 Clear Inventory Differences in MM-IM 清除 MM-IM 中的库存差额LL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem. 转储需求编号范围LN02 Number Ranges for Transfer Orders 转储单编号范围LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number 参考号编号范围LN08 Number Range Maintenance: LVS_LENUM 编号范围维护: LVS_LENUMLP10 Direct picking for PO 直接为采购单(PO)分检LP11 WM staging of crate parts WM 装箱部件待运LP12 Staging release order parts (WM-PP) 待运下达订单零件LP21 WM replenishment for fixed bins WM 固定仓位补充LP22 Replenishm. Planning for Fixed Bins 补充。

仓库管理系统代码大全

仓库管理系统代码大全

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

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

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

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

(完整word版)SAP仓库管理代码大全

(完整word版)SAP仓库管理代码大全

WM Transaction Code 仓库管理模块事务代码大全1.1 LE-WM 仓库管理 Warehouse Management仓库管理事务码描述LB01 Create Transfer Requirement 创建转储需求LB02 Change transfer requirement 修改转储需求LB03 Display Transfer Requirement 显示转储需求LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for MLEat.Doc. 转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff. 清除分散的库存差异LD11 Clear differences for decentral.sys. 清除分散系统的差异LI01 Create System Inventory Record 创建系统库存记录LI02 Change System Inventory Record 修改系统库存记录LI03 Display System Inventory Record 显示系统库存记录LI04 Print System Inventory Record 打印系统库存记录LI05 Inventory History for Storage Bin 仓位的库存历史LI06 Block stor.types for annual invent. 冻结年库存仓储类型LI11 Enter Inventory Count 输入库存盘点LI12 Change inventory count 修改库存盘点LI13 Display Inventory Count 显示库存盘点数LI14 Start Inventory Recount 库存重新盘点开始LI20 Clear Inventory Differences WM 清除库存差异仓库管理WMLI21 Clear Inventory Differences in MM-IM 清除 MM-IM 中的库存差额LL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem. 转储需求编号范围LN02 Number Ranges for Transfer Orders 转储单编号范围LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number 参考号编号范围LN08 Number Range Maintenance: LVS_LENUM 编号范围维护: LVS_LENUMLP10 Direct picking for PO 直接为采购单(PO)分检LP11 WM staging of crate parts WM 装箱部件待运LP12 Staging release order parts (WM-PP) 待运下达订单零件LP21 WM replenishment for fixed bins WM 固定仓位补充LP22 Replenishm. Planning for Fixed Bins 补充。

仓库管理系统代码大全

仓库管理系统代码大全

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

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

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

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

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

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

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

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

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

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

代码如下:Private Sub Exit_Click()EndEnd Sub数据库的建立VB6.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.RefreshIf Adodc1.Recordset.EOF = False ThenMsgBox "您输入的用户已存在!", , "登录提示信息:"Text1.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 = ""Text2.SetFocusExit SubElseAdodc1.Recordset.AddNew '添加新用户Adodc1.Recordset.Fields("用户名") = Trim(Text1.Text)Adodc1.Recordset.Fields("密码") = Trim(Text2.Text)Adodc1.Recordset.UpdateMsgBox ("添加新用户成功,现在您可以登陆系统了!")Label3.Visible = FalseText3.Visible = FalseCommand1.Caption = "登录"Command2.Caption = "退出"End IfElse '“登录”按钮,用户登录 Dim strSno As StringDim strSelect As StringstrSno = Trim(Text1.Text) '检测用户名是否存在strSelect = "select 密码 from 用户登录信息表 where 用户名 = '" & strSno & "'"mandType = adCmdTextAdodc1.RecordSource = strSelectAdodc1.RefreshIf Adodc1.Recordset.EOF = True ThenMsgBox "用户名不存在,请重新输入!", , "登录提示信息:"Text1.Text = ""Text1.SetFocusExit SubEnd IfIf Adodc1.Recordset.Fields("密码") = Trim(Text2.Text) Then '检测密码是否正确Form1.Hide'Unload MeForm2.Show'MsgBox "登陆成功!", , "登录提示信息:"ElseMsgBox "密码不正确,请重新输入!", , "登录提示信息:"Text2.Text = ""Text2.SetFocusEnd IfEnd IfEnd SubPrivate Sub Command2_Click() '“退出”或“取消”按钮 If Command2.Caption = "取消" ThenLabel3.Visible = FalseText3.Visible = FalseCommand1.Caption = "登录"Command2.Caption = "退出"Text1.Text = ""Text2.Text = ""Text1.SetFocusElseEnd 'Unload MeEnd IfEnd SubPrivate 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)Label6.Visible = TrueEnd SubPrivate Sub Command3_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)Label6.Visible = FalseEnd SubPrivate Sub Form_Load()Label3.Visible = FalseText3.Visible = FalseEnd SubPrivate Sub Timer1_Timer() '时间time1控件的time事件代码,用来'显示向左移动的欢迎字幕If Label4.Left + Label4.Width > 0 Then '当标签右边位置大于0时,标签向左移Label4.Move Label4.Left - 80Else '否则标签从头开始Label4.Left = Form1.ScaleWidthEnd IfIf Label5.Left + Label5.Width > 0 ThenLabel5.Move Label5.Left - 80ElseLabel5.Left = Form1.ScaleWidthEnd IfEnd Sub主界面窗体如下:代码:Private Sub AddNew_Click()Frame1.Visible = TrueFrame2.Visible = FalseEnd SubPrivate Sub CHKPMCHX_Click()Frame2.Caption = "出库信息"Dim pm As StringDim n As Stringpm = 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 StringXH = InputBox("产品型号", "请输入", 0)n = "select * from 出库表 where 型号 = '" & XH & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshEnd SubPrivate Sub CKCZ_Click()'Form2.HideForm6.ShowEnd SubPrivate Sub CKJSHR_Click()Frame2.Caption = "出库信息"Dim JSHR As StringDim n As StringJSHR = InputBox("经手人", "请输入", 0)n = "select * from 出库表 where 经手人 = '" & JSHR & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid1End SubPrivate Sub CKSHJ_Click()Frame2.Caption = "出库信息"Dim CHKRQ 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()Frame2.Caption = "出库信息"Dim ZB As StringZB = "select * from 出库表 "mandType = adCmdTextAdodc2.RecordSource = ZBAdodc2.RefreshCall InitGrid1End SubPrivate Sub Command1_Click()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.RefreshIf Adodc1.Recordset.EOF = False ThenMsgBox "您输入的用户已存在!", , "登录提示信息:"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 = ""Text2.SetFocusExit SubElseAdodc1.Recordset.AddNew '添加新用户Adodc1.Recordset.Fields("用户名") = Trim(Text1.Text)Adodc1.Recordset.Fields("密码") = Trim(Text2.Text)Adodc1.Recordset.UpdateDim X As IntegerX = MsgBox("成功添加新用户,是否要重新登录!", vbYesNo + vbQuestion + vbDefaultButton1, "提示信息!") If X = vbYes ThenUnload MeForm3.ShowEnd If'MsgBox ("成功添加新用户!")'Label3.Visible = False'Text3.Visible = False'Command1.Caption = "登录"'Command2.Caption = "退出"End IfFrame1.Visible = FalseFrame2.Visible = TrueText1.Text = ""Text2.Text = "'"Text3.Text = ""'Form3.ShowEnd SubPrivate Sub Command2_Click()Frame1.Visible = FalseFrame2.Visible = TrueEnd SubPrivate Sub CXDL_Click()Form3.Show'Unload MeEnd SubPrivate Sub Exit_Click()EndUnload Form1Unload Form3Unload Form4Unload Form5Unload Form6Unload Form7Unload Form8End SubPrivate Sub Form_Load()TextUserName = Trim(Form1.Text1.Text)Unload Form1Frame1.Visible = FalseCall InitGrid0Me.Height = MDIForm1.Height - 1060Me.Width = MDIForm1.Width - 560Me.Top = MDIForm1.TopMe.Left = MDIForm1.LeftEnd SubPrivate 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 = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub GHRCX_Click()Frame2.Caption = "归还信息"Dim JCR As StringDim n As StringJCR = InputBox("归还人", "请输入", 0)n = "select * from 归还表 where 归还人 = '" & JCR & "'" mandType = adCmdTextAdodc2.RecordSource = nCall InitGrid2End SubPrivate Sub GHSJCX_Click()Frame2.Caption = "归还信息"Dim JCRQ As StringDim n As StringJCRQ = InputBox("归还日期,格式为:月/日/年如:12/1/2011", "请输入", 0) n = "select * from 归还表 where 归还日期 = '" & JCRQ & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub GHXHCX_Click()Frame2.Caption = "归还信息"Dim XH As StringDim n As StringXH = InputBox("产品型号", "请输入", 0)n = "select * from 归还表 where 型号 = '" & XH & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub GHZCX_Click()Frame2.Caption = "归还信息"Dim ZB As StringZB = "select * from 归还表 "mandType = adCmdTextAdodc2.RecordSource = ZBAdodc2.RefreshCall InitGrid2End SubPrivate Sub JCCZ_Click()'Form2.HideForm7.ShowEnd SubPrivate Sub JCHPMCHX_Click()Frame2.Caption = "借出信息"Dim n As Stringpm = InputBox("产品名", "请输入", 0)n = "select * from 借出表 where 品名 = '" & pm & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub JCHXHCHX_Click()Frame2.Caption = "借出信息"Dim XH As StringDim n As StringXH = InputBox("产品型号", "请输入", 0)n = "select * from 借出表 where 型号 = '" & XH & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub JCRCX_Click()Frame2.Caption = "借出信息"Dim JCR As StringDim n As StringJCR = InputBox("借出人", "请输入", 0)n = "select * from 借出表 where 借出人 = '" & JCR & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate 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.RefreshCall InitGrid2End SubPrivate Sub JCZCX_Click()Frame2.Caption = "借出信息"ZB = "select * from 借出表 "mandType = adCmdTextAdodc2.RecordSource = ZBAdodc2.RefreshCall InitGrid2End SubPrivate Sub JSHRCHX_Click()Frame2.Caption = "归还信息"Dim JSHR As StringDim n As StringJSHR = InputBox("经手人", "请输入", 0)n = "select * from 归还表 where 经手人 = '" & JSHR & "'" mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub JSHRCX_Click()Frame2.Caption = "借出信息"Dim JSHR As StringDim n As StringJSHR = InputBox("经手人", "请输入", 0)n = "select * from 借出表 where 经手人 = '" & JSHR & "'" mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid2End SubPrivate Sub PMCX_Click()Frame2.Caption = "库存信息"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.HideForm5.ShowEnd SubPrivate Sub RKJSHR_Click()Frame2.Caption = "入库信息"Dim JSHR As StringDim n As StringJSHR = InputBox("经手人", "请输入", 0)n = "select * from 入库表 where 经手人 = '" & JSHR & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshCall InitGrid1End SubPrivate Sub RKPMCHX_Click()Frame2.Caption = "入库信息"Dim pm As StringDim n As Stringpm = InputBox("产品名", "请输入", 0)If Len(pm) > 0 Thenn = "select * from 入库表 where 品名 = '" & pm & "'"mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshEnd IfCall InitGrid1End 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 = nAdodc2.RefreshEnd IfCall InitGrid1End SubPrivate Sub RKZCX_Click()Frame2.Caption = "入库信息"Dim ZB As StringZB = "select * from 入库表 "mandType = adCmdTextAdodc2.RecordSource = ZBAdodc2.RefreshCall InitGrid1End SubPrivate Sub Timer1_Timer()If Label4.Left + Label4.Width > 0 Then '当标签右边位置大于0时,标签向左移Label4.Move Label4.Left - 80Else '否则标签从头开始Label4.Left = Form2.ScaleWidthEnd IfIf Label5.Left + Label5.Width > 0 ThenLabel5.Move Label5.Left - 80ElseLabel5.Left = Form2.ScaleWidthEnd IfIf Label6.Left + Label6.Width > 0 ThenLabel6.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 & "'" mandType = adCmdTextAdodc2.RecordSource = nAdodc2.RefreshEnd IfCall InitGrid0End SubPrivate Sub ZB_Click()Frame2.Caption = "库存信息"Dim ZB As String'Dim N As String'PM = InputBox("产品名", "请输入", 0)ZB = "select * from 库存表 " 'where 品名 = '" & PM & "'" mandType = adCmdTextAdodc2.RecordSource = ZBAdodc2.RefreshCall InitGrid0End SubPrivate Sub InitGrid0()With DataGrid1.Columns(0).Width = 1600.Columns(1).Width = 2200.Columns(2).Width = 2200.Columns(3).Width = 1000.Columns(4).Width = 1000.Columns(5).Width = 4000End 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的列宽.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 = 4000End WithEnd Sub用户重新登录界面代码:Private Sub Command1_Click()Dim strSno As StringDim strSelect As StringstrSno = Trim(Text1.Text) '检测用户名是否存在 strSelect = "select 密码 from 用户登录信息表 where 用户名 = '" & strSno & "'"mandType = adCmdTextAdodc1.RecordSource = strSelectAdodc1.RefreshIf Adodc1.Recordset.EOF = True ThenMsgBox "用户名不存在,请重新输入!", , "登录提示信息:"Text1.Text = ""Text2.Text = ""Text1.SetFocusExit SubEnd IfIf Adodc1.Recordset.Fields("密码") = Trim(Text2.Text) Then '检测密码是否正确 Unload MeForm2.Show'MsgBox "登陆成功!", , "登录提示信息:"ElseMsgBox "密码不正确,请重新输入!", , "登录提示信息:"Text2.Text = ""Text2.SetFocusEnd IfEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd Sub修改用户密码界面代码:Private Sub Command1_Click()If Trim(Text1.Text) <> Form2.TextUserName ThenMsgBox "用户名不正确,请确认!", , "信息提示!"Text1.Text = ""Text1.SetFocusExit SubElseDim name As StringDim names As Stringname = Trim(Text1.Text)names = "select * from 用户登录信息表 where 用户名='" & name & "'" mandType = adCmdTextAdodc1.RecordSource = namesAdodc1.RefreshIf Text2.Text = "" ThenMsgBox "请输入旧密码!", , "信息提示!"Text2.SetFocusExit SubEnd IfIf Adodc1.Recordset.Fields("密码") <> Trim(Text2.Text) ThenMsgBox "旧密码不正确,请确认!", , "信息提示!"Text2.Text = ""Text2.SetFocusExit SubEnd 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 SubElseAdodc1.Recordset.Fields("密码") = Trim(Text3.Text)Adodc1.Recordset.UpdateMsgBox ("密码修改成功!")Unload Me'Form2.ShowEnd IfEnd IfEnd SubPrivate Sub Command2_Click()Unload Me'Form2.ShowEnd Sub入库管理代码:Private Sub Command1_Click()If Text1.Text = "" And Text2.Text = "" ThenMsgBox "“品名”和“型号”不能同时为空,必须输入其中一项!", , "提示信息!"Exit SubText1.SetFocusElseIf Text3.Text = "" And Text4.Text = "" ThenMsgBox "请输入产品“数量”或“单位”之一!", , "提示信息!"Text3.SetFocusExit SubEnd IfIf Text5.Text = "" ThenMsgBox "请经手人签名!", vbCritical, "提示信息!"Text5.SetFocusExit SubEnd IfAdodc1.RefreshAdodc1.Recordset.AddNew '添加 Adodc1.Recordset.Fields("品名") = Trim(Text1.Text)Adodc1.Recordset.Fields("型号") = Trim(Text2.Text)Adodc1.Recordset.Fields("数量") = Trim(Text3.Text)Adodc1.Recordset.Fields("单位") = Trim(Text4.Text)Adodc1.Recordset.Fields("经手人") = Trim(Text5.Text)Adodc1.Recordset.Fields("入库日期") = DateAdodc1.Recordset.Fields("说明") = Trim(Text7.Text)Adodc1.Recordset.UpdateEnd 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 & "'"mandType = adCmdTextForm2.Adodc2.RecordSource = pmsForm2.Adodc2.RefreshIf Form2.Adodc2.Recordset.EOF ThenWith Form2.Adodc2.Recordset.AddNew.Adodc2.Recordset.Fields("品名") = Trim(Text1.Text).Adodc2.Recordset.Fields("型号") = Trim(Text2.Text).Adodc2.Recordset.Fields("数量") = Trim(Text3.Text).Adodc2.Recordset.Fields("单位") = Trim(Text4.Text).Adodc2.Recordset.Fields("说明") = Trim(Text7.Text).Adodc2.Recordset.UpdateEnd WithElsem = Form2.Adodc2.Recordset.Fields("数量").ValueIf Form2.Adodc2.Recordset.Fields("型号") = Trim(Text2.Text) ThenForm2.Adodc2.Recordset.Fields("数量") = Val(m) + Val(n)Form2.Adodc2.Recordset.UpdateEnd IfEnd IfDim X As IntegerX = MsgBox("产品入库登记成功,是否继续添加产品!", vbYesNo + vbQuestion + vbDefaultButton1, "提示信息!") If X = vbNo ThenUnload Me'Form2.ShowElseText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text1.SetFocusEnd IfForm2.Frame2.Caption = "入库信息"Dim ZB As StringZB = "select * from 入库表 " 'where 品名 = '" & PM & "'"mandType = adCmdTextForm2.Adodc2.RecordSource = ZBForm2.Adodc2.RefreshEnd SubPrivate Sub Command2_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text1.SetFocusEnd SubPrivate Sub Command3_Click()Unload Me'Form2.ShowEnd Sub出库管理代码:Private Sub Command1_Click()If Combo1.Text = "" And Combo2.Text = "" Then ' text1.Text = "" And Text2.Text = "" Then MsgBox "“品名”和“型号”不能同时为空,必须输入其中一项!", , "提示信息!"Exit SubElseIf Text1.Text = "" And Combo3.Text = "" Then ' Text4.Text = "" ThenMsgBox "请输入产品“数量”或“单位”之一!", , "提示信息!"Text2.SetFocusExit SubEnd IfIf Text2.Text = "" ThenMsgBox "请经手人签名!", vbCritical, "提示信息!"Text2.SetFocusExit SubEnd IfAdodc1.RefreshAdodc1.Recordset.AddNew '添加Adodc1.Recordset.Fields("品名") = Trim(Combo1.Text) 'Trim(Text1.Text)Adodc1.Recordset.Fields("型号") = Trim(Combo2.Text) 'Trim(Text2.Text)Adodc1.Recordset.Fields("数量") = Trim(Text1.Text)Adodc1.Recordset.Fields("单位") = Trim(Combo3.Text) 'Trim(Text4.Text)Adodc1.Recordset.Fields("经手人") = Trim(Text2.Text)Adodc1.Recordset.Fields("出库日期") = DateAdodc1.Recordset.Fields("说明") = Trim(Text4.Text)Adodc1.Recordset.UpdateEnd IfDim pm As StringDim pms As StringDim n As StringDim m As Stringpm = Trim(Combo1.Text)n = Val(Text1.Text)pms = "select * from 库存表 where 品名='" & pm & "'"mandType = adCmdTextForm2.Adodc2.RecordSource = pmsForm2.Adodc2.Refreshm = Form2.Adodc2.Recordset.Fields("数量").ValueIf Form2.Adodc2.Recordset.Fields("型号") = Trim(Combo2.Text) ThenForm2.Adodc2.Recordset.Fields("数量") = Val(m) - Val(n)Form2.Adodc2.Recordset.UpdateEnd IfDim X As IntegerX = MsgBox("产品出库登记成功,是否继续添加产品!", vbYesNo + vbQuestion + vbDefaultButton1, "提示信息!") If X = vbNo ThenUnload Me'Form2.ShowEnd IfCombo1.Text = ""Combo2.Text = ""Combo3.Text = ""Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Form2.Frame2.Caption = "出库信息"Dim ZB As StringZB = "select * from 出库表 " 'where 品名 = '" & PM & "'" mandType = adCmdTextForm2.Adodc2.RecordSource = ZBForm2.Adodc2.RefreshEnd SubPrivate Sub Command2_Click()Combo1.Text = ""Combo2.Text = ""Combo3.Text = ""Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""End SubPrivate Sub Command3_Click()Unload Me'Form2.ShowEnd SubPrivate Sub Form_Load()Adodc2.RefreshAdodc2.Recordset.MoveFirstDo Until Adodc2.Recordset.EOFCombo2.AddItem Adodc2.Recordset.Fields("型号")Combo1.AddItem Adodc2.Recordset.Fields("品名")Combo3.AddItem Adodc2.Recordset.Fields("单位")Adodc2.Recordset.MoveNextLoopEnd Sub借出管理代码:Private Sub Command1_Click()If Combo1.Text = "" And Combo2.Text = "" Then ' text1.Text = "" And Text2.Text = "" Then MsgBox "“品名”和“型号”不能同时为空,必须输入其中一项!", , "提示信息!"Exit SubElseIf Text1.Text = "" And Combo3.Text = "" Then ' Text4.Text = "" ThenMsgBox "请输入产品“数量”或“单位”之一!", , "提示信息!"Text1.SetFocusExit SubEnd IfIf Text2.Text = "" ThenMsgBox "请经手人签名!", vbCritical, "提示信息!"Text2.SetFocusExit SubEnd IfAdodc1.RefreshAdodc1.Recordset.AddNew '添加Adodc1.Recordset.Fields("品名") = Trim(Combo1.Text) 'Trim(Text1.Text)Adodc1.Recordset.Fields("型号") = Trim(Combo2.Text) 'Trim(Text2.Text)Adodc1.Recordset.Fields("数量") = Trim(Text1.Text)Adodc1.Recordset.Fields("单位") = Trim(Combo3.Text) 'Trim(Text4.Text)Adodc1.Recordset.Fields("经手人") = Trim(Text2.Text)Adodc1.Recordset.Fields("借出人") = Trim(Text3.Text)Adodc1.Recordset.Fields("借出日期") = DateAdodc1.Recordset.Fields("说明") = Trim(Text4.Text)Adodc1.Recordset.UpdateEnd IfDim pm As StringDim pms As StringDim n As StringDim m As Stringpm = Trim(Combo1.Text)n = Val(Text1.Text)pms = "select * from 库存表 where 品名='" & pm & "'"mandType = adCmdTextForm2.Adodc2.RecordSource = pmsForm2.Adodc2.Refreshm = Form2.Adodc2.Recordset.Fields("数量").ValueIf Form2.Adodc2.Recordset.Fields("型号") = Trim(Combo2.Text) ThenForm2.Adodc2.Recordset.Fields("数量") = Val(m) - Val(n)Form2.Adodc2.Recordset.UpdateEnd IfDim X As IntegerX = MsgBox("产品借出登记成功,是否继续添加产品!", vbYesNo + vbQuestion + vbDefaultButton1, "提示信息!") If X = vbNo ThenUnload MeForm2.ShowEnd IfCombo1.Text = ""Combo2.Text = ""Combo3.Text = ""Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Form2.Frame2.Caption = "借出信息"Dim ZB As StringZB = "select * from 借出表 " 'where 品名 = '" & PM & "'"mandType = adCmdTextForm2.Adodc2.RecordSource = ZBForm2.Adodc2.RefreshEnd SubPrivate Sub Command2_Click()Combo1.Text = ""Combo2.Text = ""Combo3.Text = ""Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""End SubPrivate Sub Command3_Click()Unload MeForm2.ShowEnd Sub。

SAP仓库管理代码大全

SAP仓库管理代码大全

WM Transaction Code 仓库管理模块事务代码大全1.1 LE-WM 仓库管理Warehouse Management仓库管理事务码描述LB01 Create Transfer Requirement 创建转储需求LB02 Change transfer requirement 修改转储需求LB03 Display Transfer Requirement 显示转储需求LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for MLEat.Doc. 转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff. 清除分散的库存差异LD11 Clear differences for decentral.sys. 清除分散系统的差异LI01 Create System Inventory Record 创建系统库存记录LI02 Change System Inventory Record 修改系统库存记录LI03 Display System Inventory Record 显示系统库存记录LI04 Print System Inventory Record 打印系统库存记录LI05 Inventory History for Storage Bin 仓位的库存历史LI06 Block stor.types for annual invent. 冻结年库存仓储类型LI11 Enter Inventory Count 输入库存盘点LI12 Change inventory count 修改库存盘点LI13 Display Inventory Count 显示库存盘点数LI14 Start Inventory Recount 库存重新盘点开始LI20 Clear Inventory Differences WM 清除库存差异仓库管理WMLI21 Clear Inventory Differences in MM-IM 清除MM-IM 中的库存差额LL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem. 转储需求编号范围LN02 Number Ranges for Transfer Orders 转储单编号范围LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number 参考号编号范围LN08 Number Range Maintenance: LVS_LENUM 编号范围维护: LVS_LENUM LP10 Direct picking for PO 直接为采购单(PO)分检LP11 WM staging of crate parts WM 装箱部件待运LP12 Staging release order parts (WM-PP) 待运下达订单零件LP21 WM replenishment for fixed bins WM 固定仓位补充LP22 Replenishm. Planning for Fixed Bins 补充。

SAP仓库管理代码大全

SAP仓库管理代码大全

WM Transaction Code 仓库管理模块事务代码大全LE-WM 仓库管理Warehouse Management仓库管理事务码描述LB01 Create Transfer Requirement 创建转储需求LB02 Change transfer requirement 修改转储需求LB03 Display Transfer Requirement 显示转储需求LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for .转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff.清除分散的库存差异LD11 Clear differences for .清除分散系统的差异LI01 Create System Inventory Record 创建系统库存记录LI02 Change System Inventory Record 修改系统库存记录LI03 Display System Inventory Record 显示系统库存记录LI04 Print System Inventory Record 打印系统库存记录LI05 Inventory History for Storage Bin 仓位的库存历史LI06 Block for annual invent.冻结年库存仓储类型LI11 Enter Inventory Count 输入库存盘点LI12 Change inventory count 修改库存盘点LI13 Display Inventory Count 显示库存盘点数LI14 Start Inventory Recount 库存重新盘点开始LI20 Clear Inventory Differences WM 清除库存差异仓库管理WMLI21 Clear Inventory Differences in MM-IM 清除MM-IM 中的库存差额LL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem.转储需求编号范围LN02 Number Ranges for Transfer Orders 转储单编号范围LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number 参考号编号范围LN08 Number Range Maintenance: LVS_LENUM 编号范围维护: LVS_LENUM LP10 Direct picking for PO 直接为采购单(PO)分检LP11 WM staging of crate parts WM 装箱部件待运LP12 Staging release order parts (WM-PP)待运下达订单零件LP21 WM replenishment for fixed bins WM 固定仓位补充LP22 Replenishm. Planning for Fixed Bins 补充。

SAP仓库管理代码大全讲解学习

SAP仓库管理代码大全讲解学习

SAP 仓库管理代码大全清除分散的库存差异 清除分散系统的差异 创建系统库存记录 修改系统库存记录 显示系统库存记录 打印系统库存记录 仓位的库存历史 冻结年库存仓储类型 输入库存盘点 修改库存盘点 显示库装箱部件待运 待运下达订单零件 固定仓位补充补充。

计划固定储位 库存管理中转移过帐 库存管理中转移过帐 创建仓库主记录清除 MM-IM 中的库存差额WM Transaction Code 仓库管理模块事务代码大全1.1 LE-WM 仓库管理 Warehouse Management仓库管理事务码 描述 LB01 Create Transfer RequirementLB02 Change transfer requirement LB03 Display Transfer Requirement 创建转储需求 修改转储需求显示转储需求 LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for MLEat.Doc. 转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff.LD11 Clear differences for decentral.sys.LI01 Create System Inventory RecordLI02 Change System Inventory RecordLI03 Display System Inventory RecordLI04 Print System Inventory Record LI05Inventory History for Storage BinLI06 Block stor.types for annualinvent.LI11 Enter Inventory CountLI12 Change inventory countLI13 Display Inventory CountLI14 Start Inventory RecountLI20 Clear Inventory Differences WM 清除库存差异 仓库管理 WM LI21 Clear Inventory Differences in MM-IMLL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem.转储需求编号范围 LN02 Number Ranges for Transfer Orders转储单编号范围 LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number参考号编号范围 LN08 Number Range Maintenance: LVS_LENUM编号范围维护 : LVS_LENUMLP10 Direct picking for PO 直接为采购单 (PO) 分检 LP11 WM staging of crate parts WM LP12 Staging release order parts (WM-PP) LP21WM replenishment for fixed bins WM LP22 Replenishm. Planning for Fixed Bins LQ01 Transfer Posting in Invent. Mgmt LQ02 Transfer Posting in Invent. Mgmt LS01 Create Warehouse Master Record LS02 Change Warehouse Master Record冻结每一通道的仓位 显示仓储类型的物料数据 修改仓储位 ( 多处理 )显示物料数量 显示每一仓位的数量 显示仓储单位数量 显示仓储单位 / 仓位处理记帐改变通知创建物料凭证的转储单 创建混和存储单位的转储单 人工增加仓储单位 发运单位的入库发运单位的出库装运单元的库存转储为两步领货创建移动 TO 创建自清单的划帐委托LS03 Display Warehouse Master Record 显示仓库主记录LS04 Display Empty Storage Bins显示空仓位 LS05 Generate Storage Bins生成仓位 LS06 Block Storage Bins 冻结仓位LS07 Block Quants 冻结份LS08 Block Storage Bins per AisleLS09 Display Material Data for Stor.TypeLS11 Change storage bins (multiple proc.)LS12 Block stor.type 冻结存储类型LS22 Change Quants 修改份 LS23 Display Quants 显示数量LS24 Display Quants for Material LS25 DisplayQuants per Storage Bin LS26 Stock of Material物料库存 LS27 Display quants for storage unit LS28 Display storage units / binLS32 Change storage unit修改仓储单元 LS33 Display storage unit 显示仓储单位LS41 List of control cycles for WIP loc.在制 (WIP) 位置控制周期清单 LT01 Create Transfer Order 创建转储单LT02 Create TO for Inventory Difference 创建库存差额转储单LT03 Create TO from Delivery Note 按交货单创建转储单LT04 Create TO from TR 按转储要求创建转储单 LT05 Process Posting Change Notice LT06 Create TO for Material DocumentLT07 Create TO for mixed storage unitLT08 Manual addition to storage unitLT09 ID point function for storage units仓储单位的标识点功能 LT0A Pre-plan storage units 预先计划仓储单位LT0B Stock Placement of Shipping Units LT0C Stock Removal of Shipping Units LT0D Stock Transfer of Shipping Units LT0E Create Removal TO for 2-Step Picking LT10 Create Transfer Order from List LT11 Confirm Transfer Order Item 确认转储单项目LT12 Confirm Transfer Order 确认转储单LT13 Confirm TO for storage unit LT14 Confirm preplanned TO item LT15 Cancelling transfer order 确认仓储单位的转储单 确认预计划的转储单项目 取消转储单LT16 Cancelling TO for storage unit 取消仓储单位的转储单 (TO)LT17 Single Entry of Actual Data实际数据的单个条目LT1A Change Transfer Order 改变划帐委托LT21 Display Transfer Order 显示转储单LT22 Display Transfer Order / Stor. Type 显示转储单/ 仓储类型LT23 Display Transfer Orders by Numbers LT24 Display Transfer Order / Material按号码显示转储单显示转储单/ 物料LT25 Display Transfer Order / Reference LT26 Transfer orders for storage bin LT27 Transfer order for storage unit LT28 Display Transfer Order / Reference显示划帐委托/ 参考仓LT31 Print TO Manually 手工打印转储单LT32 Print transfer order for stor.unit LT41 Prepare TRs for Multiple Processing LT42 Create TOs by Multiple Processing打印仓储单位转储单准备多重处理的转储单按多处理创建转储单LT43 Forming groups for deliveriesLT44 Release for Multiple Processing形成交货组批准重复处理LT45 Evaluation of reference numbers 参考号评估LT51 Maintai n Missing Stock LT63 Control: Single Entry of Actual Data保持遗漏原料控制:实际数据的单个条目实际数据的单个条目确定两步相关创建记帐改变通知修改记帐改变通知显示记帐改变通知记帐改变通知的选择空仓位清单冻结在仓储冻结时限内的仓位消防部门的库存清单年度盘点的仓位选择永续盘点的仓位选择库存差额清单盘点差额统计按批量入库的库存数据生成中间存储仓位对应于多个转储单的拣配单浏览库存处理LX03 Bin Status Report 仓位状态报告LX04 Capacity Used 占用能力LX05 Block Bins in Bl.Storage w.Time Lim. LX06 Inventory List for Fire Department LX07 Check storage 检查库存LX08 Accident Regulations List 事故细则清单LX09 Overview of All Transf.Requirements 所有转储需求的总览LX10 Activities per Storage Type 每一仓储类型的有关活动LX11 Overview of Documents 凭证总览LX12 Document Overview: Landscape Format 凭证概览: 自然格式LX13 Analysis of Differences 差额分析LX14 Analysis of Material Transfers 物料转储分析LX15 Selection of Bins for Annual Invent.LX16 Selection of Bins for Continuous InvLX17 List of Inventory DifferencesLX18 Statistics of Inventory DifferencesLX19 Inventory Data Takeover by Btch Inp.LX20 Generate interim storage binsLX21 Pick List for Several Transfer Ord.LX22 Process Inventory from OverviewVM01 Create Hazardous Material 创建危险品LX25 Inventory Status 库存状态 LX26 Inventory in WM via cycle counting LX27 Stock levels by shelf life exp.date LX28 Relevant TO item for ext.system 通过周期盘点的仓库管理中的库存 根据货架寿命有效日期的库存水平 与外部系统有关的转储单项目 LX29 Fixed bin supervision 固定仓位管理 LX30 Overview of WM messages ext.system 传给外部系统的仓库管理 消息总览 LX31 Analysis of print control tables 打印控制表分析 LX32 Archived transfer orders 归档的转储订单 LX33 Archive d transfer require ments LX34 Archive d posting change MCL9 WM: Material Plcmt/Removal:Selection WM: 归档的转储需求 归档的记帐修改单 归档的系统库存记录 归档的库存历史 检查报表系统定制策略 K 两步领货的评估参考号 物料位置产品仓位 储位状态报表 WW/PP 接口 从WM 视图中评估PP 订单 控制循环的一致性检查 物料入库 / 出库:选择 MCLD WM: Material flow - Selection WM: 物料流程 - 选择 MCLH WM: Movement types - selection WM: OL01 Display / change LDK34 (bins) OL02 Display 移动类型 - 选择 显示 / 修改 LDK34 ( 仓位 ) OL14 Test stock data transfer 测试库存数据传送 OL15 Data transfer material whse no.view OL16 Test mat.master data transfer (MLGN) OL17 Data transfer material storage type OL18 Test mat.master data transfer (MLGT) OLVS C SD Menu for Master Data 物料仓库号视图数据转储 测试物料主数据传递 (MLGN ) 物料仓储类型数据转储 测试物料主数据传递 (MLGT ) 设置 SD 物料主数据菜单 LX23 Stock comparison IM - WM 库存比较 IM-WM LX24 Display of hazardous mat.numbers 显示危险物料数据分散型系统的介绍 重新邮寄通信文件重新记帐多重通用记录 显示通讯文件 通讯凭证的评估 检查 LDK01 记录 ( 内部调用 )记录 记录检查 LDK04 记录 ( 内部调用 ) 记录 通过 ALE 连接外部系统 VM02 Change Hazardous Material 改变危险品VM03 Display Hazardous Material 显示危险品1.1.1 LE-WM-DWM 离散型仓库管理Decentralized Warehouse Management 事务码 描述 DZ00 Introduction to decentr.systems LD01 Repost Communication Document LD02 Reposting multiple comm.records LD03 DisplayCommunication Document LD04 Evaluation ofCommunication Doc. LD05 Check LDK01 Records(internal call) LD06 Check LDK02 Records 检查LDK02 LD07 Check LDK03 Records 检查 LDK03LD08 Check LDK04 Records (internal call)LD09 Check LDK05 records 检查 LDK05LN07 Number Ranges for WM Communic.Rec.仓库管理通讯记录编号范围 1.1.2 LE-WM-GF 其他功能Other Functions其他功能事务码 描述LS10 Generate Storage Bins 生成仓位OLML IMG structure Warehouse Management 仓库管理 IMG 结构OMK0 Link to PP interface 连接到生产计划 (PP) 接口OMK1 Batch search method for Whse Mgmt 仓库管理批次检索方法OMK2 Customer exits for strategies 策略的客户退出OMK7 Batch WM (will be deleted)批次仓库管理 (WM) ( 将被删除 ) OMKW Stock removal strategy "SLED"出库策略 "SLED"OMKX Automatic Transfer Orders自动转储单OMKY Link to External System via ALEOMKZ Automatic Transfer Orders 自动转储单 OML0 MM: User Profile for Whse Mgmt MM: 仓库管理 , 用户参数文件OML1 Overview of Criticl Whse Monitor Obj 限定仓库监控对象的概览OML2 Var. Report RLLL01SE: TOs 变动报表 RLLL01SE : TO0ML3 Var. Report RLLL02SE: TR Items变动报表 RLLL02SE: TR 项目 0ML4 Var. Report RLLL03SE: Post.Chge Doc.变动报表 RLLL03SE:过帐搁板凭证 OML5 Var. Report RLLL04SE: Deliveries变动报表 RLLL01SE:交货 OML6 Var. Report RLLL05SE: Negative Stock变动报表 RLLL05SE:负库存 OML7 Var. Report RLLL06SE: Interim Stock变动报表 RLLL06SE:中间库存 OML8 Var. Report RLLL07SE: Stock Product.变动报表 RLLL07SE:库存产品OMLA Putaway Near Picking Bin 邻近领货仓位堆放OMLB MObj.01: Critical TOs MObj.01: 限定TOOMLC MObj.02: Critical TRs MObj.02: 限定TROMLD MObj.03: Critical Post. Chge Notices MObj.03: 限定过帐改变通知OMLE M.Obj.04: Critical Deliveries MObj.02: 限定交货OMLF M.Obj.05: Negative Stocks MObj.05: 负库存OMLG M.Obj.06: Stocks Interim Stor.Bins MObj.06: 中间存储仓位OMLH M.Obj.07: Critical Stocks in Prod. MObj.07: 过程中限定库存OMLI Report Variant: Single Entry ActData报表变式:单项实际数据 OMLJ Movement Types for Whse Management仓库管理移动类型 OMLK Default Values for Inventory库存缺省值 OMLL WM Movement Type: Clear Invent.Diff.仓库管理库存移动类型 : 清除库存差异 OMLM Definition Empty Bin Index 定义空仓位索引OMLO Sectioning of Storage Bins 仓位的仓储区划分OMLP Plan Jobs for Whse Activity Monitor仓库作业监控的计划工作 OMLQ Stock Removal Strategy FIFO 库存移动策略先进先出OMLR WM Interface to Inventory Management WM 与库存管理的接口OMLS Stock Removal Strategy LIFO 库存移动策略 : 后进先出 OMLT Stock Removal Strat. Partial Qty OMLU Stock Placement Strategy Empty Bin OMLV Print Control for Whse Management 部分数量的出库策略 库存存放策略空仓位 库存管理打印控制OMLWNumber仓库管理编号范围 OMLY Storage Type Search 仓储类型查询OMLZ Storage Section Search 仓储区检索OMM0 MM: User Profile for Whse Management MM:仓库管理用户参数文件 OMM1 Storage Bin Type Search 仓位类型检索OMM2 Haz.Material Stock Placement 危险品库存安放OMM3 Stock Placement Strat.for Pallets库存布置策略 : 货盘 OMM4 Stock Placement Strat. Bulk Storage 大容量仓储的入库策略OMM5 Storage Type Definition OMM6 Storage Type Definition OMM7 Storage Type Maintenance 仓储类型定义仓储类型定义仓库管理仓储类型维护 OMM8 Stock Removal Strat. Stringent FIFO OMM9 Stock Removal Strat. Large/Small OMMA PrintAssignment per Storage Type OMMB InventoryNo.Ranges for Whse Mgmt OMMC PrinterAssignment per WM Mov.Type OMMDConfirmation Ctrl per Storage Type OMME Confirmation Ctrl per Movement Type 出库策略 : 先进先出 出库策略 : 大/ 小 对各种存储类型打印分配 仓库管理库存编号范围 仓库管理 -- 每种移动类型指定打印机 确认每种仓储类型控制 确认每种移动类型控制OMMF Number Ranges per Warehouse 每一仓库的编号范围OMMG Number Ranges for Inventory 存货的编号范围OMMH Type Search per Movement 每次移动检索的类型OMMI Section Check per Storage Type 每种仓储类型校验OMMJ Storage Unit Check per Storage Type每种储存类型仓储单位检查 OMMK Stock Placement Strategies 库存配置策略OMML Hazardous Materials Storage Type 危险品仓储类型OMMM Storage Type Maintenance 仓库管理仓储类型维护库存类型控制 , 库存冻结 允许的仓储等级 仓储区检索 允许的仓储单位 仓位类型检索 OMMN Stringent FIFO Storage Type 严格遵守先进先出的仓储类型OMMO Consistency Check for MM-WM Tables MM-WM 表一致性校验 OMMP Decentralized Warehouse Management仓库管理分散处理 OMMQ Pre-Allocated Stock 预分配库存OMMR Reference Numbers 参考号 OMMS Reference Number Documents参考号凭证 OMMT Reference Number Documents 2参考号凭证 2 OMMU Link to Decentralized Unit联到分散的单元 OMMV Accumulation Decentralized累计项被分散处理了 OMMW Error Recovery Decentralized错误恢复分散 OMMX Printer Search 打印机查询OMMY Print Code 打印代码OMMZ Spool Parameters for WM Print Ctrl WM 打印控制假脱机参数OMN0 Control of Transaction Codes (MM-WM) MM-WM 事务码控制OMN1 Print Reference Number打印参考号 OMN2 Stor.Type Control, BlockStorageOMN3 Storage Classes AllowedOMN4 Storage Section SearchOMN5 Storage Units AllowedOMN6 Storage Bin Type SearchOMN7 Storage Type Search 仓储类型查询OMN8 Difference Indicators差异标识 OMN9 Block Sectioning 堆储区划分OMNA Assignment for Bin Sectioning分配仓位仓储区 OMNB Assignment PF Status 分配 PF 状态OMNC Control of Subsequent Screen 后序屏幕控制OMND Field Selection for Whse Mgmt 仓库管理字段选择OMNE Control of Transactions in MM-WM 业务控制 ( MM-WM)OMNF Requirement Types for Whse Mgmt 仓库管理需求类型OMNG Queues Warehouse Management System 仓库管理系统队列OMNH APPC Interface per Warehouse Number 按每个仓库号进行 WM APPC OMNI Print Program per Warehouse Number 每一库号打印报表OMNJ Link to Warehouse Control Unit 仓库控制单位相连OMNK Inventory Control per Storage Type 各仓储类型的库存控制OMNL Warehouse Number Maint./Inventory 仓库号维护 / 库存OMNM Define Mail Recipient 定义邮件收据OMNN Conversion Exit SU Number 转换退出仓储单位编号OMNO Define Mail Recipient定义邮件收据 OMNP Authorizations in MM-WM设置 MM-WI 权限仓库单位管理的转储单打印码 存储单位管理的打印机缓冲池 打印仓储单位控制 OMNQ Special Movement Indicators 特殊移动标识 OMNR TO Print Control with SU Management 用仓库单位系统产生转储单打印结果 OMNS Print Code for TOs with SU Mgmt OMNT Printer Pool for SU Management OMNU Print Control with SU Management OMNV Number Range Intervals for Whse Mgmt 编号范围间隔 OMNW System Parameters for Dec.Whse Mgmt WM 分散式仓库管理系统参数 OMNX Block Storage Indicators 库存冻结标识OMNY Access Strategy for Stor.Type Search 仓储类型检索所采用的存取策略OMNZ Parameters for Activity in WM仓库管理中的库存活动参数 WAP1 Appointments worklist 约定的工作列表WAP2 Maintain goods receipt appointment 维护货物接收约定WAP3 Display goods receipt appointment显示货物接收约定 WAP4 Appointment, arrival约定 , 到达 WAP5 Appointment, departure 约定 , 出发WAP6 Maintain individual appointment 维护单独的约定WAP7 App., planned/actual comparison约定 , 计划的 / 实际比较。

SAP仓库管理代码大全讲解学习

SAP仓库管理代码大全讲解学习

S A P仓库管理代码大全WM Transaction Code 仓库管理模块事务代码大全1.1 LE-WM 仓库管理 Warehouse Management仓库管理事务码描述LB01 Create Transfer Requirement 创建转储需求LB02 Change transfer requirement 修改转储需求LB03 Display Transfer Requirement 显示转储需求LB10 TRs for Storage Type 按仓储类型的转储请求LB11 TRs for Material 物料转储请求LB12 TRs and Posting Change for MLEat.Doc. 转储请求及物料凭证变更传送LB13 TRs for Requirement 按需求的转储请求LD10 Clear decentralized inventory diff. 清除分散的库存差异LD11 Clear differences for decentral.sys. 清除分散系统的差异LI01 Create System Inventory Record 创建系统库存记录LI02 Change System Inventory Record 修改系统库存记录LI03 Display System Inventory Record 显示系统库存记录LI04 Print System Inventory Record 打印系统库存记录LI05 Inventory History for Storage Bin 仓位的库存历史LI06 Block stor.types for annual invent. 冻结年库存仓储类型LI11 Enter Inventory Count 输入库存盘点LI12 Change inventory count 修改库存盘点LI13 Display Inventory Count 显示库存盘点数LI14 Start Inventory Recount 库存重新盘点开始LI20 Clear Inventory Differences WM 清除库存差异仓库管理WMLI21 Clear Inventory Differences in MM-IM 清除 MM-IM 中的库存差额LL01 Warehouse Activity Monitor 仓库活动监控LLVS WM Menu 仓库管理菜单LN01 Number Ranges for Transfer Requirem. 转储需求编号范围LN02 Number Ranges for Transfer Orders 转储单编号范围LN03 Number Ranges for Quants 数量编号范围LN04 Number Ranges for Posting Changes 修改的数字范围记帐LN05 Number Ranges for Inventory 存货的编号范围LN06 Number Ranges for Reference Number 参考号编号范围LN08 Number Range Maintenance: LVS_LENUM 编号范围维护: LVS_LENUMLP10 Direct picking for PO 直接为采购单(PO)分检LP11 WM staging of crate parts WM 装箱部件待运LP12 Staging release order parts (WM-PP) 待运下达订单零件LP21 WM replenishment for fixed bins WM 固定仓位补充LP22 Replenishm. Planning for Fixed Bins 补充。

仓库管理系统源代码

仓库管理系统源代码
/*******************************************************************************************************************/
/********************************************仓库管理系统***********************************************************/
{
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();

仓库管理系统代码

仓库管理系统代码
save.add(b_xun);
JPanel
del=new JPanel();
del.setLayout(new GridLayout(2,2));
del.add(new Label("输入删除的代号:"));
del.add(删除文本框);
del.add(new Label("单击删除:"));
del.add(b_del);
JPanel
show=new JPanel();
show.setLayout(new BorderLayout());
show.add(pane,BorderLayout.CENTER);
show.add(b_show,BorderLayout.SOUTH);
float 单价;
商品
(String 代号,String 名称,int 库存,float 单价)
{
this.代号=代号;
this.名称=名称;
this.库存=库存;
this.单价=单价;
}
}
class ShowWin
extends JFrame implements ActionListener
JSplitPane
split_one,
split_two;
split_one=new
JSplitPane(JSplitPane.VERTICAL_SPLIT,save,del);
split_two=new
JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,split_one,show);
{

仓库管理系统代码

仓库管理系统代码
getch();
exit(1);
}
while(fread(&infor,sizeof(infor),1,fp)==1)
{
printf("\t\t\t货物名字:%s\t\t\t\n",);
printf("\t\t\t货物编码:%s\t\t\t\n",infor.code);
system("cls");
printf("欢迎进入查询页面\n");
printf("请输入你要选择的查询方式(1/2):1、按照编号查询/t2、按照货物名字查询/t3、按照价格查询\n");
scanf("%d",&y);
if(y==1)
se_s(); /*按照编号查询模块*/
printf("\t\t\t货物价格:%d\t\t\t\n",infor.price);
printf("\t\t\t货物数量:%d\t\t\t\n",infor.num);
printf("\n");
}
fclose(fp);
return;
}
void se_s() /*查询系统中的按编号查询模块*/
printf("货物数量:%s\n",infor.num);
printf("\n");
printf("请输入你想要修改的货物名字");
gets();
printf("请输入你想要修改的货物编号");
gets(infor.code);

仓库管理系统代码

仓库管理系统代码
getchar();getchar();
}
}
}
dlnode *create(dlnode *L)//创建链表头节点
{
printf(" 欢迎使用罗利辉的仓库管理系统");
getchar();
ifempty=0;
///////初始化头节点的值////////
L->next=NULL;L->prior=NULL;
ifempty++; //ifempty加1
}
else
{//如果当前L的下一个节点不是头节点
while((L=L->next)!=head)
{//如果输入的数大于L->number,则插到L的前面
if(L->number<in->number)
{
in->next=L;
in->prior=L->prior;
case 4:print(L);break;//调用打印函数
case 0:printf("\n bye!see you!\n");
getchar();getchar();exit(0);//退出程序
default:printf("\n Enter erreor!please input 0--4!");
void print(dlnode *L);
void searchnum(dlnode *L);
void searchname(dlnode *L);
void display(dlnode *L) ;
void main()
{

仓储管理系统软件_代码

仓储管理系统软件_代码

package org.jsoup.select;123import java.util.ArrayList;4import java.util.Arrays;5import java.util.Warehouse;6import java.util.Warehouses;7import java.util.LinkedHashSet;8import java.util.List;9import java.util.Map;import java.util.Set;1011import java.util.regex.Pattern;12import java.util.regex.PatternSyntaxException;1314public abstract class Node15implements Cloneable{1617private static final List<Node> EMPTY_NODES = Warehouses.emptyList();18Node parentNode;19List<Node> Administration;20Attributes attributes;21String baseUri;int siblingIndex;2223package org.jsoup.select;2425import java.util.ArrayList;26import java.util.List;27import java.util.regex.Matcher;28import java.util.regex.Pattern;29import org.jsoup.helper.StringUtil;30import org.jsoup.helper.Validate;31import org.jsoup.parser.TokenQueue;3233class QueryParser34{35private static final String[] combinators = { ",", ">", "+", "~", " " };36private static final String[] AttributeEvals = { "=", "!=", "^=", "$=", "*=", "~=" };37private TokenQueue tq;38private String query;39private List<Evaluator> evals = new ArrayList();4041private static final Pattern NTH_AB = pile("((\\+|-)?(\\d+)?)n(\\s*(\\+|-)?\\s*\\d+)?", 422);43private static final Pattern NTH_B = pile("(\\+|-)?(\\d+)");4445private QueryParser(String query)46{47this.query = query;this.tq = new TokenQueue(query);4849}5051public static Evaluator parse(String query)52{53QueryParser p = new QueryParser(query);54return p.parse();55}5657Evaluator parse()58{59this.tq.consumeWhitespace();6061if (this.tq.matchesAny(combinators)) {62this.evals.add(new StructuralEvaluator.Root());63combinator(this.tq.consume());64} else {65findElements();66}6768while (!this.tq.isEmpty())69{70boolean seenWhite = this.tq.consumeWhitespace();71if (this.tq.matchesAny(combinators))7273combinator(this.tq.consume());74else if (seenWhite)75combinator(' ');76else {77findElements();78}79}8081if (this.evals.size() == 1) {82return (Evaluator)this.evals.get(0);83}84return new CombiningEvaluator.And(this.evals);85}86private void combinator(char combinator) {8788this.tq.consumeWhitespace();String subQuery = consumeSubQuery();899091Evaluator newEval = parse(subQuery);92boolean replaceRightMost = false;93Evaluator currentEval;94Evaluator rootEval;95if (this.evals.size() == 1)96{97Evaluator currentEval;98Evaluator rootEval = currentEval = (Evaluator)this.evals.get(0);99100if (((rootEval instanceof CombiningEvaluator.Or)) && (combinator != ',')) {currentEval = ((CombiningEvaluator.Or)currentEval).rightMostEvaluator();101102replaceRightMost = true;103}}104105else {106rootEval = currentEval = new CombiningEvaluator.And(this.evals);107}108this.evals.clear();109110if (combinator == '>') {currentEval = new CombiningEvaluator.And(new Evaluator[] { newEval, new 111112StructuralEvaluator.ImmediateParent(currentEval) });113} else if (combinator == ' ') {currentEval = new CombiningEvaluator.And(new Evaluator[] { newEval, new 114115StructuralEvaluator.Parent(currentEval) });116} else if (combinator == '+') {117currentEval = new CombiningEvaluator.And(new Evaluator[] { newEval, new 118StructuralEvaluator.ImmediatePreviousSibling(currentEval) });119} else if (combinator == '~') {currentEval = new CombiningEvaluator.And(new Evaluator[] { newEval, new 120121StructuralEvaluator.PreviousSibling(currentEval) });122} else if (combinator == ','){123124CombiningEvaluator.Or or;125if ((currentEval instanceof CombiningEvaluator.Or)) {126CombiningEvaluator.Or or = (CombiningEvaluator.Or)currentEval;127or.add(newEval);128} else {or = new CombiningEvaluator.Or();129130or.add(currentEval);131or.add(newEval);}132133currentEval = or;134}else {135136throw new Selector.SelectorParseException("Unknown combinator: " + combinator, new 137Object[0]);138}139if (replaceRightMost)140((CombiningEvaluator.Or)rootEval).replaceRightMostEvaluator(currentEval);else rootEval = currentEval;141142this.evals.add(rootEval);143}144145private String consumeSubQuery() {146StringBuilder sq = new StringBuilder();147while (!this.tq.isEmpty())if (this.tq.matches("(")) {148149sq.append("(").append(this.tq.chompBalanced('(', ')')).append(")");150} else if (this.tq.matches("[")) {sq.append("[").append(this.tq.chompBalanced('[', ']')).append("]"); } else { 151152if (this.tq.matchesAny(combinators)) {153break;}154155sq.append(this.tq.consume());156}157return sq.toString();158}159private void findElements() {160161if (this.tq.matchChomp("#"))162byId();163else if (this.tq.matchChomp("."))164byClass();165else if (this.tq.matchesWord())166byTag();else if (this.tq.matches("["))167168byAttribute();169else if (this.tq.matchChomp("*"))170allElements();171else if (this.tq.matchChomp(":lt("))172indexLessThan();173else if (this.tq.matchChomp(":gt("))174indexGreaterThan();else if (this.tq.matchChomp(":eq("))175176indexEquals();else if (this.tq.matches(":has("))177178has();179else if (this.tq.matches(":contains("))180contains(false);181else if (this.tq.matches(":containsOwn("))182contains(true);else if (this.tq.matches(":matches("))183184matches(false);185else if (this.tq.matches(":matchesOwn("))matches(true);186187else if (this.tq.matches(":not("))188not();189else if (this.tq.matchChomp(":nth-child("))190cssNthChild(false, false);191else if (this.tq.matchChomp(":nth-last-child("))cssNthChild(true, false);192193else if (this.tq.matchChomp(":nth-of-type("))194cssNthChild(false, true);195else if (this.tq.matchChomp(":nth-last-of-type("))196cssNthChild(true, true);197else if (this.tq.matchChomp(":first-child"))198this.evals.add(new Evaluator.IsFirstChild());199else if (this.tq.matchChomp(":last-child"))200this.evals.add(new Evaluator.IsLastChild());else if (this.tq.matchChomp(":first-of-type"))201202this.evals.add(new Evaluator.IsFirstOfType());203else if (this.tq.matchChomp(":last-of-type"))204this.evals.add(new Evaluator.IsLastOfType());205else if (this.tq.matchChomp(":only-child"))206this.evals.add(new Evaluator.IsOnlyChild());else if (this.tq.matchChomp(":only-of-type"))207208this.evals.add(new Evaluator.IsOnlyOfType());209else if (this.tq.matchChomp(":empty"))this.evals.add(new Evaluator.IsEmpty());210211else if (this.tq.matchChomp(":root"))212this.evals.add(new Evaluator.IsRoot());213else214throw new Selector.SelectorParseException("Could not parse query '%s': unexpected 215token at '%s'", new Object[] { this.query, this.tq.remainder() });216}217218private void byId()219{220String id = this.tq.consumeCssIdentifier();221V alidate.notEmpty(id);222this.evals.add(new Evaluator.Id(id));223}224225private void byClass() {String className = this.tq.consumeCssIdentifier();226227V alidate.notEmpty(className);228this.evals.add(new Evaluator.Class(className.trim().toLowerCase()));229}230private void byTag() {231232String tagName = this.tq.consumeElementSelector();V alidate.notEmpty(tagName);233234235if (tagName.contains("|")) {236tagName = tagName.replace("|", ":");237}238this.evals.add(new Evaluator.Tag(tagName.trim().toLowerCase()));}239240241private void byAttribute() {242TokenQueue cq = new TokenQueue(this.tq.chompBalanced('[', ']'));243String key = cq.consumeToAny(AttributeEvals);244V alidate.notEmpty(key);245cq.consumeWhitespace();246247if (cq.isEmpty()) {248if (key.startsWith("^"))249this.evals.add(new Evaluator.AttributeStarting(key.substring(1)));250elsethis.evals.add(new Evaluator.Attribute(key));251252}253else if (cq.matchChomp("=")) {this.evals.add(new Evaluator.AttributeWithValue(key, cq.remainder()));254255}256else if (cq.matchChomp("!=")) {257this.evals.add(new Evaluator.AttributeWithValueNot(key, cq.remainder()));258}259else if (cq.matchChomp("^=")) {this.evals.add(new Evaluator.AttributeWithValueStarting(key, cq.remainder()));260261}262else if (cq.matchChomp("$=")) {this.evals.add(new Evaluator.AttributeWithValueEnding(key, cq.remainder()));263264}265else if (cq.matchChomp("*=")) {266this.evals.add(new Evaluator.AttributeWithValueContaining(key, cq.remainder()));267}268else if (cq.matchChomp("~="))this.evals.add(new Evaluator.AttributeWithValueMatching(key, 269270pile(cq.remainder())));271elsethrow new Selector.SelectorParseException("Could not parse attribute query '%s': 272273unexpected token at '%s'", new Object[] { this.query, cq.remainder() });274}275276private void allElements()277{this.evals.add(new Evaluator.AllElements());278279}280private void indexLessThan()281282{283this.evals.add(new Evaluator.IndexLessThan(consumeIndex()));284}285286private void indexGreaterThan() {287this.evals.add(new Evaluator.IndexGreaterThan(consumeIndex()));288}289290private void indexEquals() {291this.evals.add(new Evaluator.IndexEquals(consumeIndex()));292}293294private void cssNthChild(boolean backwards, boolean ofType)295{296String argS = this.tq.chompTo(")").trim().toLowerCase();297Matcher mAB = NTH_AB.matcher(argS);298Matcher mB = NTH_B.matcher(argS);299int b;300if ("odd".equals(argS)) {int a = 2;301302b = 1;303}304else305{306int b;if ("even".equals(argS)) {307308int a = 2;309b = 0;}310311else312{313int b;314if (mAB.matches()) {315int a = mAB.group(3) != null ? Integer.parseInt(mAB.group(1).replaceFirst("^\\+", "")) : 1;316317b = mAB.group(4) != null ? Integer.parseInt(mAB.group(4).replaceFirst("^\\+", "")) : 3180;319}320else321{322int b;323if (mB.matches()) {324int a = 0;325b = Integer.parseInt(mB.group().replaceFirst("^\\+", ""));326} else {327throw new Selector.SelectorParseException("Could not parse nth-index '%s': 328unexpected format", new Object[] { argS });}329330}331}}332333int b;334int a;if (ofType) {335336if (backwards)337this.evals.add(new Evaluator.IsNthLastOfType(a, b));338else339this.evals.add(new Evaluator.IsNthOfType(a, b));340}else if (backwards)341342this.evals.add(new Evaluator.IsNthLastChild(a, b));343else344this.evals.add(new Evaluator.IsNthChild(a, b));345}346347private int consumeIndex(){348349String indexS = this.tq.chompTo(")").trim();350V alidate.isTrue(StringUtil.isNumeric(indexS), "Index must be numeric");return Integer.parseInt(indexS);351352}353354private void has(){355356this.tq.consume(":has");357String subQuery = this.tq.chompBalanced('(', ')');V alidate.notEmpty(subQuery, ":has(el) subselect must not be empty");358359this.evals.add(new StructuralEvaluator.Has(parse(subQuery)));360}361362private void contains(boolean own)363{this.tq.consume(own ? ":containsOwn" : ":contains");364365String searchText = TokenQueue.unescape(this.tq.chompBalanced('(', ')')); 366V alidate.notEmpty(searchText, ":contains(text) query must not be empty"); 367if (own)368this.evals.add(new Evaluator.ContainsOwnText(searchText));369elsethis.evals.add(new Evaluator.ContainsText(searchText));370371}372private void matches(boolean own)373374{375this.tq.consume(own ? ":matchesOwn" : ":matches");String regex = this.tq.chompBalanced('(', ')');376377V alidate.notEmpty(regex, ":matches(regex) query must not be empty"); 378379if (own)this.evals.add(new Evaluator.MatchesOwn(pile(regex))); 380381else382this.evals.add(new Evaluator.Matches(pile(regex)));}383384385private void not()386{387this.tq.consume(":not");388String subQuery = this.tq.chompBalanced('(', ')');V alidate.notEmpty(subQuery, ":not(selector) subselect must not be empty"); 389390391this.evals.add(new StructuralEvaluator.Not(parse(subQuery)));392}393}394package org.jsoup.select;395396import org.jsoup.nodes.Element;397398abstract class StructuralEvaluator extends Evaluator{399400Evaluator evaluator;401402static class ImmediatePreviousSibling extends StructuralEvaluator 403{404public ImmediatePreviousSibling(Evaluator evaluator)405{406this.evaluator = evaluator;}407408409public boolean matches(Element root, Element element) {410if (root == element) {411return false;412}413Element prev = element.previousElementSibling();414return (prev != null) && (this.evaluator.matches(root, prev)); 415}416417public String toString()418{419return String.format(":prev%s", new Object[] { this.evaluator }); 420}421}422423static class PreviousSibling extends StructuralEvaluator424{425public PreviousSibling(Evaluator evaluator)426{427this.evaluator = evaluator;428}429430public boolean matches(Element root, Element element) {431if (root == element) {432return false;433}434Element prev = element.previousElementSibling();435436while (prev != null) {437if (this.evaluator.matches(root, prev)) {438return true;}439440prev = prev.previousElementSibling();441}return false;442443}444public String toString()445446{447return String.format(":prev*%s", new Object[] { this.evaluator }); 448}449}450static class ImmediateParent extends StructuralEvaluator451452{453public ImmediateParent(Evaluator evaluator)454{455this.evaluator = evaluator;456}457458public boolean matches(Element root, Element element) {459if (root == element) {460return false;461}462Element parent = element.parent();463return (parent != null) && (this.evaluator.matches(root, parent));464}465466public String toString()467{468return String.format(":ImmediateParent%s", new Object[] { this.evaluator }); 469}470}471static class Parent extends StructuralEvaluator472473{474public Parent(Evaluator evaluator)475{476this.evaluator = evaluator;477}478public boolean matches(Element root, Element element) {479480if (root == element) {481return false;}482483Element parent = element.parent();484while (parent != root) {if (this.evaluator.matches(root, parent))485486return true;487parent = parent.parent();488}489return false;490}491492public String toString()493{494return String.format(":parent%s", new Object[] { this.evaluator });}495496}497498static class Not extends StructuralEvaluator{499500public Not(Evaluator evaluator){501502this.evaluator = evaluator;503}504505public boolean matches(Element root, Element node) {506return !this.evaluator.matches(root, node);507}508509public String toString()510{511return String.format(":not%s", new Object[] { this.evaluator }); 512}513}514515static class Has extends StructuralEvaluator516{public Has(Evaluator evaluator)517518{519this.evaluator = evaluator;520}521public boolean matches(Element root, Element element) {522523for (Element e : element.getAllElements()) {if ((e != element) && (this.evaluator.matches(root, e)))524525return true;526}return false;527528}529530public String toString(){531532return String.format(":has(%s)", new Object[] { this.evaluator }); 533}}534535536static class Root extends Evaluator537{538public boolean matches(Element root, Element element)539{return root == element;540541}542}}543544package org.jsoup;545import java.io.IOException;546547import java.io.InputStream;548import .URL;import java.util.Warehouse;549550import java.util.Map;import org.jsoup.nodes.Document;551552import org.jsoup.parser.Parser;553public abstract interface Connection554555{556public abstract Connection url(URL paramURL);557558public abstract Connection url(String paramString);559public abstract Connection userAgent(String paramString);560561562public abstract Connection timeout(int paramInt);563564public abstract Connection maxBodySize(int paramInt);565public abstract Connection referrer(String paramString);566567568public abstract Connection followRedirects(boolean paramBoolean);569570public abstract Connection method(Method paramMethod);571572public abstract Connection ignoreHttpErrors(boolean paramBoolean);573574public abstract Connection ignoreContentType(boolean paramBoolean);575public abstract Connection validateTLSCertificates(boolean paramBoolean);576577578public abstract Connection data(String paramString1, String paramString2);579580public abstract Connection data(String paramString1, String paramString2, InputStream 581paramInputStream);582583public abstract Connection data(Warehouse<KeyVal> paramWarehouse);584585public abstract Connection data(Map<String, String> paramMap);586587public abstract Connection data(String[] paramArrayOfString);588public abstract Connection header(String paramString1, String paramString2);589590591public abstract Connection cookie(String paramString1, String paramString2);592593public abstract Connection cookies(Map<String, String> paramMap);594595public abstract Connection parser(Parser paramParser);596597public abstract Connection postDataCharset(String paramString);598public abstract Document get()599600throws IOException;601602public abstract Document post()603throws IOException;604605public abstract Response execute()606throws IOException;607608public abstract Request request();609610public abstract Connection request(Request paramRequest);611612public abstract Response response();613public abstract Connection response(Response paramResponse);614615616public static abstract interface KeyVal617{618public abstract KeyVal key(String paramString);619public abstract String key();620621622public abstract KeyVal value(String paramString);623624public abstract String value();625626public abstract KeyVal inputStream(InputStream paramInputStream);627628public abstract InputStream inputStream();629public abstract boolean hasInputStream();630631}632public static abstract interface Response extends Connection.Base<Response> 633634{635public abstract int statusCode();636637public abstract String statusMessage();638public abstract String charset();639640641public abstract String contentType();642643public abstract Document parse()644throws IOException;645646public abstract String body();647public abstract byte[] bodyAsBytes();648649}650651public static abstract interface Request extends Connection.Base<Request> 652{653public abstract int timeout();654655public abstract Request timeout(int paramInt);656657public abstract int maxBodySize();658659public abstract Request maxBodySize(int paramInt);660661public abstract boolean followRedirects();662public abstract Request followRedirects(boolean paramBoolean);663664665public abstract boolean ignoreHttpErrors();666667public abstract Request ignoreHttpErrors(boolean paramBoolean);668public abstract boolean ignoreContentType();669670671public abstract Request ignoreContentType(boolean paramBoolean); 672673public abstract boolean validateTLSCertificates();674675public abstract void validateTLSCertificates(boolean paramBoolean); 676677public abstract Request data(Connection.KeyVal paramKeyVal);678679public abstract Warehouse<Connection.KeyVal> data();680681public abstract Request parser(Parser paramParser);682683public abstract Parser parser();684685public abstract Request postDataCharset(String paramString);686687public abstract String postDataCharset();688}689690public static abstract interface Base<T extends Base>691{public abstract URL url();692693694public abstract T url(URL paramURL);695696public abstract Connection.Method method();697698public abstract T method(Connection.Method paramMethod);699700public abstract String header(String paramString);701702public abstract T header(String paramString1, String paramString2);703704public abstract boolean hasHeader(String paramString);705706public abstract boolean hasHeaderWithValue(String paramString1, String paramString2); 707public abstract T removeHeader(String paramString);708709710public abstract Map<String, String> headers();711712public abstract String cookie(String paramString);713714public abstract T cookie(String paramString1, String paramString2);715716public abstract boolean hasCookie(String paramString);717718public abstract T removeCookie(String paramString);719720public abstract Map<String, String> cookies();721}722723public static enum Method724{GET(false), POST(true), PUT(true), DELETE(false), PA TCH(true);725726727private final boolean hasBody;728729private Method(boolean hasBody) {730this.hasBody = hasBody;}731732733public final boolean hasBody()734{735return this.hasBody;736}737}738}739740741if (context != null) {742if (context.ownerDocument() != null) {743this.doc.quirksMode(context.ownerDocument().quirksMode());744}745746String contextTag = context.tagName();747if (StringUtil.in(contextTag, new String[] { "title", "textarea" }))748this.tokeniser.transition(TokeniserState.Rcdata);749else if (StringUtil.in(contextTag, new String[] { "iframe", "noembed", "noframes", "style", 750"xmp" }))this.tokeniser.transition(TokeniserState.Rawtext); 751752else if (contextTag.equals("script"))753this.tokeniser.transition(TokeniserState.ScriptData);else if (contextTag.equals("noscript"))754755this.tokeniser.transition(TokeniserState.Data);756else if (contextTag.equals("plaintext"))757this.tokeniser.transition(TokeniserState.Data);758else {759this.tokeniser.transition(TokeniserState.Data);}760761root = new Element(Tag.valueOf("html"), baseUri); 762this.doc.appendChild(root);this.stack.add(root);763764resetInsertionMode();765Elements contextChain = context.parents();766767contextChain.add(0, context);768for (Element parent : contextChain) {769if ((parent instanceof FormElement)) {770this.formElement = ((FormElement)parent);771break;}772773}774}775776runParser();777if ((context != null) && (root != null)) {return root.Administration();778779}780return this.doc.Administration();781}782protected boolean process(Token token)783784{this.currentToken = token;785786return this.state.process(token, this);787}788789boolean process(Token token, HtmlTreeBuilderState state) { 790this.currentToken = token;791return state.process(token, this);792}793794void transition(HtmlTreeBuilderState state) {795this.state = state;796}797HtmlTreeBuilderState state() {798799return this.state;800}。

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

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

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

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

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

如果需要从COM 访问此程序集中的类型,// 则将该类型上的ComVisible 属性设置为true。

[assembly: ComVisible(false)]// 如果此项目向COM 公开,则下列GUID 用于类型库的ID[assembly: Guid("063bd674-c4cc-4dc9-81ee-3791409e9189")]// 程序集的版本信息由下面个值组成:// 主版本// 次版本// 内部版本号// 修订号//[assembly: AssemblyVersion("1.0.0.0")][assembly: AssemblyFileVersion("1.0.0.0")]数据库连接类(DataCon.cs):using System;using System.Collections.Generic;using System.Text;using System.Data;using System.Data.SqlClient;namespace warehouse.BaseClass{class DataCon{#region 建立数据库连接/// <summary>/// 建立数据库连接./// </summary>/// <returns>返回SqlConnection对象</returns>public SqlConnection getcon(){string M_str_sqlcon = "Data Source=(local);Database=db_warehouse;user id=sa;pwd= ";SqlConnection myCon = new SqlConnection(M_str_sqlcon);return myCon;}#endregion#region 执行SqlCommand命令/// <summary>/// 执行SqlCommand/// </summary>/// <param name="M_str_sqlstr">SQL语句</param>public void getcom(string M_str_sqlstr){SqlConnection sqlcon = this.getcon();sqlcon.Open();SqlCommand sqlcom = new SqlCommand(M_str_sqlstr,sqlcon);sqlcom.ExecuteNonQuery();//返回受影响的行数sqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}#endregion#region 创建DataSet对象读取数据/// <summary>/// 创建一个DataSet对象/// </summary>/// <param name="M_str_sqlstr">SQL语句</param>/// <param name="M_str_table">表名</param>/// <returns>返回DataSet对象</returns>public DataSet getds(string M_str_sqlstr, string M_str_table){SqlConnection sqlcon = this.getcon();sqlcon.Open();SqlDataAdapter sqlda = new SqlDataAdapter(M_str_sqlstr, sqlcon);DataSet myds = new DataSet();sqlda.Fill(myds, M_str_table);return myds;}#endregion#region 创建SqlDataReader对象读取数据/// <summary>/// 创建一个SqlDataReader对象/// </summary>/// <param name="M_str_sqlstr">SQL语句</param>/// <returns>返回SqlDataReader对象</returns>public SqlDataReader getread(string M_str_sqlstr){SqlConnection sqlcon = this.getcon();SqlCommand sqlcom = new SqlCommand(M_str_sqlstr, sqlcon);sqlcon.Open();SqlDataReader sqlread =sqlcom.ExecuteReader(CommandBehavior.CloseConnection);//方法的参数表示如果关闭关联的对象sqlread则关联的连接sqlcon也关闭了return sqlread;}#endregion}}数据库操作类(DataOperate.cs):using System;using System.Collections.Generic;//命名空间包含定义泛型集合的接口和类,泛型集合允许用户创建强类型集合,它能提供比非泛型强类型集合21的类型安全性和性能using System.Text;//System.Text 命名空间包含表示ASCII、Unicode、UTF-7 和UTF-8 字符编码的类;用于将字符块转换为字节块和将字节块转换为字符块的抽象基类;以及操作和格式化String 对象而不创建String 的中间实例的Helper 类.using System.Windows.Forms;using System.Data;using System.Data.SqlClient;using System.Collections;//using System.Drawing;//命名空间提供了对GDI+ 基本图形功能的访问.using System.IO;//提供用于创建、复制、删除、移动和打开文件的静态方法,并协助创建FileStream 对象using pression;//里面包括两个类GzipStream和DeflaterStream,它们都可以用于解压缩,但是不支持ZIP、RAR等常用的压缩文件,using System.Drawing.Text;//using System.Drawing.Drawing2D;//命名空间提供高级的二维和矢量图形功能.using System.Drawing.Imaging;//为源自Bitmap 和Metafile 的类提供功能的抽象基类。

using System.Text.RegularExpressions;//命名空间包含一些类,这些类提供对.NET Framework 正则表达式引擎的访问。

该命名空间提供正则表达式功能namespace warehouse.BaseClass{class DataOperate{DataCon datacon = new DataCon();//声明DataCon类的一个对象,以调用其方法#region 绑定ComboBox控件/// <summary>/// 对ComboBox控件进行数据绑定/// </summary>/// <param name="M_str_sqlstr">SQL语句</param>/// <param name="M_str_table">表名</param>/// <param name="M_str_tbMember">数据表中字段名</param>/// <param name="cbox">ComboBox控件ID</param>public void cboxBind(string M_str_sqlstr, string M_str_table, stringM_str_tbMember, ComboBox cbox){DataSet myds = datacon.getds(M_str_sqlstr, M_str_table);cbox.DataSource = myds.Tables[M_str_table];cbox.DisplayMember = M_str_tbMember;//显示username字段}#endregion#region 验证文本框输入为数字/// <summary>/// 验证文本框输入为数字/// </summary>/// <param name="M_str_num">输入字符</param>/// <returns>返回一个bool类型的值</returns>public bool validateNum(string M_str_num){return Regex.IsMatch(M_str_num, "^[0-9]*$");}#endregion#region 验证文本框输入为电话号码/// <summary>/// 验证文本框输入为电话号码/// </summary>/// <param name="M_str_phone">输入字符串</param>/// <returns>返回一个bool类型的值</returns>public bool validatePhone(string M_str_phone){return Regex.IsMatch(M_str_phone, @"\d{3,4}-\d{7,8}");}#endregion#region 验证文本框输入为传真号码/// <summary>/// 验证文本框输入为传真号码/// </summary>/// <param name="M_str_fax">输入字符串</param>/// <returns>返回一个bool类型的值</returns>public bool validateFax(string M_str_fax){return Regex.IsMatch(M_str_fax, @"86-\d{2,3}-\d{7,8}");}#endregion#region 用户登录/// <summary>/// 用户登录/// </summary>/// <param name="P_str_UserName">用户名</param>/// <param name="P_str_UserPwd">用户密码</param>/// <returns>返回一个int类型的值</returns>public int UserLogin(string P_str_UserName, string P_str_UserPwd){SqlConnection sqlcon = datacon.getcon();SqlCommand sqlcom = new SqlCommand("proc_Login", sqlcon);mandType = CommandType.StoredProcedure;sqlcom.Parameters.Add("@UserName", SqlDbType.VarChar, 20).Value = P_str_UserName;sqlcom.Parameters.Add("@UserPwd", SqlDbType.VarChar, 20).Value = P_str_UserPwd;SqlParameter returnValue = sqlcom.Parameters.Add("returnValue", SqlDbType.Int, 4);returnValue.Direction = ParameterDirection.ReturnValue;//返回值??sqlcon.Open();try{sqlcom.ExecuteNonQuery();}catch (Exception ex){MessageBox.Show(ex.Message);}finally{sqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}int P_int_returnValue = (int)returnValue.V alue;return P_int_returnValue;}#endregion#region 货物入库/// <summary>/// 货物入库/// </summary>/// <param name="P_int_GoodsID">货物编号</param>/// <param name="P_str_GoodsName">货物名称</param>/// <param name="P_str_PrName">供应商名称</param>/// <param name="P_str_StoreName">仓库名称</param>/// <param name="P_str_GoodsSpec">货物规格</param>/// <param name="P_str_GoodsUnit">计量单位</param>/// <param name="P_int_GoodsNum">进货数量</param>/// <param name="P_dml_GoodsPrice">货物单价</param>/// <param name="P_str_HPeople">经手</param>/// <param name="P_str_Remark">备注</param>/// <returns>返回一个int类型的值</returns>public int InsertGoods(int P_int_GoodsID,string P_str_GoodsName,string P_str_PrName,string P_str_StoreName,string P_str_GoodsSpec,string P_str_GoodsUnit,intP_int_GoodsNum,decimal P_dml_GoodsPrice,string P_str_HPeople,string P_str_Remark) {SqlConnection sqlcon = datacon.getcon();SqlCommand sqlcom = new SqlCommand("proc_insertInStore", sqlcon);mandType = CommandType.StoredProcedure;sqlcom.Parameters.Add("@GoodsID", SqlDbType.BigInt).Value =P_int_GoodsID;sqlcom.Parameters.Add("@GoodsName", SqlDbType.VarChar, 50).Value = P_str_GoodsName;sqlcom.Parameters.Add("@PrName", SqlDbType.VarChar, 100).Value =P_str_PrName;sqlcom.Parameters.Add("@StoreName", SqlDbType.VarChar, 100).Value = P_str_StoreName;sqlcom.Parameters.Add("@GoodsSpec", SqlDbType.VarChar, 50).Value = P_str_GoodsSpec;sqlcom.Parameters.Add("@GoodsUnit", SqlDbType.Char, 8).Value =P_str_GoodsUnit;sqlcom.Parameters.Add("@GoodsNum", SqlDbType.BigInt).Value =P_int_GoodsNum;sqlcom.Parameters.Add("@GoodsPrice", SqlDbType.Money).Value =P_dml_GoodsPrice;sqlcom.Parameters.Add("@HandlePeople", SqlDbType.VarChar, 20).Value = P_str_HPeople;sqlcom.Parameters.Add("@ISRemark", SqlDbType.VarChar, 1000).Value = P_str_Remark;SqlParameter returnValue = sqlcom.Parameters.Add("returnValue", SqlDbType.Int, 4);returnValue.Direction = ParameterDirection.ReturnValue;sqlcon.Open();try{sqlcom.ExecuteNonQuery();}catch (Exception ex){MessageBox.Show(ex.Message);}finally{sqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}int P_int_returnValue = (int)returnValue.V alue;return P_int_returnValue;}#endregion#region 添加供应商信息/// <summary>/// 添加供应商信息/// </summary>/// <param name="P_str_PrName">供应商名称</param>/// <param name="P_str_PrPeople">负责</param>/// <param name="P_str_PrPhone">供应商联系电话</param>/// <param name="P_str_PrFax">供应商传真号码</param>/// <param name="P_int_PrRemark">备注</param>/// <returns>返回一个int类型的值</returns>public int InsertProvider(string P_str_PrName, string P_str_PrPeople, stringP_str_PrPhone, string P_str_PrFax, string P_int_PrRemark){SqlConnection sqlcon = datacon.getcon();SqlCommand sqlcom = new SqlCommand("proc_insertProvider", sqlcon);mandType = CommandType.StoredProcedure;sqlcom.Parameters.Add("@PrName", SqlDbType.VarChar, 100).Value =P_str_PrName;sqlcom.Parameters.Add("@PrPeople", SqlDbType.VarChar, 20).Value =P_str_PrPeople;sqlcom.Parameters.Add("@PrPhone", SqlDbType.VarChar, 20).Value =P_str_PrPhone;sqlcom.Parameters.Add("@PrFax", SqlDbType.VarChar, 20).Value =P_str_PrFax;sqlcom.Parameters.Add("@PrRemark", SqlDbType.VarChar, 1000).Value = P_int_PrRemark;SqlParameter returnValue = sqlcom.Parameters.Add("returnValue", SqlDbType.Int, 4);returnValue.Direction = ParameterDirection.ReturnValue;sqlcon.Open();try{sqlcom.ExecuteNonQuery();}catch (Exception ex){MessageBox.Show(ex.Message);}finally{sqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}int P_int_returnValue = (int)returnValue.V alue;return P_int_returnValue;}#endregion#region 添加仓库信息/// <summary>/// 添加仓库信息/// </summary>/// <param name="P_str_StoreName">仓库名称</param>/// <param name="P_str_StorePeople">仓库负责</param>/// <param name="P_str_StorePhone">仓库电话</param>/// <param name="P_str_StoreUnit">仓库所属单位</param>/// <param name="P_int_StoreRemark">备注</param>/// <returns>返回一个int类型的值</returns>public int InsertStorage(string P_str_StoreName, string P_str_StorePeople, string P_str_StorePhone, string P_str_StoreUnit, string P_int_StoreRemark){SqlConnection sqlcon = datacon.getcon();SqlCommand sqlcom = new SqlCommand("proc_insertStorage", sqlcon);mandType = CommandType.StoredProcedure;sqlcom.Parameters.Add("@StoreName", SqlDbType.VarChar, 100).Value = P_str_StoreName;sqlcom.Parameters.Add("@StorePeople", SqlDbType.VarChar, 20).Value = P_str_StorePeople;sqlcom.Parameters.Add("@StorePhone", SqlDbType.VarChar, 20).Value = P_str_StorePhone;sqlcom.Parameters.Add("@StoreUnit", SqlDbType.VarChar, 100).Value = P_str_StoreUnit;sqlcom.Parameters.Add("@StoreRemark", SqlDbType.VarChar, 1000).Value = P_int_StoreRemark;SqlParameter returnValue = sqlcom.Parameters.Add("returnValue", SqlDbType.Int, 4);returnValue.Direction = ParameterDirection.ReturnValue;sqlcon.Open();try{sqlcom.ExecuteNonQuery();}catch (Exception ex){MessageBox.Show(ex.Message);}finally{sqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}int P_int_returnValue = (int)returnValue.V alue;return P_int_returnValue;}#endregion#region 添加新用户/// <summary>/// 添加新用户/// </summary>/// <param name="P_str_UserName">用户名</param>/// <param name="P_str_UserPwd">用户密码</param>/// <param name="P_str_UserRight">用户权限</param>/// <returns>返回一个int类型的值</returns>public int InsertUser(string P_str_UserName, string P_str_UserPwd, stringP_str_UserRight){SqlConnection sqlcon = datacon.getcon();SqlCommand sqlcom = new SqlCommand("proc_insertUser",sqlcon);mandType = CommandType.StoredProcedure;sqlcom.Parameters.Add("@UserName", SqlDbType.VarChar, 20).Value = P_str_UserName;sqlcom.Parameters.Add("@UserPwd", SqlDbType.VarChar, 20).Value = P_str_UserPwd;sqlcom.Parameters.Add("@UserRight", SqlDbType.Char, 10).Value =P_str_UserRight;SqlParameter returnValue = sqlcom.Parameters.Add("returnValue", SqlDbType.Int, 4);returnValue.Direction = ParameterDirection.ReturnValue;sqlcon.Open();try{sqlcom.ExecuteNonQuery();}catch (Exception ex){MessageBox.Show(ex.Message);}finally{sqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}int P_int_returnValue = (int)returnValue.V alue;return P_int_returnValue;}#endregion#region 修改用户信息/// <summary>/// 修改用户信息/// </summary>/// <param name="P_int_UID">用户编号</param>/// <param name="P_str_UserPwd">用户密码</param>/// <param name="P_str_UserRight">用户权限</param>/// <returns>返回一个int类型的值</returns>public void updateUser(int P_int_UID,string P_str_UserPwd, stringP_str_UserRight){SqlConnection sqlcon = datacon.getcon();SqlCommand sqlcom = new SqlCommand("proc_updateUser", sqlcon);mandType = CommandType.StoredProcedure;sqlcom.Parameters.Add("@UserID", SqlDbType.BigInt).Value = P_int_UID;sqlcom.Parameters.Add("@UserPwd", SqlDbType.VarChar, 20).Value =P_str_UserPwd;sqlcom.Parameters.Add("@UserRight", SqlDbType.Char, 10).Value =P_str_UserRight;sqlcon.Open();try{sqlcom.ExecuteNonQuery();}catch (Exception ex){MessageBox.Show(ex.Message);}finally{sqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}}#endregion}}登陆界面(frmLogin.cs)using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace warehouse{public partial class frmLogin : Form{public static string M_str_name;//记录登录用户名字public static string M_str_pwd;//记录登录用户密码public static string M_str_right;//记录登录用户的权限BaseClass.DataCon datacon = new warehouse.BaseClass.DataCon();BaseClass.DataOperate doperate = new warehouse.BaseClass.DataOperate();public frmLogin(){InitializeComponent();}private void frmLogin_Load(object sender, EventArgs e)//窗口打开就加载的信息{doperate.cboxBind("select UserName from tb_User", "tb_User", "UserName", cboxUName);doperate.tewupwd("select UserPwd from tb_User where UserName='" + cboxUName.Text + "'", txtPwd);}private void btnLogin_Click(object sender, EventArgs e){int P_int_returnValue = erLogin(cboxUName.Text.Trim(), txtPwd.Text.Trim());if (P_int_returnValue == 100){M_str_name = cboxUName.Text.Trim();M_str_pwd = txtPwd.Text.Trim();frmMain fmain = new frmMain();this.Hide();//this就是frmloginfmainfmain.Show();}if (P_int_returnValue == -100){MessageBox.Show("用户名或密码错误!", "提示", MessageBoxButtons.OK, rmation);txtPwd.Text = "";cboxUName.Focus();}}private void btnExit_Click(object sender, EventArgs e){Application.Exit();}private void cboxUName_SelectedIndexChanged(object sender, EventArgs e){SqlDataReader sqlread = datacon.getread("select UserName,UserRight from tb_User where UserName='" + cboxUName.Text + "'");if (sqlread.Read()){labURight.Text = sqlread["UserRight"].ToString();M_str_right = labURight.Text;doperate.tewupwd("select UserPwd from tb_User where UserName='" + cboxUName.Text + "'", txtPwd);}sqlread.Close();}private void frmLogin_FormClosing(object sender, FormClosingEventArgs e){Application.Exit();}}}系统主界面(frmMain.cs)using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Diagnostics;namespace warehouse{public partial class frmMain : Form{public frmMain(){InitializeComponent();}private void frmMain_Load(object sender, EventArgs e){tsslUser.Text = "操作用户权限:" + frmLogin.M_str_right.ToString().Trim();tsslDate.Text = DateTime.Today.ToLongDateString();tsslTime.Text = "登录系统时间:" + DateTime.Now.ToShortTimeString();if (frmLogin.M_str_right.ToString().Trim() == "普通用户"){入库管理ToolStripMenuItem.Enabled = false;出库管理ToolStripMenuItem.Enabled = false;借货还货ToolStripMenuItem.Enabled = false;供货商设置ToolStripMenuItem.Enabled = false;货物档案设置ToolStripMenuItem.Enabled = false;仓库设置ToolStripMenuItem.Enabled = false;权限设置ToolStripMenuItem.Enabled = false;用户管理ToolStripMenuItem.Enabled = false;btnIS.Enabled = false;btnOS.Enabled = false;btnBR.Enabled = false;btnPI.Enabled = false;btnGI.Enabled = false;btnSI.Enabled = false;btnRI.Enabled = false;btnUM.Enabled = false;}}private void btnIS_Click(object sender, EventArgs e)//入库管理{GoodsManage.frmISManage GMfism = newwarehouse.GoodsManage.frmISManage();//GMfism.Show();GMfism.ShowDialog();//这两个函数就看谁获得焦点,前者父窗口也可获得焦点,后者只有新创建的窗体}private void btnOS_Click(object sender, EventArgs e)//出库管理{GoodsManage.frmOSManage GMfosm = newwarehouse.GoodsManage.frmOSManage();GMfosm.ShowDialog();}private void btnBR_Click(object sender, EventArgs e)//借货还货管理{GoodsManage.frmBGManage GMfbgm = newwarehouse.GoodsManage.frmBGManage();GMfbgm.ShowDialog();}private void btnPI_Click(object sender, EventArgs e)//供应商设置{BasicInfo.frmPrInfo BIfpi = new warehouse.BasicInfo.frmPrInfo();BIfpi.ShowDialog();}private void btnGI_Click(object sender, EventArgs e)//货物档案设置{BasicInfo.frmGoodsInfo BIfgi = new warehouse.BasicInfo.frmGoodsInfo();BIfgi.ShowDialog();}private void btnSI_Click(object sender, EventArgs e)//仓库设置{BasicInfo.frmStoreInfo BIfsi = new warehouse.BasicInfo.frmStoreInfo();BIfsi.ShowDialog();}private void btnISL_Click(object sender, EventArgs e)//入库查询{LookandSum.frmISLook LSfisl = new warehouse.LookandSum.frmISLook();LSfisl.ShowDialog();}private void btnSL_Click(object sender, EventArgs e)//库存查询{LookandSum.frmGILook LSfgil = new warehouse.LookandSum.frmGILook();LSfgil.ShowDialog();}private void btnGOL_Click(object sender, EventArgs e)//货物借出查询{LookandSum.frmBGLook LSfbgl = new warehouse.LookandSum.frmBGLook();LSfbgl.ShowDialog();}private void btnGIL_Click(object sender, EventArgs e)//货物归还查询{LookandSum.frmRGLook LSfrgl = new warehouse.LookandSum.frmRGLook();LSfrgl.ShowDialog();}private void btnOSL_Click(object sender, EventArgs e)//出库查询{LookandSum.frmOSLook LSfosl = new warehouse.LookandSum.frmOSLook();LSfosl.ShowDialog();}private void btnEP_Click(object sender, EventArgs e)//更改密码{SystemSet.frmEditPwd HPfep = new warehouse.SystemSet.frmEditPwd();HPfep.ShowDialog();}private void btnRI_Click(object sender, EventArgs e)//权限管理{SystemSet.frmRightManage HPfrm = new warehouse.SystemSet.frmRightManage();HPfrm.ShowDialog();}private void btnUM_Click(object sender, EventArgs e)//用户管理{SystemSet.frmUserManage HPfum = newwarehouse.SystemSet.frmUserManage();HPfum.ShowDialog();}private void btnAU_Click(object sender, EventArgs e)//关于本系统{SystemSet.frmAboutUs HPfau = new warehouse.SystemSet.frmAboutUs();HPfau.ShowDialog();}private void btnCH_Click(object sender, EventArgs e){if (MessageBox.Show("你真的要注销当前用户", "提示", MessageBoxButtons.OKCancel, rmation) == DialogResult.OK) {warehouse.frmLogin frmlogin = new frmLogin();this.Hide();frmlogin.Show();}}private void btnExit_Click(object sender, EventArgs e)//退出系统{this.Close();//<=>Application.Exit();}private void frmMain_FormClosed(object sender, FormClosedEventArgs e){if (MessageBox.Show("您真的要退出本系统吗?", "提示", MessageBoxButtons.OKCancel, rmation) == DialogResult.OK) {Application.Exit();}else{frmMain fmain = new frmMain();fmain.Show();}}private void 入库管理ToolStripMenuItem_Click(object sender, EventArgs e){btnIS_Click(sender, e);}private void 出库管理ToolStripMenuItem_Click(object sender, EventArgs e){btnOS_Click(sender,e);}private void 借货还货ToolStripMenuItem_Click(object sender, EventArgs e) {btnBR_Click(sender, e);}private void 供货商设置ToolStripMenuItem_Click(object sender, EventArgs e) {btnPI_Click(sender, e);}private void 货物档案设置ToolStripMenuItem_Click(object sender, EventArgs e) {btnGI_Click(sender, e);}private void 仓库设置ToolStripMenuItem_Click(object sender, EventArgs e) {btnSI_Click(sender, e);}private void 库存查询ToolStripMenuItem_Click(object sender, EventArgs e) {btnSL_Click(sender, e);}private void 入库查询ToolStripMenuItem_Click(object sender, EventArgs e) {btnISL_Click(sender, e);}private void 出库查询ToolStripMenuItem_Click(object sender, EventArgs e) {btnOSL_Click(sender, e);}private void 货物借出查询ToolStripMenuItem_Click(object sender, EventArgs e) {btnGOL_Click(sender, e);}private void 货物归还查询ToolStripMenuItem_Click(object sender, EventArgs e) {btnGIL_Click(sender, e);}private void 更改密码ToolStripMenuItem_Click(object sender, EventArgs e) {btnEP_Click(sender, e);}private void 权限设置ToolStripMenuItem_Click(object sender, EventArgs e){btnRI_Click(sender, e);}private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e){btnUM_Click(sender, e);}private void 关于本系统ToolStripMenuItem_Click(object sender, EventArgs e){btnAU_Click(sender, e);}private void 货物管理ToolStripMenuItem_Click(object sender, EventArgs e){tabControl1.SelectedIndex = 0;}private void 基本档案ToolStripMenuItem_Click(object sender, EventArgs e){tabControl1.SelectedIndex = 1;}private void 查询统计ToolStripMenuItem_Click(object sender, EventArgs e){tabControl1.SelectedIndex = 2;}private void 系统设置ToolStripMenuItem_Click(object sender, EventArgs e) {tabControl1.SelectedIndex = 3;}private void 注销ToolStripMenuItem_Click(object sender, EventArgs e){btnCH_Click(sender, e);}private void 退出系统ToolStripMenuItem_Click(object sender, EventArgs e){btnExit_Click(sender, e);}private void toolStripStatusLabel6_Click(object sender, EventArgs e){}}}货物档案管理(入库 frmInManage.cs)using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace warehouse.GoodsManage{public partial class frmISManage : Form{warehouse.BaseClass.DataCon datacon = new warehouse.BaseClass.DataCon();warehouse.BaseClass.DataOperate doperate = new warehouse.BaseClass.DataOperate();public frmISManage(){InitializeComponent();}private void frmISManage_Load(object sender, EventArgs e){dgvISManage.Controls.Add(hScrollBar1);//数据源控件中添加了一个水平滚动条doperate.cboxBind("select StoreName from tb_Storage", "tb_Storage", "StoreName", cboxSName);//仓库名字显示出来doperate.cboxBind("select PrName from tb_Provider", "tb_Provider", "PrName", cboxPName);//计量单位显示出来DataSet myds = datacon.getds("select ISID as 入库编号,GoodsID as 货物编号,GoodsName as 货物名称,PrName as 供应商名称,"+ "StoreName as 仓库名称,GoodsSpec as 货物规格,GoodsUnit as 计量单位,GoodsNum as 入库数量,"+ "GoodsPrice as 货物单价,GoodsAPrice as 总金额,ISDate as 入库日期,HandlePeople as 经手,"+ "ISRemark as 备注from tb_InStore", "tb_InStore");dgvISManage.DataSource = myds.Tables[0];//dataset中的第一个datatable0<=>"tb_InStore"}private void btnAdd_Click(object sender, EventArgs e){if (txtISGID.Text == ""){MessageBox.Show("货物编号不能为空!", "信息", MessageBoxButtons.OK, rmation);}if (txtISGName.Text == ""){MessageBox.Show("货物名称不能为空", "信息", MessageBoxButtons.OK, rmation);}if (txtGIPrice.Text == ""){MessageBox.Show("货物单价不能为空!", "信息", MessageBoxButtons.OK, rmation);}if (txtISGNum.Text == ""){MessageBox.Show("入库数量不能为空", "信息", MessageBoxButtons.OK, rmation);}if (txtGSpec.Text == ""){MessageBox.Show("货物规格不能为空", "信息", MessageBoxButtons.OK, rmation);}if (txtHPeople.Text == ""){MessageBox.Show("经手不能为空", "信息", MessageBoxButtons.OK, rmation);}else{int P_int_returnValue =doperate.InsertGoods(Convert.ToInt32(txtISGID.Text.Trim()), txtISGName.Text.Trim(),cboxPName.Text.Trim(), cboxSName.Text.Trim(),txtGSpec.Text.Trim(), cboxGUnit.Text.Trim(),Convert.ToInt32(txtISGNum.Text.Trim()),Convert.ToDecimal(txtGIPrice.Text.Trim()), txtHPeople.Text.Trim(), txtISRemark.Text.Trim());if (P_int_returnValue == 100){MessageBox.Show("该货物号已经被占用!", "信息", MessageBoxButtons.OK, rmation);}else if (P_int_returnValue == 200){MessageBox.Show("这类货物已经存在惟一编号!", "信息", MessageBoxButtons.OK, rmation);}else{MessageBox.Show("货物入库成功!", "信息", MessageBoxButtons.OK, rmation);frmISManage_Load(sender, e);}}}private void btnDel_Click(object sender, EventArgs e){// try// {//删除下面数据源控件中的,指示的数据项datacon.getcom("delete from tb_InStore where ISID="+ Convert.ToString(dgvISManage[0,dgvISManage.CurrentCell.RowIndex].Value).Trim() + "");//Convert.ToString(dataGridView1[1,dataGridView1.CurrentCell.RowIndex].Value).Trim();// 来取得所选中的那行数据某列的值...。

相关文档
最新文档