📄 frmsourceadd.vb
字号:
Public Class Frmsourceadd
Inherits System.Windows.Forms.Form
Private Sub setall1()
Txtsourcename.Enabled = True
Txtshuliang.Enabled = True
Cbbumen.Enabled = True
Txtapplytime.Enabled = True
Txtapplycompany.Enabled = True
Txtapplycompanyaddr.Enabled = True
Txtapplycompanyphone.Enabled = True
Txtmodifytime.Enabled = True
Txtmodifycompany.Enabled = True
Txtmodifycompanyphone.Enabled = True
End Sub
Private Sub setall2()
Txtsourcename.Enabled = False
Txtshuliang.Enabled = False
Cbbumen.Enabled = False
Txtapplytime.Enabled = False
Txtapplycompany.Enabled = False
Txtapplycompanyaddr.Enabled = False
Txtapplycompanyphone.Enabled = False
Txtmodifytime.Enabled = False
Txtmodifycompany.Enabled = False
Txtmodifycompanyphone.Enabled = False
End Sub
Private Sub setall3()
Txtsourcename.Text = ""
Txtshuliang.Text = ""
Cbbumen.Text = ""
Txtapplytime.Text = ""
Txtapplycompany.Text = ""
Txtapplycompanyaddr.Text = ""
Txtapplycompanyphone.Text = ""
Txtmodifytime.Text = ""
Txtmodifycompany.Text = ""
Txtmodifycompanyphone.Text = ""
End Sub
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写处置以清理组件列表。
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 Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Txtsourcename As System.Windows.Forms.TextBox
Friend WithEvents Txtshuliang As System.Windows.Forms.TextBox
Friend WithEvents Cbbumen As System.Windows.Forms.ComboBox
Friend WithEvents Txtapplytime As System.Windows.Forms.TextBox
Friend WithEvents Txtapplycompany As System.Windows.Forms.TextBox
Friend WithEvents Txtapplycompanyaddr As System.Windows.Forms.TextBox
Friend WithEvents Txtapplycompanyphone As System.Windows.Forms.TextBox
Friend WithEvents Txtmodifytime As System.Windows.Forms.TextBox
Friend WithEvents Txtmodifycompany As System.Windows.Forms.TextBox
Friend WithEvents Txtmodifycompanyphone As System.Windows.Forms.TextBox
Friend WithEvents Btadd As System.Windows.Forms.Button
Friend WithEvents Btexit 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.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.Txtsourcename = New System.Windows.Forms.TextBox()
Me.Txtshuliang = New System.Windows.Forms.TextBox()
Me.Cbbumen = New System.Windows.Forms.ComboBox()
Me.Txtapplytime = New System.Windows.Forms.TextBox()
Me.Txtapplycompany = New System.Windows.Forms.TextBox()
Me.Txtapplycompanyaddr = New System.Windows.Forms.TextBox()
Me.Txtapplycompanyphone = New System.Windows.Forms.TextBox()
Me.Txtmodifytime = New System.Windows.Forms.TextBox()
Me.Txtmodifycompany = New System.Windows.Forms.TextBox()
Me.Txtmodifycompanyphone = New System.Windows.Forms.TextBox()
Me.Btadd = New System.Windows.Forms.Button()
Me.Btexit = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(24, 32)
Me.Label1.Name = "Label1"
Me.Label1.TabIndex = 0
Me.Label1.Text = "应急物资名称:"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(24, 80)
Me.Label2.Name = "Label2"
Me.Label2.TabIndex = 1
Me.Label2.Text = "数 量:"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(24, 128)
Me.Label3.Name = "Label3"
Me.Label3.TabIndex = 2
Me.Label3.Text = "隶属部门:"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(24, 176)
Me.Label4.Name = "Label4"
Me.Label4.TabIndex = 3
Me.Label4.Text = "申报时间:"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(24, 224)
Me.Label5.Name = "Label5"
Me.Label5.TabIndex = 4
Me.Label5.Text = "申报单位:"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(24, 264)
Me.Label6.Name = "Label6"
Me.Label6.TabIndex = 5
Me.Label6.Text = "申报单位地址:"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(384, 88)
Me.Label7.Name = "Label7"
Me.Label7.TabIndex = 6
Me.Label7.Text = "申报单位电话:"
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(384, 136)
Me.Label8.Name = "Label8"
Me.Label8.TabIndex = 7
Me.Label8.Text = "修改时间:"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(384, 184)
Me.Label9.Name = "Label9"
Me.Label9.TabIndex = 8
Me.Label9.Text = "修改单位:"
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(384, 232)
Me.Label10.Name = "Label10"
Me.Label10.TabIndex = 9
Me.Label10.Text = "修改单位电话:"
'
'Txtsourcename
'
Me.Txtsourcename.Enabled = False
Me.Txtsourcename.Location = New System.Drawing.Point(120, 32)
Me.Txtsourcename.Name = "Txtsourcename"
Me.Txtsourcename.Size = New System.Drawing.Size(176, 21)
Me.Txtsourcename.TabIndex = 10
Me.Txtsourcename.Text = ""
'
'Txtshuliang
'
Me.Txtshuliang.Enabled = False
Me.Txtshuliang.Location = New System.Drawing.Point(120, 80)
Me.Txtshuliang.Name = "Txtshuliang"
Me.Txtshuliang.TabIndex = 11
Me.Txtshuliang.Text = ""
'
'Cbbumen
'
Me.Cbbumen.Enabled = False
Me.Cbbumen.Items.AddRange(New Object() {"医疗部门", "公安部门", "教育部门", "城管部门", "消防部门", "林业部门", "水利部门", "环卫部门", "气象部门", "化学品监管及处理部门", "交通部门", "地质灾害防预部门"})
Me.Cbbumen.Location = New System.Drawing.Point(120, 128)
Me.Cbbumen.Name = "Cbbumen"
Me.Cbbumen.Size = New System.Drawing.Size(176, 20)
Me.Cbbumen.TabIndex = 12
'
'Txtapplytime
'
Me.Txtapplytime.Enabled = False
Me.Txtapplytime.Location = New System.Drawing.Point(120, 168)
Me.Txtapplytime.Name = "Txtapplytime"
Me.Txtapplytime.TabIndex = 13
Me.Txtapplytime.Text = ""
'
'Txtapplycompany
'
Me.Txtapplycompany.Enabled = False
Me.Txtapplycompany.Location = New System.Drawing.Point(120, 224)
Me.Txtapplycompany.Name = "Txtapplycompany"
Me.Txtapplycompany.Size = New System.Drawing.Size(176, 21)
Me.Txtapplycompany.TabIndex = 14
Me.Txtapplycompany.Text = ""
'
'Txtapplycompanyaddr
'
Me.Txtapplycompanyaddr.Enabled = False
Me.Txtapplycompanyaddr.Location = New System.Drawing.Point(120, 264)
Me.Txtapplycompanyaddr.Name = "Txtapplycompanyaddr"
Me.Txtapplycompanyaddr.Size = New System.Drawing.Size(264, 21)
Me.Txtapplycompanyaddr.TabIndex = 15
Me.Txtapplycompanyaddr.Text = ""
'
'Txtapplycompanyphone
'
Me.Txtapplycompanyphone.Enabled = False
Me.Txtapplycompanyphone.Location = New System.Drawing.Point(472, 80)
Me.Txtapplycompanyphone.Name = "Txtapplycompanyphone"
Me.Txtapplycompanyphone.Size = New System.Drawing.Size(136, 21)
Me.Txtapplycompanyphone.TabIndex = 16
Me.Txtapplycompanyphone.Text = ""
'
'Txtmodifytime
'
Me.Txtmodifytime.Enabled = False
Me.Txtmodifytime.Location = New System.Drawing.Point(472, 128)
Me.Txtmodifytime.Name = "Txtmodifytime"
Me.Txtmodifytime.Size = New System.Drawing.Size(136, 21)
Me.Txtmodifytime.TabIndex = 17
Me.Txtmodifytime.Text = ""
'
'Txtmodifycompany
'
Me.Txtmodifycompany.Enabled = False
Me.Txtmodifycompany.Location = New System.Drawing.Point(472, 176)
Me.Txtmodifycompany.Name = "Txtmodifycompany"
Me.Txtmodifycompany.Size = New System.Drawing.Size(136, 21)
Me.Txtmodifycompany.TabIndex = 18
Me.Txtmodifycompany.Text = ""
'
'Txtmodifycompanyphone
'
Me.Txtmodifycompanyphone.Enabled = False
Me.Txtmodifycompanyphone.Location = New System.Drawing.Point(472, 224)
Me.Txtmodifycompanyphone.Name = "Txtmodifycompanyphone"
Me.Txtmodifycompanyphone.Size = New System.Drawing.Size(136, 21)
Me.Txtmodifycompanyphone.TabIndex = 19
Me.Txtmodifycompanyphone.Text = ""
'
'Btadd
'
Me.Btadd.Location = New System.Drawing.Point(120, 312)
Me.Btadd.Name = "Btadd"
Me.Btadd.Size = New System.Drawing.Size(104, 32)
Me.Btadd.TabIndex = 20
Me.Btadd.Text = "添加"
'
'Btexit
'
Me.Btexit.Location = New System.Drawing.Point(384, 312)
Me.Btexit.Name = "Btexit"
Me.Btexit.Size = New System.Drawing.Size(104, 32)
Me.Btexit.TabIndex = 22
Me.Btexit.Text = "退 出"
'
'Frmsourceadd
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(664, 357)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Btexit, Me.Btadd, Me.Txtmodifycompanyphone, Me.Txtmodifycompany, Me.Txtmodifytime, Me.Txtapplycompanyphone, Me.Txtapplycompanyaddr, Me.Txtapplycompany, Me.Txtapplytime, Me.Cbbumen, Me.Txtshuliang, Me.Txtsourcename, Me.Label10, Me.Label9, Me.Label8, Me.Label7, Me.Label6, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1})
Me.Name = "Frmsourceadd"
Me.Text = "添加应急物资信息"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cbbumen.SelectedIndexChanged
End Sub
Private Sub Btexitaddsource_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btexit.Click
Dim newFrmmain As New Frmmain()
newFrmmain.Show()
Me.Hide()
End Sub
Private Sub Frmsourceadd_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Btadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btadd.Click
If Btadd.Text = "添加" Then
setall1()
setall3()
Btexit.Enabled = False
Btadd.Text = "确定"
Return
End If
If Btadd.Text = "确定" Then
MessageBox.Show("您的用户信息已经添加成功!")
setall2()
Btexit.Enabled = True
Btadd.Text = "添加"
setall3()
Return
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -