📄 xboutin.frm
字号:
VERSION 5.00
Begin VB.Form xboutin
BorderStyle = 4 'Fixed ToolWindow
ClientHeight = 2775
ClientLeft = 45
ClientTop = 270
ClientWidth = 7290
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2775
ScaleWidth = 7290
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command3
Cancel = -1 'True
Caption = "退 出(&Y)"
Default = -1 'True
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5520
TabIndex = 5
Top = 2280
Width = 1575
End
Begin VB.PictureBox Picture1
BackColor = &H00FFE09E&
Height = 2775
Left = 0
Picture = "xboutin.frx":0000
ScaleHeight = 2715
ScaleWidth = 2475
TabIndex = 2
TabStop = 0 'False
Top = 0
Width = 2535
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "导入与导出"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Index = 1
Left = 285
TabIndex = 4
Top = 765
Width = 2175
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "导入与导出"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 0
Left = 255
TabIndex = 3
Top = 735
Width = 2280
End
Begin VB.Image Image1
Height = 600
Left = 360
Picture = "xboutin.frx":3A064
Stretch = -1 'True
Top = 120
Width = 600
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
Height = 15
Left = 240
Top = 1080
Width = 2175
End
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 240
Top = 1125
Width = 2055
End
End
Begin VB.CommandButton Command2
Caption = "学分评测规则导入(&I)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 2640
Picture = "xboutin.frx":3A4AE
Style = 1 'Graphical
TabIndex = 1
Top = 360
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "登记数据导出(&O)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 4800
Picture = "xboutin.frx":3BAF8
Style = 1 'Graphical
TabIndex = 0
Top = 360
Width = 2295
End
End
Attribute VB_Name = "xboutin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'On Error Resume Next
Dim kk As New addyear
FileSystem.Kill App.Path & "\temp.mmm"
yy = Year(Now)
If Month(Now) < 8 Then yy = yy - 1
kk.Label1.Caption = "清输入您欲导出哪一学年的纪录"
kk.Caption = "导出数据"
kk.Text1.Text = yy
kk.Show 1
If kk.yesno = False Then Exit Sub
ya = kk.kk
Dim ftemp As New data_out1
ftemp.Show 1
If ftemp.yesno = False Then Exit Sub
nf = ftemp.ff
main.connect.Close
FileSystem.FileCopy App.Path & "\scdb.mmm", App.Path & "\temp.mmm"
FileSystem.FileCopy App.Path & "\ccc.mmm", nf
main.connect.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\temp.mmm" & ";Jet OLEDB:Database Password=pianopan412424;Persist Security Info=False;"
main.connect.Execute "Delete from [gz] where [xn]<>'" & yy & "'"
main.connect.Execute "Delete from [jc] where [xn]<>'" & yy & "'"
main.connect.Execute "Delete from [wf] where [ye]<>'" & yy & "'"
Dim temps As New ADODB.Connection
temps.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & nf & ";Jet OLEDB:Database Password=pianopan412424;Persist Security Info=False;"
Dim rf As New ADODB.Recordset
Dim rt As New ADODB.Recordset
rf.Open "select * from [class] ", main.connect, 3, 2
rt.Open "select * from [class] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Fields(2) = rf.Fields(2)
rt.Fields(3) = rf.Fields(3)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
rf.Open "select * from [gz] ", main.connect, 3, 2
rt.Open "select * from [gz] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Fields(2) = rf.Fields(2)
rt.Fields(3) = rf.Fields(3)
rt.Fields(4) = rf.Fields(4)
rt.Fields(5) = rf.Fields(5)
rt.Fields(6) = rf.Fields(6)
rt.Fields(7) = rf.Fields(7)
rt.Fields(8) = rf.Fields(8)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
rf.Open "select * from [jc] ", main.connect, 3, 2
rt.Open "select * from [jc] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Fields(2) = rf.Fields(2)
rt.Fields(3) = rf.Fields(3)
rt.Fields(4) = rf.Fields(4)
rt.Fields(5) = rf.Fields(5)
rt.Fields(6) = rf.Fields(6)
rt.Fields(7) = rf.Fields(7)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
rf.Open "select * from [student] ", main.connect, 3, 2
rt.Open "select * from [student] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Fields(2) = rf.Fields(2)
rt.Fields(3) = rf.Fields(3)
rt.Fields(4) = rf.Fields(4)
rt.Fields(5) = rf.Fields(5)
rt.Fields(6) = rf.Fields(6)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
rf.Open "select * from [wf] ", main.connect, 3, 2
rt.Open "select * from [wf] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Fields(2) = rf.Fields(2)
rt.Fields(3) = rf.Fields(3)
rt.Fields(4) = rf.Fields(4)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
rf.Open "select * from [xb] ", main.connect, 3, 2
rt.Open "select * from [xb] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
rf.Open "select * from [yc] ", main.connect, 3, 2
rt.Open "select * from [yc] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Fields(2) = rf.Fields(2)
rt.Fields(3) = rf.Fields(3)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
rf.Open "select * from [zy] ", main.connect, 3, 2
rt.Open "select * from [zy] ", temps, 3, 2
For i = 1 To rf.RecordCount
rt.AddNew
rt.Fields(0) = rf.Fields(0)
rt.Fields(1) = rf.Fields(1)
rt.Fields(2) = rf.Fields(2)
rt.Update
rf.MoveNext
Next
rf.Close
rt.Close
temps.Close
main.connect.Close
main.connect.Open connectstring
Unload Me
Shell "rar a temp2.rar " & nf
FileSystem.Kill nf
FileSystem.FileCopy "temp2.rar", nf
FileSystem.Kill "temp2.rar"
MsgBox "成功"
End Sub
Private Sub Command2_Click()
Dim temp As New data_in
temp.Show 1
If temp.yesno = False Then Exit Sub
ff = temp.ff
ff1 = temp.ff1
Beep
FileSystem.FileCopy ff, "temp2.tmp"
Shell "rar e temp2.tmp "
FileSystem.Kill "temp2.tmp"
Dim connect As New ADODB.Connection
connect.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ff1 & ";Jet OLEDB:Database Password=pianopan412424;Persist Security Info=False;"
Dim temp1 As New ADODB.Recordset
Dim temp2 As New ADODB.Recordset
temp1.Open "select * from [gz]", main.connect, 3, 2
temp2.Open "select * from [gztemp]", connect, 3, 2
Dim tgggg As New ADODB.Recordset
tgggg.Open "select * from [gz] where [xn]='" & temp2.Fields(8) & "'", main.connect, 3, 2
If tgggg.RecordCount <> 0 Then
If MsgBox("已有本学年的学分评定规定." & Chr(13) & Chr(10) & "是否用此文件覆盖现存学分评定规则?", vbYesNo Or vbInformation, "提示") = vbYes Then
Dim temp5 As New ADODB.Recordset
temp5.Open "select * from [jc] where [gzid] in (select [ID] from [gz] where [xn]='" & temp2.Fields(8) & "')", main.connect, 3, 2
If temp5.RecordCount <> 0 Then
MsgBox "本学分评测规定已经使用,无法覆盖", vbOKOnly Or vbInformation, "提示"
Exit Sub
Else
main.connect.Execute "delete * from [gz] where [xn]='" & temp2.Fields(8) & "'"
End If
Else
Exit Sub
End If
End If
For i = 1 To temp2.RecordCount
temp1.AddNew
temp1.Fields(0) = temp2.Fields(0)
temp1.Fields(1) = temp2.Fields(1)
temp1.Fields(2) = temp2.Fields(2)
temp1.Fields(3) = temp2.Fields(3)
temp1.Fields(4) = temp2.Fields(4)
temp1.Fields(5) = temp2.Fields(5)
temp1.Fields(6) = temp2.Fields(6)
temp1.Fields(7) = temp2.Fields(7)
temp1.Fields(8) = temp2.Fields(8)
temp1.Update
temp2.MoveNext
Next
temp1.Close
temp2.Close
MsgBox "导入成功", vbOKOnly Or vbInformation, "提示"
connect.Close
FileSystem.Kill ff1
Unload Me
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -