⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gztable.frm

📁 delphi财务管理系统.rar delphi财务管理系统.rar
💻 FRM
📖 第 1 页 / 共 4 页
字号:
 b = Text21.Text
c = a & " Like '" & b & "'"
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
MsgBox "找不到与条件相符的记录", vbOKOnly, "提示信息"
Else
ww = Data1.Recordset("职工编号")

ww = "职工编号 like '" & ww & "'"
Data3.Recordset.FindFirst ww

End If
If Data1.Recordset.BOF Or Data1.Recordset.EOF Then

Data1.Recordset.MoveLast
Data3.Recordset.MoveLast

End If
Exit Sub
a0:
'MsgBox "找不到与条件相符的记录", vbOKOnly, "提示信息"
End Sub

Private Sub Command11_Click()
On Error GoTo a0
Dim ww As String
If Text21.Text = "" Then
MsgBox "请输入查找条件"
Text21.SetFocus
Exit Sub
End If

 Dim a As String, b As String, c As String
 a = Combo5.Text
 b = Text21.Text
 c = a & " Like '" & b & "'"

Data1.Recordset.FindFirst c
If Data1.Recordset.NoMatch Then
MsgBox "找不到与条件相符的记录", vbOKOnly, "提示信息"
Else
ww = Data1.Recordset("职工编号")

ww = "职工编号 like '" & ww & "'"
Data3.Recordset.FindFirst ww

End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
Data3.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
Data3.Recordset.MoveLast
End If
Exit Sub
a0:
'MsgBox "找不到与条件相符的记录", vbOKOnly, "提示信息"
End Sub


Private Sub Command2_Click()

Data3.Recordset.Edit
On Error GoTo a0
If Text6.Text = "" Then
Text6.Text = "0.00"
End If
If Text7.Text = "" Then
Text7.Text = "0.00"
End If
If Text8.Text = "" Then
Text8.Text = "0.00"
End If
If Text9.Text = "" Then
Text9.Text = "0.00"
End If
If Text10.Text = "" Then
Text10.Text = "0.00"
End If
If Text11.Text = "" Then
Text11.Text = "0.00"
End If
If Text12.Text = "" Then
Text12.Text = "0.00"
End If
If Text13.Text = "" Then
Text13.Text = "0.00"
End If
If Text14.Text = "" Then
Text14.Text = "0.00"
End If
If Text15.Text = "" Then
Text15.Text = "0.00"
End If
If Text16.Text = "" Then
Text16.Text = "0.00"
End If
If Text17.Text = "" Then
Text17.Text = "0.00"
End If
If Text18.Text = "" Then
Text18.Text = "0.00"
End If
If Text18.Text = "" Then
Text18.Text = "0.00"
End If
If Text19.Text = "" Then
Text19.Text = "0.00"
End If
msg = MsgBox("确定要更新数据吗", vbQuestion + vbOKCancel, "提示信息")
If msg = vbCancel Then
Data3.Recordset.CancelUpdate
Else
save = 1
Data3.Recordset.Update
End If
Exit Sub
a0:
MsgBox "工资各项数值不能为字符串", vbOKOnly, "提示信息"


End Sub

Private Sub Command3_Click()
On Error GoTo a0
Data3.Recordset.Edit
Data3.Recordset.CancelUpdate
a0:
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Command5_Click()
On Error GoTo a0
Data1.Recordset.MoveFirst
Data3.Recordset.MoveFirst
a0:
End Sub

Private Sub Command6_Click()
On Error GoTo a0
Data1.Recordset.MovePrevious
Data3.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
Data3.Recordset.MoveFirst
Beep
Exit Sub
End If

a0:
End Sub

Private Sub Command7_Click()
On Error GoTo a0
Data1.Recordset.MoveNext
Data3.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
Data3.Recordset.MoveLast
Beep
Exit Sub

End If

a0:
End Sub

Private Sub Command8_Click()
On Error GoTo a0

Data1.Recordset.MoveLast
Data3.Recordset.MoveLast
a0:
End Sub

Private Sub Command9_Click()
On Error GoTo a0
Dim a As String, b As String, c As String, ww As String
If Text21.Text = "" Then
MsgBox "请输入查找条件"
Text21.SetFocus
Exit Sub
End If
 a = Combo5.Text
 b = Text21.Text

c = a & " Like '" & b & "'"
  
Data1.Recordset.FindPrevious c
If Data1.Recordset.NoMatch Then
MsgBox "找不到与条件相符的记录", vbOKOnly, "提示信息"
Else
ww = Data1.Recordset("职工编号")

ww = "职工编号 like '" & ww & "'"
Data3.Recordset.FindFirst ww

End If
If Data1.Recordset.BOF Or Data1.Recordset.EOF Then

Data1.Recordset.MoveFirst
Data3.Recordset.MoveFirst
End If
Exit Sub
a0:
'MsgBox "找不到与条件相符的记录", vbOKOnly, "提示信息"
End Sub

Private Sub Data1_Reposition()
Label22.Caption = "记录总数共<" & Data1.Recordset.RecordCount & ">条"
Label23.Caption = "第<" & Data1.Recordset.AbsolutePosition + 1 & ">条记录"
Label24.Visible = False
Label25.Visible = False
Text20.Visible = False
Line14.Visible = False
Line15.Visible = False
Line16.Visible = False

Line17.Visible = False




End Sub

Private Sub Data1_Validate(Action As Integer, save As Integer)
save = 0
End Sub

Private Sub Data3_Validate(Action As Integer, save As Integer)
save = 0
End Sub

Private Sub Form_Activate()
Dim oldmark
Dim c As String, a As String
Text20.Locked = True
On Error GoTo a0
If Data1.Recordset.RecordCount = 0 Then
Command2.Enabled = False
Command3.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command10.Enabled = False
Command11.Enabled = False
Exit Sub
End If

If Data1.Recordset.RecordCount > 0 Then
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
Else
End If
Label22.Caption = "记录总数共<" & Data1.Recordset.RecordCount & ">条"
Label23.Caption = "第<" & Data1.Recordset.AbsolutePosition + 1 & ">条记录"



a = Data2.Recordset("zgbh")
If a = "" Then
Data1.Recordset.MoveFirst
Data3.Recordset.MoveFirst
Exit Sub
End If
c = " 职工编号 Like '" & a & "'"
Data1.Recordset.FindFirst c
Data3.Recordset.FindFirst c
Data2.Recordset.Edit
Data2.Recordset("zgbh") = ""
Data2.Recordset.Update
If Data3.Recordset.NoMatch Then
MsgBox " 没找到"
'Data3.Recordset.AddNew
'save = 1
'Text1.Locked = False
'Text4.Locked = False
'Text1.Text = Data1.Recordset("职工编号")
'Text4.Text = Data1.Recordset("职工姓名")
'Data3.Recordset("职工编号") = Data1.Recordset("职工编号")
'Data3.Recordset("职工姓名") = Data1.Recordset("职工姓名")
'Data3.Recordset.Update
'Text1.Locked = True
'Text4.Locked = True

save = 0



End If
oldmark = Data1.Recordset.Bookmark
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
Data1.Recordset.Bookmark = oldmark





a0:
Text6.SetFocus
End Sub

Private Sub Form_Load()
Timer1.Interval = 1000
Text1.Locked = True
Text2.Locked = True
Text3.Locked = True
Text4.Locked = True

End Sub

Private Sub Label5_Click()
Dim oldmark
Dim a As Integer, b As Integer, c As String
On Error GoTo a0
a = Year(Date)
b = Month(Date)
Text5.Text = "  " & a & " 年 " & b & " 月"
c = Text5.Text
oldmark = Data3.Recordset.Bookmark
Data3.Recordset.MoveFirst
save = 1
Do Until Data3.Recordset.EOF
Data3.Recordset.Edit
Data3.Recordset("年/月") = c
Data3.Recordset.Update
Data3.Recordset.MoveNext
Loop

save = 0
Data3.Recordset.Bookmark = oldmark

a0:









End Sub

Private Sub mnuclose_Click()
Label19.Visible = False
Combo5.Visible = False
Text21.Visible = False
Command9.Visible = False
Command10.Visible = False
Command11.Visible = False
End Sub

Private Sub mnuexit_Click()
Unload Me

End Sub

Private Sub mnuopen_Click()

Label19.Visible = True
Combo5.Visible = True
Text21.Visible = True
Command9.Visible = True
Command10.Visible = True
Command11.Visible = True
Text21.Text = ""
Combo5.Text = "职工编号"
End Sub

Private Sub mnus_Click()
Dim oldmark, b
Dim a
On Error GoTo a0
Text20.Locked = False
a = 0
oldmark = Data3.Recordset.Bookmark
Data3.Recordset.MoveFirst
Do Until Data3.Recordset.EOF

b = Data3.Recordset("实发工资")

a = a + b

Data3.Recordset.MoveNext

Loop

Data4.Recordset.Edit
Data4.Recordset("工资总额") = a
Data4.Recordset.Update
Data3.Recordset.Bookmark = oldmark

a0:
Label24.Visible = True
Label25.Visible = True
Text20.Visible = True
Line14.Visible = True
Line15.Visible = True
Line16.Visible = True
Line17.Visible = True
Text20.Locked = True

End Sub

Private Sub Timer1_Timer()
Label26.Caption = time
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -