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

📄 银行存款.frm

📁 财务信息管理系统,适合做毕业论文的人使用
💻 FRM
📖 第 1 页 / 共 5 页
字号:
       If Not oV.Add(oVd) Then Err = 0: Exit Sub 'cuidong 2001.08.24
   Else
       'oV.edit oVd, rsTckd.Fields!cSavID                               'cuidong 2001.08.24
       If Not oV.Edit(oVd, rsTckd.Fields!cSavID) Then Err = 0: Exit Sub 'cuidong 2001.08.24
   End If
   rsTckd.Requery
'''      rsTckd.MoveFirst
      rsTckd.Find "cSavID='" & bh & "'"
      Editbh.Text = Right(bh, 8)

    isSave = True
    IsNew = False
    Label1(19).Caption = zjLogInfo.cUserName
End Sub
' 根据单据属性,置工具栏按钮、参照属性
Private Sub ckdbutt()
    Dim czk As Boolean
    If Label1(15).Caption = "" Then
        If rsTckd.EOF And (Not IsNew) Then
            czk = False
            isFh = False
        Else
            czk = True
            isFh = False
            If isSave Then
                If oV.hasMadePZ(IIf(djnwb = 1, "01", "03") & Editbh.Text) Then
                    isFh = True
                End If
            End If
        End If
        but_ctrl Not isFh, czk
    Else
        isFh = True
        czk = True
        but_ctrl False
    End If
    Editbh.Locked = Not IsNew
    Editrq.Locked = isFh
    Edityhmc.Locked = isFh
    Edityhzh.Locked = isFh
    Editje(0).Locked = isFh
    Editje(1).Locked = isFh Or Textbb.Text = ZjAccInfo.zjStandExch
    Option1(0).Enabled = Not isFh And czk
    Option1(1).Enabled = Not isFh And czk
      
    Editmonth.Locked = isFh
    Editjbr.Locked = isFh
    Editzy.Locked = isFh
'''''    Pagezt Tlbckd, rsTckd, IsNew Or Not isSave
    Frtin = True
    If Not IsNew And isSave Then
        On Error Resume Next
        Editbh.Visible = False
        If Editbh.Text = "" Then
            Combo1.Clear
        Else
            Combo1.Text = Editbh.Text
            If Err.Number = 383 Then
                Combo1.AddItem Editbh.Text
                Combo1.Text = Editbh.Text
            End If
        End If
        Combo1.Visible = True
    Else
        Editbh.Visible = True
        If isSave And IsNew Then
            Editbh.SetFocus
        End If
        Combo1.Visible = False
    End If
    Frtin = False
    
      oV.setPageState Tlbckd, Combo1, IsNew Or Not isSave
End Sub

Private Sub but_ctrl(Fhbz As Boolean, Optional czk As Boolean)
    If Fhbz Then
        Dim tbn As Boolean
        Emptyckd czk, czk
        tbn = (Not rsTckd.EOF) And isSave And (Not IsNew)
        Tlbckd.Buttons("Preview").Enabled = tbn
        Tlbckd.Buttons("Print").Enabled = tbn
        Tlbckd.Buttons("Dataout").Enabled = tbn
        Tlbckd.Buttons("SaveRecord").Enabled = Not isSave
        Tlbckd.Buttons("DeleteRecord").Enabled = (Not rsTckd.EOF) Or IsNew
        Tlbckd.Buttons("CopyRecord").Enabled = tbn Or IsNew And Djcopy(0) <> ""
        If Checkqx Then
            Tlbckd.Buttons("Check").Enabled = tbn
            Tlbckd.Buttons("CheckCancel").Enabled = tbn
        End If
        Tlbckd.Buttons("PingZheng").Enabled = tbn
    Else
        Emptyckd True, False
        Tlbckd.Buttons("Preview").Enabled = True
        Tlbckd.Buttons("Print").Enabled = True
        Tlbckd.Buttons("Dataout").Enabled = True
        Tlbckd.Buttons("SaveRecord").Enabled = False
        Tlbckd.Buttons("DeleteRecord").Enabled = False
        Tlbckd.Buttons("CopyRecord").Enabled = True
        If Checkqx Then
            Tlbckd.Buttons("Check").Enabled = True
            Tlbckd.Buttons("CheckCancel").Enabled = True
        End If
        Tlbckd.Buttons("PingZheng").Enabled = True
    End If
End Sub
' 置所有可获得焦点控件属性
Private Sub Emptyckd(fsk As Boolean, cmdfs As Boolean)
    Option1(0).Enabled = fsk
    Option1(1).Enabled = fsk
    Editbh.Enabled = fsk
    Editrq.Enabled = fsk
    Edityhmc.Enabled = fsk
    Edityhzh.Enabled = fsk
    Editzy.Enabled = fsk
    Editje(0).Enabled = fsk
    Editje(1).Enabled = fsk
    
    Editmonth.Enabled = IIf(fsk, Option1(0).Value, fsk)
    UpDown1.Enabled = Editmonth.Enabled
    Editjbr.Enabled = fsk
    
    Refyhzh.Enabled = cmdfs
    RefYhmc.Enabled = cmdfs
    cmdrq.Enabled = cmdfs
End Sub
 ' 初始化所有TEXT控件
Private Sub Textqk()
    Frtin = True
    Editrq.Text = Format(zjLogInfo.curDate, "yyyy-mm-dd")           '日期赋初始值
    Editbh.Text = ""
    Edityhmc.Text = ""
    Edityhzh.Text = ""
    Textlldm.Text = ""
    Editzy.Text = ""
    Textbb.Text = ""
    Editje(0).Text = ""
    Textje.Text = ""
    Editje(1).Text = ""
    
    Editmonth.Text = ""
    Editjbr.Text = ""
    Label1(15).Caption = ""
    Label1(17).Caption = ""
    Label1(19).Caption = ""
    isSave = True
    IsNew = False
    Frtin = False
End Sub
' 删除单据
Private Sub Ckddele()
    On Error Resume Next
    If Not IsNew And IsNull(rsTckd!cCheckCode) Then
'''        rsTckd.Delete
      oV.Delete rsTckd.Fields!cSavID
      rsTckd.Requery
    End If
    isSave = True
    IsNew = False
End Sub
' 单据翻页
Private Sub Getckd(zt As Integer, bhk As String)
    On Error GoTo reqer3
    If rsTckd Is Nothing Then
'''reqer3: Set rsTckd = dbsZJ.OpenRecordset("select * from FD_Sav where cSavid like '" & IIf(djnwb = 1, "01", "03") & "*' and isnull(CbookCode) order by csavid", dbOpenDynaset)
reqer3: Set rsTckd = oV.getUnBookRst

    Else
        rsTckd.Requery
    End If
    With rsTckd
        If .EOF Then
            Textqk
            Exit Sub
        Else
            .MoveLast
        End If
    End With
    Select Case zt
        Case Is = 1
            rsTckd.MoveFirst
        Case Is = 2
            With rsTckd
                FindFirst rsTckd, "csavid >= '" & IIf(djnwb = 1, "01", "03") & bhk & "'"
                If .EOF Then
                    .MoveLast
                Else
                    .MovePrevious
                    If .BOF Then
                        .MoveNext
                    End If
                End If
            End With
        Case Is = 3
            With rsTckd
                FindFirst rsTckd, "csavid > '" & IIf(djnwb = 1, "01", "03") & bhk & "'"
                If .EOF Then
                    .MoveLast
                End If
            End With
        Case Is = 4
            rsTckd.MoveLast
    End Select
    Carddata
End Sub
' 单据复核
Private Sub Check(mCount As String)
    Dim id As Integer, CurBookMark As String
    On Error GoTo er1
    Select Case mCount
        Case "One":
            Label1(15).Caption = IIf(IsNull(rsTckd![cCheckCode]), "", rsTckd![cCheckCode])
            If Label1(15).Caption <> "" Then
                Beep
                MsgBox "对不起,这张单子已被审核过!", vbOKOnly + vbInformation, zjGl_Name
            Else
                If zjLogInfo.cUserName = Label1(19) Then
                    Beep
                    MsgBox "审核与制单不能为同一人!", vbInformation, zjGl_Name
                Else
''''                    With rsTckd
''''                        .edit
''''                        ![cCheckCode] = zjLogInfo.cUserName
''''                        .Update
''''                    End With
                        oV.editChecker zjLogInfo.cUserName, rsTckd.Fields!cSavID
                    Label1(15).Caption = zjLogInfo.cUserName
                End If
            End If
            
        Case "All":
            With rsTckd
                .MoveFirst
                While Not .EOF
                    If IsNull(![cCheckCode]) Then
                        If ![cBillCode] <> zjLogInfo.cUserName Then
''''                            .edit
''''                            ![cCheckCode] = zjLogInfo.cUserName
''''                            .Update
                              oV.editChecker zjLogInfo.cUserName, rsTckd.Fields!cSavID
                        End If
                    End If
                    .MoveNext
                Wend
            End With
    End Select
er1:
'    Getckd 3, Right(str(100000001 + Editbh.Text), 8) 'Cuidong 2000.12.5
    Getckd 3, Right(str(100000000 + Editbh.Text), 8)  'Cuidong 2000.12.5
    ckdbutt
End Sub
' 已复核单据取消复核
Private Sub UnCheck(mCount As String)
    Dim CurBookMark As String, id As Integer
    On Error GoTo er1
    Select Case mCount
        Case "One":
            If Label1(15).Caption <> "" Then
                If zjLogInfo.cUserName = Label1(15).Caption Then
''''                    With rsTckd
''''                        .edit
''''                        ![cCheckCode] = Null
''''                        .Update
''''                    End With
                  oV.editChecker Null, rsTckd.Fields!cSavID
                Else
                    Beep
                    MsgBox "已复核单据,只能由复核人本人取消复核!", vbInformation, zjGl_Name
                End If
            End If
        Case "All":
            With rsTckd
                .MoveFirst
                While Not .EOF
                    If Not IsNull(![cCheckCode]) Then
                        If zjLogInfo.cUserName = ![cCheckCode] Then
'''''                            .edit
'''''                            ![cCheckCode] = Null
'''''                            .Update
                              oV.editChecker Null, rsTckd.Fields!cSavID
                        End If
                    End If
                    .MoveNext
                Wend
            End With
    End Select
er1:
   ' Getckd 3, Right(str(100000001 + Editbh.Text), 8) 'Cuidong 2000.12.5
    Getckd 3, Right(str(100000000 + Editbh.Text), 8) 'Cuidong 2000.12.5
    ckdbutt
End Sub
'定期存款,存期增1
Private Sub UpDown1_DownClick()
    If isFh Then
        Exit Sub
    End If
    Dim mon As Integer
    If IsNumeric(Editmonth.Text) Then
        mon = CInt(Editmonth.Text)
    Else
        mon = 0
    End If
    If 1 + mon > 2 Then
        Editmonth.Text = mon - 1
    End If
End Sub
'定期存款,存期减1
Private Sub UpDown1_UpClick()
    If isFh Then
        Exit Sub
    End If
    Dim mon As Integer
    If IsNumeric(Editmonth.Text) Then
        mon = CInt(Editmonth.Text)
    Else
        mon = 0
    End If
    If mon < 999 Then
        Editmonth.Text = mon + 1
    End If
End Sub

Private Sub Tbr_Change()
    If Frtin Then
        Exit Sub
    End If
    If isSave Then
        Tlbckd.Buttons("Preview").Enabled = False
        Tlbckd.Buttons("Print").Enabled = False
        Tlbckd.Buttons("Dataout").Enabled = False
        Tlbckd.Buttons("SaveRecord").Enabled = True
        Tlbckd.Buttons("CopyRecord").Enabled = False
        Tlbckd.Buttons("FirstPage").Enabled = False
        Tlbckd.Buttons("PriorPage").Enabled = False
        Tlbckd.Buttons("NextPage").Enabled = False
        Tlbckd.Buttons("LastPage").Enabled = False
        If Checkqx Then
            Tlbckd.Buttons("Check").Enabled = False
            Tlbckd.Buttons("CheckCancel").Enabled = False
        End If
        Tlbckd.Buttons("PingZheng").Enabled = False
        If Not IsNew Then
            Tlbckd.Buttons("DeleteRecord").Image = "RestoreRecord"
            Tlbckd.Buttons("DeleteRecord").Caption = "恢复"
            Tlbckd.Buttons("DeleteRecord").ToolTipText = "Ctrl+R"
        End If
        Combo1.Visible = False
        Editbh.Visible = True
        isSave = False
    End If
End Sub

Private Sub Setdjcopy(fsk As Boolean)
    If fsk Then
        Frtin = True
        Option1(0).Value = IIf(Djcopy(7) = "1", True, False)
        Option1(1).Value = IIf(Djcopy(7) = "1", False, True)
        Edityhzh.Text = Djcopy(0)
        Editje(0).Text = Djcopy(1)
        Editje(1).Text = Djcopy(2)
        Editzy.Text = Djcopy(3)
        Editmonth.Text = Djcopy(4)
        Editjbr.Text = Djcopy(5)
        Edityhmc.Text = Djcopy(6)
        Textje.Text = Djcopy(8)
        Textbb.Text = Djcopy(9)
        Textlldm.Text = Djcopy(10)
        Frtin = False
        isSave = False
    Else
        Djcopy(0) = Edityhzh.Text
        Djcopy(1) = Editje(0).Text
        Djcopy(2) = Editje(1).Text
        Djcopy(3) = Editzy.Text
        Djcopy(4) = Editmonth.Text
        Djcopy(5) = Editjbr.Text
        Djcopy(6) = Edityhmc.Text
        Djcopy(7) = IIf(Option1(0).Value, "1", "")
        Djcopy(8) = Textje.Text
        Djcopy(9) = Textbb.Text
        Djcopy(10) = Textlldm.Text
    End If
End Sub

⌨️ 快捷键说明

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