SQL+VB图书管理系统(数据库+源代码+论文) 第13页
If month > 12 Then
month1 = month Mod 12
year = Int(Me.Txt_year.Text) + month \ 12
Me.Txt_month1.Text = month1
Me.Txt_year1.Text = year
End If
Case 4, 6, 9, 11
day = Int(Me.Txt_day.Text) + Int(Me.Txt_zeng.Text)
If day > 30 Then
day1 = day Mod 30
month = Int(Me.Txt_month.Text) + day \ 30
Me.Txt_day1.Text = day1
Me.Txt_month1.Text = month
Else
Me.Txt_day1.Text = day
Exit Function
End If
If month > 12 Then
month1 = month Mod 12
year = Int(Me.Txt_year.Text) + month \ 12
Me.Txt_month1.Text = month1
Me.Txt_year1.Text = year
End If
Case 2
If Int(Me.Txt_year.Text) Mod 4 = 0 And Int(Me.Txt_year.Text) Mod 100 <> 0 Or Int(Me.Txt_year.Text) Mod 400 = 0 Then
day = Int(Me.Txt_day.Text) + Int(Me.Txt_zeng.Text)
If day > 29 Then
day1 = day Mod 29
month = Int(Me.Txt_month.Text) + day \ 29
Me.Txt_day1.Text = day1
Me.Txt_month1.Text = month
Else
Me.Txt_day1.Text = day
Exit Function
End If
If month > 12 Then
month1 = month Mod 12
year = Int(Me.Txt_year.Text) + month \ 12
Me.Txt_month1.Text = month1
Me.Txt_year1.Text = year
End If
Else
day = Int(Me.Txt_day.Text) + Int(Me.Txt_zeng.Text)
If day > 28 Then
day1 = day Mod 28
month = Int(Me.Txt_month.Text) + day \ 28
Me.Txt_day1.Text = day1
Me.Txt_month1.Text = month
Else
Me.Txt_day1.Text = day
Exit Function
End If
If month > 12 Then
month1 = month Mod 12
year = Int(Me.Txt_year.Text) + month \ 12
Me.Txt_month1.Text = month1
Me.Txt_year1.Text = year
End If
End If
End Select
End Function
3.4.4 图书信息查询界面代码设计
Private Sub Cmb_cxtj_Click()
If Cmb_cxtj.Text = "图书ID" Then
Label2.Visible = True
Txt_cxnr.Visible = True
Command1.Visible = False
Txt_cxnr.Locked = False
Txt_cxnr.Text = ""
Txt_cxnr.SetFocus
ElseIf Cmb_cxtj.Text = "图书名称" Then
Label2.Visible = True
Txt_cxnr.Visible = True
Command1.Visible = False
Txt_cxnr.Locked = False
Txt_cxnr.Text = ""
Txt_cxnr.SetFocus
ElseIf Cmb_cxtj.Text = "图书类型" Then
Label2.Visible = True
Txt_cxnr.Visible = True
Command1.Visible = True
Txt_cxnr.Locked = True
Txt_cxnr.Text = ""
Txt_cxnr.SetFocus
ElseIf Cmb_cxtj.Text = "所有图书信息" Then
Label2.Visible = False
Txt_cxnr.Visible = False
Command1.Visible = False
End If
Me.MSFlexGrid1.Clear
Me.MSFlexGrid1.Rows = 2
Me.MSFlexGrid1.Cols = 2
Me.StatusBar1.Panels(1).Text = "总共有0条记录"
End Sub
Private Sub Command1_Click()
Dim sql As String
sql = "select * from 图书类型"
ShowData sql, Frm_find.MSFlexGrid1
strfind = "tscx"
Frm_find.Show 1
End Sub
Private Sub Command2_Click()
Dim sql As String
Select Case Cmb_cxtj.Text
Case "请选择查询条件"
MsgBox "选择错误!请选择查询条件!", vbCritical + vbOKCancel, "提示"
Exit Sub
<< 上一页 [11] [12] [13] [14] [15] [16] 下一页
SQL+VB图书管理系统(数据库+源代码+论文) 第13页下载如图片无法显示或论文不完整,请联系qq752018766