仓库管理系统代码大全

合集下载

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 补充。

仓库管理系统(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 补充。

  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 = "DataSource=(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, string M_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.Value;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,stringP_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,stringP_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.Value;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, string P_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.Value;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, stringP_str_StorePeople, string P_str_StorePhone, string P_str_StoreUnit, stringP_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.Value;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, string P_str_UserRight){SqlConnection sqlcon = datacon.getcon();SqlCommand sqlcom = newSqlCommand("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);}finallysqlcom.Dispose();sqlcon.Close();sqlcon.Dispose();}int P_int_returnValue = (int)returnValue.Value;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, string P_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 = newwarehouse.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 = newwarehouse.BasicInfo.frmGoodsInfo();BIfgi.ShowDialog();}private void btnSI_Click(object sender, EventArgs e)//仓库设置{BasicInfo.frmStoreInfo BIfsi = newwarehouse.BasicInfo.frmStoreInfo();BIfsi.ShowDialog();}private void btnISL_Click(object sender, EventArgs e)//入库查询{LookandSum.frmISLook LSfisl = newwarehouse.LookandSum.frmISLook();LSfisl.ShowDialog();}private void btnSL_Click(object sender, EventArgs e)//库存查询{LookandSum.frmGILook LSfgil = newwarehouse.LookandSum.frmGILook();LSfgil.ShowDialog();}private void btnGOL_Click(object sender, EventArgs e)//货物借出查询{LookandSum.frmBGLook LSfbgl = newwarehouse.LookandSum.frmBGLook();LSfbgl.ShowDialog();}private void btnGIL_Click(object sender, EventArgs e)//货物归还查询{LookandSum.frmRGLook LSfrgl = newwarehouse.LookandSum.frmRGLook();LSfrgl.ShowDialog();}private void btnOSL_Click(object sender, EventArgs e)//出库查询{LookandSum.frmOSLook LSfosl = newwarehouse.LookandSum.frmOSLook();LSfosl.ShowDialog();}private void btnEP_Click(object sender, EventArgs e)//更改密码{SystemSet.frmEditPwd HPfep = newwarehouse.SystemSet.frmEditPwd();HPfep.ShowDialog();}private void btnRI_Click(object sender, EventArgs e)//权限管理{SystemSet.frmRightManage HPfrm = newwarehouse.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 = newwarehouse.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 = newwarehouse.BaseClass.DataCon();warehouse.BaseClass.DataOperate doperate = newwarehouse.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中的第一个datatable 0<=>"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。

相关文档
最新文档