📄 admin_librarybasicset.vb
字号:
Me.tblandnum.Location = New System.Drawing.Point(104, 40)
Me.tblandnum.Name = "tblandnum"
Me.tblandnum.Size = New System.Drawing.Size(40, 21)
Me.tblandnum.TabIndex = 3
Me.tblandnum.Text = ""
'
'rbclose
'
Me.rbclose.ForeColor = System.Drawing.SystemColors.ControlText
Me.rbclose.Location = New System.Drawing.Point(152, 16)
Me.rbclose.Name = "rbclose"
Me.rbclose.Size = New System.Drawing.Size(40, 24)
Me.rbclose.TabIndex = 2
Me.rbclose.Text = "否"
'
'rbopen
'
Me.rbopen.Checked = True
Me.rbopen.ForeColor = System.Drawing.SystemColors.ControlText
Me.rbopen.Location = New System.Drawing.Point(112, 16)
Me.rbopen.Name = "rbopen"
Me.rbopen.Size = New System.Drawing.Size(40, 24)
Me.rbopen.TabIndex = 1
Me.rbopen.TabStop = True
Me.rbopen.Text = "是"
'
'Label5
'
Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label5.Location = New System.Drawing.Point(8, 112)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(96, 24)
Me.Label5.TabIndex = 4
Me.Label5.Text = "公告刷新时间:"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label4
'
Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label4.Location = New System.Drawing.Point(24, 88)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(80, 24)
Me.Label4.TabIndex = 3
Me.Label4.Text = "可续借次数:"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label3
'
Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label3.Location = New System.Drawing.Point(24, 64)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(80, 24)
Me.Label3.TabIndex = 2
Me.Label3.Text = "可借阅时间:"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label2
'
Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label2.Location = New System.Drawing.Point(24, 40)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(80, 24)
Me.Label2.TabIndex = 1
Me.Label2.Text = "可借出数量:"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label1
'
Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label1.Location = New System.Drawing.Point(32, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 24)
Me.Label1.TabIndex = 0
Me.Label1.Text = "是否开放:"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'win_librarybasicset
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.CancelButton = Me.btclose
Me.ClientSize = New System.Drawing.Size(328, 149)
Me.Controls.Add(Me.GroupBox1)
Me.ForeColor = System.Drawing.SystemColors.ControlDarkDark
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(336, 176)
Me.MinimumSize = New System.Drawing.Size(336, 176)
Me.Name = "win_librarybasicset"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "图书馆管理系统--图书馆基本配置"
Me.GroupBox1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub win_librarybasicset_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
sqlstr = "select * from libraryinfo"
objDS = GetData(sqlstr)
If objDS.Tables(0).Rows(0)("canland") = 1 Then
rbopen.Checked = True
Else
rbclose.Checked = True
End If
tblandnum.Text = objDS.Tables(0).Rows(0)("canlandnum").ToString
tblanddays.Text = objDS.Tables(0).Rows(0)("canlanddays").ToString
tbreland.Text = objDS.Tables(0).Rows(0)("canreland").ToString
tbboardreflash.Text = objDS.Tables(0).Rows(0)("boardreflash").ToString
End Sub
Private Sub btclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btclose.Click
Me.Close()
End Sub
Private Sub btmodi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btmodi.Click
Dim oorc As Integer, landnum, landdays, reland, flash As String, canupdate As Boolean = True
If rbopen.Checked = True Then
oorc = 1
Else
oorc = 0
End If
landnum = filter(Trim(tblandnum.Text).ToString)
landdays = filter(Trim(tblanddays.Text).ToString)
reland = filter(Trim(tbreland.Text).ToString)
flash = filter(Trim(tbboardreflash.Text).ToString)
If landnum = "" Then
MessageBox.Show("可借出数量不能为空", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tblandnum.Focus()
canupdate = False
ElseIf landdays = "" Then
MessageBox.Show("可借阅时间不能为空", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tblanddays.Focus()
canupdate = False
ElseIf reland = "" Then
MessageBox.Show("可续借次数不能为空", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tbreland.Focus()
canupdate = False
ElseIf flash = "" Then
MessageBox.Show("公告刷新时间不能为空", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tbboardreflash.Focus()
canupdate = False
ElseIf Not isnum(landnum) Then
MessageBox.Show("可借出数量不能为数字", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tblandnum.Focus()
canupdate = False
ElseIf Not isnum(landdays) Then
MessageBox.Show("可借阅时间不能为数字", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tblanddays.Focus()
canupdate = False
ElseIf Not isnum(reland) Then
MessageBox.Show("可续借次数不能为数字", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tbreland.Focus()
canupdate = False
ElseIf Not isnum(flash) Then
MessageBox.Show("公告刷新时间不能为数字", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
tbboardreflash.Focus()
canupdate = False
End If
Try
If canupdate Then
sqlstr = "update libraryinfo set canland = " & oorc & ",canlandnum=" & landnum & ",canlanddays=" & landdays & ",canreland=" & reland & ",boardreflash=" & flash & ""
UpdateData(sqlstr)
MessageBox.Show("数据库更新成功", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Catch
MessageBox.Show("数据库更新错误", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
Private Sub btreset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btreset.Click
rbopen.Checked = True
tblandnum.Text = 5
tblanddays.Text = 60
tbreland.Text = 5
tbboardreflash.Text = 6000
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -