📄 form3.vb
字号:
Public Class Form3
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 Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents txtxm As System.Windows.Forms.TextBox
Friend WithEvents txtxb As System.Windows.Forms.ComboBox
Friend WithEvents txtbj As System.Windows.Forms.ComboBox
Friend WithEvents txtbh As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.txtbh = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.txtxm = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.txtxb = New System.Windows.Forms.ComboBox
Me.Label5 = New System.Windows.Forms.Label
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker
Me.Label6 = New System.Windows.Forms.Label
Me.txtbj = New System.Windows.Forms.ComboBox
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("楷体_GB2312", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.Location = New System.Drawing.Point(-136, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(656, 24)
Me.Label1.TabIndex = 2
Me.Label1.Text = "学员信息修改"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(24, 48)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(66, 17)
Me.Label2.TabIndex = 3
Me.Label2.Text = "编 号:"
'
'txtbh
'
Me.txtbh.Location = New System.Drawing.Point(88, 48)
Me.txtbh.Name = "txtbh"
Me.txtbh.TabIndex = 4
Me.txtbh.Text = ""
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(200, 48)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(66, 17)
Me.Label3.TabIndex = 5
Me.Label3.Text = "姓 名:"
'
'txtxm
'
Me.txtxm.Location = New System.Drawing.Point(264, 48)
Me.txtxm.Name = "txtxm"
Me.txtxm.Size = New System.Drawing.Size(120, 21)
Me.txtxm.TabIndex = 6
Me.txtxm.Text = ""
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(24, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(66, 17)
Me.Label4.TabIndex = 7
Me.Label4.Text = "姓 别:"
'
'txtxb
'
Me.txtxb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.txtxb.Items.AddRange(New Object() {"男", "女"})
Me.txtxb.Location = New System.Drawing.Point(88, 80)
Me.txtxb.Name = "txtxb"
Me.txtxb.Size = New System.Drawing.Size(104, 20)
Me.txtxb.TabIndex = 8
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(200, 80)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(66, 17)
Me.Label5.TabIndex = 9
Me.Label5.Text = "出生日期:"
'
'DateTimePicker1
'
Me.DateTimePicker1.Location = New System.Drawing.Point(264, 80)
Me.DateTimePicker1.Name = "DateTimePicker1"
Me.DateTimePicker1.Size = New System.Drawing.Size(120, 21)
Me.DateTimePicker1.TabIndex = 10
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(24, 112)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(66, 17)
Me.Label6.TabIndex = 11
Me.Label6.Text = "所在班级:"
'
'txtbj
'
Me.txtbj.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.txtbj.Items.AddRange(New Object() {"一年级", "二年级", "三年级"})
Me.txtbj.Location = New System.Drawing.Point(88, 112)
Me.txtbj.Name = "txtbj"
Me.txtbj.Size = New System.Drawing.Size(104, 20)
Me.txtbj.TabIndex = 12
'
'GroupBox1
'
Me.GroupBox1.Location = New System.Drawing.Point(-8, 144)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(432, 8)
Me.GroupBox1.TabIndex = 13
Me.GroupBox1.TabStop = False
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(224, 160)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 14
Me.Button1.Text = "保存"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(312, 160)
Me.Button2.Name = "Button2"
Me.Button2.TabIndex = 15
Me.Button2.Text = "取消"
'
'Form3
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(400, 189)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.txtbj)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.DateTimePicker1)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.txtxb)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.txtxm)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.txtbh)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow
Me.Name = "Form3"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "学生信息修改"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim bh As String
Dim xm As String
Dim xb As String
Dim ssrq As String
Dim bj As String
bh = Me.txtbh.Text
xm = Me.txtxm.Text
xb = Me.txtxb.Text
ssrq = Me.DateTimePicker1.Value
bj = Me.txtbj.Text
If bh = "" Then
MsgBox("请输入学生编号!", MsgBoxStyle.Information)
Exit Sub
End If
If xm = "" Then
MsgBox("请输入学生姓名!", MsgBoxStyle.Information)
Exit Sub
End If
If xb = "" Then
MsgBox("请输入学生性别!", MsgBoxStyle.Information)
Exit Sub
End If
If ssrq = "" Then
MsgBox("请输入学生出生日期!", MsgBoxStyle.Information)
Exit Sub
End If
If bj = "" Then
MsgBox("请输学生班级!", MsgBoxStyle.Information)
Exit Sub
End If
Dim cls As New clsXs
If cls.SetXs(bh, xm, xb, Format(ssrq, "yyyy-MM-dd"), bj) Then
MsgBox("保存成功!", MsgBoxStyle.Information)
gForm1.getList()
Else
MsgBox("保存失败!", MsgBoxStyle.Information)
End If
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -