📄 stockmod.vb
字号:
Public Class StockMod
Inherits System.Windows.Forms.Form
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents txtGoodsName As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents datetime1 As System.Windows.Forms.DateTimePicker
Friend WithEvents cmdOK As System.Windows.Forms.Button
Friend WithEvents cmdCancel As System.Windows.Forms.Button
Friend WithEvents txtCount As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.txtGoodsName = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.txtCount = New System.Windows.Forms.TextBox
Me.cmdOK = New System.Windows.Forms.Button
Me.cmdCancel = New System.Windows.Forms.Button
Me.Label3 = New System.Windows.Forms.Label
Me.datetime1 = New System.Windows.Forms.DateTimePicker
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(48, 56)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(56, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "货品名:"
'
'txtGoodsName
'
Me.txtGoodsName.Enabled = False
Me.txtGoodsName.Location = New System.Drawing.Point(128, 56)
Me.txtGoodsName.Name = "txtGoodsName"
Me.txtGoodsName.Size = New System.Drawing.Size(112, 21)
Me.txtGoodsName.TabIndex = 1
Me.txtGoodsName.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(48, 104)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(48, 16)
Me.Label2.TabIndex = 2
Me.Label2.Text = "数量:"
'
'txtCount
'
Me.txtCount.Location = New System.Drawing.Point(128, 96)
Me.txtCount.Name = "txtCount"
Me.txtCount.Size = New System.Drawing.Size(112, 21)
Me.txtCount.TabIndex = 4
Me.txtCount.Text = ""
'
'cmdOK
'
Me.cmdOK.Location = New System.Drawing.Point(40, 192)
Me.cmdOK.Name = "cmdOK"
Me.cmdOK.TabIndex = 6
Me.cmdOK.Text = "确 定"
'
'cmdCancel
'
Me.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.cmdCancel.Location = New System.Drawing.Point(168, 192)
Me.cmdCancel.Name = "cmdCancel"
Me.cmdCancel.TabIndex = 7
Me.cmdCancel.Text = "取 消"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(48, 152)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(72, 16)
Me.Label3.TabIndex = 3
Me.Label3.Text = "更新日期:"
'
'datetime1
'
Me.datetime1.Location = New System.Drawing.Point(128, 144)
Me.datetime1.Name = "datetime1"
Me.datetime1.Size = New System.Drawing.Size(112, 21)
Me.datetime1.TabIndex = 8
'
'StockMod
'
Me.AcceptButton = Me.cmdOK
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.CancelButton = Me.cmdCancel
Me.ClientSize = New System.Drawing.Size(304, 230)
Me.Controls.Add(Me.datetime1)
Me.Controls.Add(Me.cmdCancel)
Me.Controls.Add(Me.cmdOK)
Me.Controls.Add(Me.txtCount)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.txtGoodsName)
Me.Controls.Add(Me.Label1)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "StockMod"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "库存盘点"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub StockMod_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtGoodsName.Text = Trim(Temp(0))
txtCount.Text = Trim(Temp(3))
End Sub
Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
Me.Close()
End Sub
Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click
Dim info(9) As String
info(1) = Goods.FindGoosID(txtGoodsName.Text.Trim).Trim
info(2) = txtCount.Text.Trim
info(9) = datetime1.Text.Trim
storename = "update_bssTable_StockInfo"
Stock.ModCount(info)
MessageBox.Show("修改成功", "库存")
Me.Close()
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -