📄 cljs.vb
字号:
Public Class cljs
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
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
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton3 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton4 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton5 As System.Windows.Forms.RadioButton
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.RadioButton1 = New System.Windows.Forms.RadioButton
Me.RadioButton2 = New System.Windows.Forms.RadioButton
Me.RadioButton3 = New System.Windows.Forms.RadioButton
Me.RadioButton4 = New System.Windows.Forms.RadioButton
Me.RadioButton5 = New System.Windows.Forms.RadioButton
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(72, 96)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(56, 24)
Me.Label1.TabIndex = 0
Me.Label1.Text = "ID编号"
'
'TextBox1
'
Me.TextBox1.Font = New System.Drawing.Font("SimSun", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.TextBox1.Location = New System.Drawing.Point(136, 88)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(168, 23)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(72, 136)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(56, 24)
Me.Label2.TabIndex = 2
Me.Label2.Text = "借阅者"
'
'TextBox2
'
Me.TextBox2.Font = New System.Drawing.Font("SimSun", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.TextBox2.Location = New System.Drawing.Point(135, 128)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(200, 23)
Me.TextBox2.TabIndex = 3
Me.TextBox2.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(128, 200)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(72, 24)
Me.Button1.TabIndex = 4
Me.Button1.Text = "借 书"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(200, 200)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(72, 24)
Me.Button2.TabIndex = 5
Me.Button2.Text = "还 书"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(272, 200)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(72, 24)
Me.Button3.TabIndex = 6
Me.Button3.Text = "返 回"
'
'RadioButton1
'
Me.RadioButton1.Checked = True
Me.RadioButton1.Location = New System.Drawing.Point(40, 32)
Me.RadioButton1.Name = "RadioButton1"
Me.RadioButton1.Size = New System.Drawing.Size(56, 24)
Me.RadioButton1.TabIndex = 7
Me.RadioButton1.TabStop = True
Me.RadioButton1.Text = "力学"
'
'RadioButton2
'
Me.RadioButton2.Location = New System.Drawing.Point(104, 32)
Me.RadioButton2.Name = "RadioButton2"
Me.RadioButton2.Size = New System.Drawing.Size(56, 24)
Me.RadioButton2.TabIndex = 8
Me.RadioButton2.Text = "数学"
'
'RadioButton3
'
Me.RadioButton3.Location = New System.Drawing.Point(176, 32)
Me.RadioButton3.Name = "RadioButton3"
Me.RadioButton3.Size = New System.Drawing.Size(88, 24)
Me.RadioButton3.TabIndex = 9
Me.RadioButton3.Text = "通信资料"
'
'RadioButton4
'
Me.RadioButton4.Location = New System.Drawing.Point(256, 32)
Me.RadioButton4.Name = "RadioButton4"
Me.RadioButton4.Size = New System.Drawing.Size(56, 24)
Me.RadioButton4.TabIndex = 10
Me.RadioButton4.Text = "物理"
'
'RadioButton5
'
Me.RadioButton5.Location = New System.Drawing.Point(328, 32)
Me.RadioButton5.Name = "RadioButton5"
Me.RadioButton5.Size = New System.Drawing.Size(80, 24)
Me.RadioButton5.TabIndex = 11
Me.RadioButton5.Text = "信科资料"
'
'cljs
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(442, 276)
Me.ControlBox = False
Me.Controls.Add(Me.RadioButton5)
Me.Controls.Add(Me.RadioButton4)
Me.Controls.Add(Me.RadioButton3)
Me.Controls.Add(Me.RadioButton2)
Me.Controls.Add(Me.RadioButton1)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "cljs"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "借书还书处理"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '借书处理
Dim str As String
str = "select jyz from " & type_book & " where ID='" & Trim(TextBox1.Text) & "'"
Call ReadMdb(str)
If OleSuccess Then
If DatRead.Read() Then
If Len(DatRead(0).ToString) = 0 Then
DatRead.Close()
str = "UPDATE " & type_book & " SET jyz='" & Trim(TextBox2.Text) & "',JSRQ='" & Now.ToShortDateString & "' WHERE ID='" & Trim(TextBox1.Text) & "'"
Call WriteMdb(str)
If OleSuccess Then
Me.Close()
End If
Else
DatRead.Close()
MessageBox.Show("此书已经借出", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Else
MessageBox.Show("没有您要的书", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End If
End Sub
Private Sub cljs_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
type_book = "lixue"
End Sub
Private Sub RadioButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.Click
type_book = "lixue"
End Sub
Private Sub RadioButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton2.Click
type_book = "shuxue"
End Sub
Private Sub RadioButton3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton3.Click
type_book = "tongxinziliao"
End Sub
Private Sub RadioButton4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton4.Click
type_book = "wuli"
End Sub
Private Sub RadioButton5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton5.Click
type_book = "xinkeziliao"
End Sub
Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click '还书处理
Dim str As String
str = "UPDATE " & type_book & " SET jyz=NULL,JSRQ=NULL" & " WHERE ID='" & Trim(TextBox1.Text) & "'"
Call WriteMdb(str)
If OleSuccess Then
Me.Close()
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -