📄 notclass.frm
字号:
class1.Adodc3.Recordset.Update
class1.Adodc3.Recordset.Resync adAffectCurrent, adResyncAllValues
Exit Do
Else
If class1.Adodc3.Recordset.Fields(3).Value = "" And class1.Adodc3.Recordset.Fields(4).Value = "" Then
class1.Adodc3.Recordset.Fields(3).Value = da
class1.Adodc3.Recordset.Fields(4).Value = 7 - da
class1.Adodc3.Recordset.Fields(8).Value = 1
class1.Adodc3.Recordset.Update
class1.Adodc3.Recordset.Resync adAffectCurrent, adResyncAllValues
Exit Do
Else
class1.Adodc3.Recordset.MoveNext
End If
End If
Loop
If class1.Adodc3.Recordset.EOF Then
class1.Adodc3.Recordset.AddNew
class1.Adodc3.Recordset.Fields(3).Value = da
class1.Adodc3.Recordset.Fields(4).Value = 7 - da
class1.Adodc3.Recordset.Fields(8).Value = 1
class1.Adodc3.Recordset.Update
class1.Adodc3.Recordset.Resync adAffectCurrent, adResyncAllValues
End If
class1.Adodc3.Refresh
Adodc2.Recordset.Fields(4).Value = 7 - da
Adodc2.Recordset.Fields(5).Value = quyi
Adodc2.Recordset.Fields(6).Value = quer
Adodc2.Recordset.Fields(7).Value = qusan
Adodc2.Recordset.Fields(8).Value = qusi
class1.Adodc4.Recordset.MoveFirst
Do While Not class1.Adodc4.Recordset.EOF
If quyi = class1.Adodc4.Recordset.Fields(5).Value And quer = class1.Adodc4.Recordset.Fields(6).Value _
And qusan = class1.Adodc4.Recordset.Fields(7).Value And qusi = class1.Adodc4.Recordset.Fields(8).Value Then
class1.Adodc4.Recordset.Fields(10).Value = class1.Adodc4.Recordset.Fields(10).Value + 1
class1.Adodc4.Recordset.Update
class1.Adodc4.Recordset.Resync adAffectCurrent, adResyncAllValues
Exit Do
Else
If class1.Adodc4.Recordset.Fields(5).Value = "" And class1.Adodc4.Recordset.Fields(6).Value = "" _
And class1.Adodc4.Recordset.Fields(7).Value = "" And class1.Adodc4.Recordset.Fields(8).Value = "" Then
class1.Adodc4.Recordset.Fields(5).Value = quyi
class1.Adodc4.Recordset.Fields(6).Value = quer
class1.Adodc4.Recordset.Fields(7).Value = qusan
class1.Adodc4.Recordset.Fields(8).Value = qusi
class1.Adodc4.Recordset.Fields(10).Value = 1
class1.Adodc4.Recordset.Update
class1.Adodc4.Recordset.Resync adAffectCurrent, adResyncAllValues
Exit Do
Else
class1.Adodc4.Recordset.MoveNext
End If
End If
Loop
If class1.Adodc4.Recordset.EOF Then
class1.Adodc4.Recordset.AddNew
class1.Adodc4.Recordset.Fields(5).Value = quyi
class1.Adodc4.Recordset.Fields(6).Value = quer
class1.Adodc4.Recordset.Fields(7).Value = qusan
class1.Adodc4.Recordset.Fields(8).Value = qusi
class1.Adodc4.Recordset.Fields(10).Value = 1
class1.Adodc4.Recordset.Update
class1.Adodc4.Recordset.Resync adAffectCurrent, adResyncAllValues
End If
class1.Adodc4.Refresh
Adodc2.Recordset.Fields(9).Value = yulin
Adodc2.Recordset.Fields(10).Value = yuyi
Adodc2.Recordset.Fields(11).Value = yuer
class1.Adodc5.Recordset.MoveFirst
Do While Not class1.Adodc5.Recordset.EOF
If yulin = class1.Adodc5.Recordset.Fields(4).Value And yuyi = class1.Adodc5.Recordset.Fields(5).Value _
And yuer = class1.Adodc5.Recordset.Fields(6).Value Then
class1.Adodc5.Recordset.Fields(8).Value = class1.Adodc5.Recordset.Fields(8).Value + 1
class1.Adodc5.Recordset.Update
class1.Adodc5.Recordset.Resync adAffectCurrent, adResyncAllValues
Exit Do
Else
If class1.Adodc5.Recordset.Fields(4).Value = "" And class1.Adodc5.Recordset.Fields(5).Value = "" _
And class1.Adodc5.Recordset.Fields(6).Value = "" Then
class1.Adodc5.Recordset.Fields(4).Value = yulin
class1.Adodc5.Recordset.Fields(5).Value = yuyi
class1.Adodc5.Recordset.Fields(6).Value = yuer
class1.Adodc5.Recordset.Fields(8).Value = 1
class1.Adodc5.Recordset.Update
class1.Adodc5.Recordset.Resync adAffectCurrent, adResyncAllValues
Exit Do
Else
class1.Adodc5.Recordset.MoveNext
End If
End If
Loop
If class1.Adodc5.Recordset.EOF Then
class1.Adodc5.Recordset.AddNew
class1.Adodc5.Recordset.Fields(4).Value = yulin
class1.Adodc5.Recordset.Fields(5).Value = yuyi
class1.Adodc5.Recordset.Fields(6).Value = yuer
class1.Adodc5.Recordset.Fields(8).Value = 1
class1.Adodc5.Recordset.Update
class1.Adodc5.Recordset.Resync adAffectCurrent, adResyncAllValues
End If
class1.Adodc5.Refresh
Dim k As Integer
If Len(shzi) > 4 Then
shongzi = Left(shzi, 2)
For k = 3 To Len(shzi) - 1 Step 2
If Val(Mid(shzi, k, 2)) - Val(Mid(shzi, k - 2, 2)) <> 0 Then
shongzi = shongzi + Mid(shzi, k, 2)
End If
Next k
Else
shongzi = shzi
End If
If Len(shongzi) = 4 Then
Adodc2.Recordset.Fields(12).Value = 1
Adodc2.Recordset.Fields(15).Value = shongzi
End If
If Len(shongzi) = 6 Then
Adodc2.Recordset.Fields(13).Value = 1
Adodc2.Recordset.Fields(15).Value = shongzi
End If
If Len(shongzi) = 8 Then
If Val(Mid(shongzi, 5, 2)) - Val(Mid(shongzi, 3, 2)) = 1 Then
Adodc2.Recordset.Fields(14).Value = 1
Adodc2.Recordset.Fields(15).Value = shongzi
Else
Adodc2.Recordset.Fields(12).Value = 2
Adodc2.Recordset.Fields(15).Value = shongzi
End If
End If
If Len(shongzi) = 10 Then
Adodc2.Recordset.Fields(12).Value = 1
Adodc2.Recordset.Fields(13).Value = 1
Adodc2.Recordset.Fields(15).Value = shongzi
End If
If Len(shongzi) = 12 Then
If Val(Mid(shongzi, 5, 2)) - Val(Mid(shongzi, 3, 2)) <> 1 And Val(Mid(shongzi, 9, 2)) - Val(Mid(shongzi, 7, 2)) <> 1 Then
Adodc2.Recordset.Fields(12).Value = 3
Adodc2.Recordset.Fields(15).Value = shongzi
End If
If Val(Mid(shongzi, 7, 2)) - Val(Mid(shongzi, 5, 2)) <> 1 Then
Adodc2.Recordset.Fields(13).Value = 2
Adodc2.Recordset.Fields(15).Value = shongzi
End If
If Val(Mid(shongzi, 5, 2)) - Val(Mid(shongzi, 3, 2)) <> 1 And Val(Mid(shongzi, 9, 2)) - Val(Mid(shongzi, 7, 2)) = 1 Then
Adodc2.Recordset.Fields(12) = 1
Adodc2.Recordset.Fields(14) = 1
Adodc2.Recordset.Fields(15).Value = shongzi
End If
If Val(Mid(shongzi, 9, 2)) - Val(Mid(shongzi, 7, 2)) <> 1 And Val(Mid(shongzi, 5, 2)) - Val(Mid(shongzi, 3, 2)) = 1 Then
Adodc2.Recordset.Fields(12) = 1
Adodc2.Recordset.Fields(14) = 1
Adodc2.Recordset.Fields(15).Value = shongzi
End If
If Val(Mid(shongzi, 5, 2)) - Val(Mid(shongzi, 3, 2)) = 1 And Val(Mid(shongzi, 9, 2)) - Val(Mid(shongzi, 7, 2)) = 1 Then
Adodc2.Recordset.Fields(13).Value = 2
Adodc2.Recordset.Fields(15).Value = shongzi
End If
End If
Adodc2.Recordset.Update
Adodc2.Recordset.Resync adAffectCurrent, adResyncAllValues
class1.Adodc1.Recordset.MoveNext
Adodc2.Refresh
If hhfcevn.rsnumberclass.State = adStateClosed Then
hhfcevn.rsnumberclass.Open
hhfcevn.rsnumberclass.Requery
End If
MSHFlexGrid1.Refresh
MSHFlexGrid1.Col = 1
MSHFlexGrid1.Sort = 5
CandyCommand1.Enabled = False
CandyCommand2.Enabled = False
hhfcevn.Commands("noclass1t").Execute
If hhfcevn.rsnoclass1t.State = adStateClosed Then
hhfcevn.rsnoclass1t.Open
End If
hhfcevn.rsnoclass1t.Requery
hhfcevn.Commands("noclass2").Execute
If hhfcevn.rsnoclass2.State = adStateClosed Then
hhfcevn.rsnoclass2.Open
End If
hhfcevn.rsnoclass2.Requery
hhfcevn.Commands("noclass3t").Execute
If hhfcevn.rsnoclass3t.State = adStateClosed Then
hhfcevn.rsnoclass3t.Open
End If
hhfcevn.rsnoclass3t.Requery
hhfcevn.Commands("noclass4").Execute
If hhfcevn.rsnoclass4.State = adStateClosed Then
hhfcevn.rsnoclass4.Open
End If
hhfcevn.rsnoclass4.Requery
hhfcevn.Commands("noclass5t").Execute
If hhfcevn.rsnoclass5t.State = adStateClosed Then
hhfcevn.rsnoclass5t.Open
End If
hhfcevn.rsnoclass5t.Requery
hhfcevn.Commands("noclass6").Execute
If hhfcevn.rsnoclass6.State = adStateClosed Then
hhfcevn.rsnoclass6.Open
End If
hhfcevn.rsnoclass6.Requery
Else
MsgBox "无可生成的数据,请仔细再看一遍,或进行数据生成操作。", vbOKOnly, "提示"
CandyCommand2.Enabled = False
End If
End Sub
Private Sub CandyCommand4_Click()
'平均
tjihe = 0
touhe = 0
tdahe = 0
txiaohe = 0
tyihe = 0
terhe = 0
tsanhe = 0
tsihe = 0
tyulinhe = 0
tyuyihe = 0
tyuerhe = 0
terlianhe = 0
tsanlianhe = 0
tsilianhe = 0
tlianhl = 0
Adodc2.Recordset.MoveFirst
Do While Not Adodc2.Recordset.EOF
tjihe = tjihe + Adodc2.Recordset.Fields(1).Value
touhe = touhe + Adodc2.Recordset.Fields(2).Value
tdahe = tdahe + Adodc2.Recordset.Fields(3).Value
txiaohe = txiaohe + Adodc2.Recordset.Fields(4).Value
tyihe = tyihe + Adodc2.Recordset.Fields(5).Value
terhe = terhe + Adodc2.Recordset.Fields(6).Value
tsanhe = tsanhe + Adodc2.Recordset.Fields(7).Value
tsihe = tsihe + Adodc2.Recordset.Fields(8).Value
tyulinhe = tyulinhe + Adodc2.Recordset.Fields(9).Value
tyuyihe = tyuyihe + Adodc2.Recordset.Fields(10).Value
tyuerhe = tyuerhe + Adodc2.Recordset.Fields(11).Value
If Not IsNull(Adodc2.Recordset.Fields(12).Value) Then
terlianhe = terlianhe + Adodc2.Recordset.Fields(12).Value
End If
If Not IsNull(Adodc2.Recordset.Fields(13).Value) Then
tsanlianhe = tsanlianhe + Adodc2.Recordset.Fields(13).Value
End If
If Not IsNull(Adodc2.Recordset.Fields(14).Value) Then
tsilianhe = tsilianhe + Adodc2.Recordset.Fields(14).Value
End If
If Adodc2.Recordset.Fields(12).Value >= 1 Or Adodc2.Recordset.Fields(13).Value >= 1 Or Adodc2.Recordset.Fields(14).Value >= 1 Then
tlianhl = tlianhl + 1
End If
Adodc2.Recordset.MoveNext
Loop
Label2.Caption = Format(tjihe / Adodc2.Recordset.RecordCount, "#.##")
Label3.Caption = Format(touhe / Adodc2.Recordset.RecordCount, "#.##")
Label4.Caption = Format(tdahe / Adodc2.Recordset.RecordCount, "#.##")
Label5.Caption = Format(txiaohe / Adodc2.Recordset.RecordCount, "#.##")
Label6.Caption = Format(tyihe / Adodc2.Recordset.RecordCount, "#.##")
Label7.Caption = Format(terhe / Adodc2.Recordset.RecordCount, "#.##")
Label8.Caption = Format(tsanhe / Adodc2.Recordset.RecordCount, "#.##")
Label9.Caption = Format(tsihe / Adodc2.Recordset.RecordCount, "#.##")
Label10.Caption = Format(tyulinhe / Adodc2.Recordset.RecordCount, "#.##")
Label11.Caption = Format(tyuyihe / Adodc2.Recordset.RecordCount, "#.##")
Label12.Caption = Format(tyuerhe / Adodc2.Recordset.RecordCount, "#.##")
Label13.Caption = terlianhe
Label14.Caption = tsanlianhe
Label15.Caption = tsilianhe
Label16.Caption = Format(tlianhl / Adodc2.Recordset.RecordCount, "##.##%")
End Sub
Private Sub Form_Load()
Adodc2.Refresh
MSHFlexGrid1.ColWidth(0, 0) = 150
MSHFlexGrid1.ColWidth(1, 0) = 780
MSHFlexGrid1.ColWidth(2, 0) = 400
MSHFlexGrid1.ColWidth(3, 0) = 400
MSHFlexGrid1.ColWidth(4, 0) = 400
MSHFlexGrid1.ColWidth(5, 0) = 400
MSHFlexGrid1.ColWidth(6, 0) = 570
MSHFlexGrid1.ColWidth(7, 0) = 570
MSHFlexGrid1.ColWidth(8, 0) = 570
MSHFlexGrid1.ColWidth(9, 0) = 570
MSHFlexGrid1.ColWidth(10, 0) = 560
MSHFlexGrid1.ColWidth(11, 0) = 560
MSHFlexGrid1.ColWidth(12, 0) = 560
MSHFlexGrid1.ColWidth(13, 0) = 560
MSHFlexGrid1.ColWidth(14, 0) = 560
MSHFlexGrid1.ColWidth(15, 0) = 580
MSHFlexGrid1.ColWidth(16, 0) = 1000
MSHFlexGrid1.BackColorFixed = vbCyan
MSHFlexGrid1.BackColorSel = &HFF8080
MSHFlexGrid1.BackColor = &HFF8080
MSHFlexGrid1.Col = 1
MSHFlexGrid1.Sort = 5
HScroll1.max = Picture2.Width - Frame1.Width
VScroll1.max = Picture2.Height - Frame1.Height
HScroll2.max = Picture3.Width - Frame2.Width
VScroll2.max = Picture3.Height - Frame2.Height
HScroll3.max = Picture4.Width - Frame3.Width
VScroll3.max = Picture4.Height - Frame3.Height
Dim i As Integer
Dim j As Integer
For i = 1 To 9
classanly(i, 1) = i - 1
For j = 2 To 5
classanly(i, j) = 0
Next j
Next i
End Sub
Private Sub Form_Paint()
Dim i, j As Integer
For i = 0 To 2
For j = 0 To 4
Me.PaintPicture Picture1.Picture, j * Picture1.Width, i * Picture1.Height, _
Picture1.Width, Picture1.Height
Next j, i
End Sub
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1.Value
End Sub
Private Sub HScroll2_Change()
Picture3.Left = -HScroll2.Value
End Sub
Private Sub HScroll3_Change()
Picture4.Left = -HScroll3.Va
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -