📄 roomaddmod.vb
字号:
Public Class RoomAddMod
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 txtRoomID As System.Windows.Forms.TextBox
Friend WithEvents txtRoomName As System.Windows.Forms.TextBox
Friend WithEvents cmdOK As System.Windows.Forms.Button
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents txtRemark As System.Windows.Forms.TextBox
Friend WithEvents cmdCancel As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.txtRoomID = New System.Windows.Forms.TextBox
Me.txtRoomName = New System.Windows.Forms.TextBox
Me.cmdOK = New System.Windows.Forms.Button
Me.Label3 = New System.Windows.Forms.Label
Me.txtRemark = New System.Windows.Forms.TextBox
Me.cmdCancel = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(40, 48)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(56, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "仓库号:"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(40, 88)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(56, 16)
Me.Label2.TabIndex = 1
Me.Label2.Text = "仓库名:"
'
'txtRoomID
'
Me.txtRoomID.Location = New System.Drawing.Point(112, 40)
Me.txtRoomID.MaxLength = 10
Me.txtRoomID.Name = "txtRoomID"
Me.txtRoomID.TabIndex = 2
Me.txtRoomID.Text = ""
'
'txtRoomName
'
Me.txtRoomName.Location = New System.Drawing.Point(112, 80)
Me.txtRoomName.MaxLength = 10
Me.txtRoomName.Name = "txtRoomName"
Me.txtRoomName.TabIndex = 3
Me.txtRoomName.Text = ""
'
'cmdOK
'
Me.cmdOK.Location = New System.Drawing.Point(48, 216)
Me.cmdOK.Name = "cmdOK"
Me.cmdOK.TabIndex = 4
Me.cmdOK.Text = "确 定"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(40, 136)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(48, 16)
Me.Label3.TabIndex = 5
Me.Label3.Text = "备注:"
'
'txtRemark
'
Me.txtRemark.Location = New System.Drawing.Point(112, 120)
Me.txtRemark.MaxLength = 50
Me.txtRemark.Multiline = True
Me.txtRemark.Name = "txtRemark"
Me.txtRemark.Size = New System.Drawing.Size(136, 72)
Me.txtRemark.TabIndex = 6
Me.txtRemark.Text = ""
'
'cmdCancel
'
Me.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.cmdCancel.Location = New System.Drawing.Point(152, 216)
Me.cmdCancel.Name = "cmdCancel"
Me.cmdCancel.TabIndex = 7
Me.cmdCancel.Text = "取 消"
'
'RoomAddMod
'
Me.AcceptButton = Me.cmdOK
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.CancelButton = Me.cmdCancel
Me.ClientSize = New System.Drawing.Size(272, 254)
Me.Controls.Add(Me.cmdCancel)
Me.Controls.Add(Me.txtRemark)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.cmdOK)
Me.Controls.Add(Me.txtRoomName)
Me.Controls.Add(Me.txtRoomID)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "RoomAddMod"
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "仓库信息"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub RoomAddMod_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If ClickAdd = True Then
Me.Text = "添加仓库信息"
Else
Me.Text = "修改仓库信息"
txtRoomID.Text = Trim(Temp(0))
txtRoomName.Text = Trim(Temp(1))
txtRemark.Text = Trim(Temp(2))
txtRoomID.Enabled = False
End If
End Sub
Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click
Dim info(3) As String
info(0) = txtRoomID.Text.Trim
info(1) = txtRoomName.Text.Trim
info(2) = txtRemark.Text.Trim
If ClickAdd = True Then
storename = "CheckRoomID"
Stock.CheckID(info(0))
If hasID = False Then
Stock.AddStockRoom(info)
MessageBox.Show("添加成功!", "仓库信息")
Me.Close()
Else
MessageBox.Show("此仓库号已存在!", "错误")
txtRoomID.SelectAll()
txtRoomID.Focus()
End If
Else
Stock.ModStockRoom(info)
MessageBox.Show("修改成功!", "仓库信息")
Me.Close()
End If
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 txtRoomID_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtRoomID.TextChanged
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -