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

📄 frmlatefeeset.frm

📁 一个功能比较完善的远程抄表软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLateFeeSet 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "滞纳金设置"
   ClientHeight    =   4215
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4005
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4215
   ScaleWidth      =   4005
   Begin VB.TextBox txtRate 
      Height          =   330
      Left            =   1695
      TabIndex        =   10
      Top             =   3180
      Width           =   1275
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   420
      Left            =   1560
      TabIndex        =   9
      Top             =   3765
      Width           =   1050
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   420
      Left            =   2730
      TabIndex        =   8
      Top             =   3765
      Width           =   1050
   End
   Begin VB.Frame Frame1 
      Caption         =   "设定收费时间:"
      Height          =   2895
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3750
      Begin VB.PictureBox Picture1 
         BorderStyle     =   0  'None
         Height          =   975
         Left            =   120
         ScaleHeight     =   975
         ScaleWidth      =   3495
         TabIndex        =   13
         Top             =   240
         Width           =   3495
         Begin VB.OptionButton optOnce 
            Caption         =   "每次收费时设定日期"
            Height          =   240
            Left            =   360
            TabIndex        =   15
            Top             =   525
            Width           =   2040
         End
         Begin VB.OptionButton optMonth 
            Caption         =   "每月固定收费日期"
            Height          =   285
            Left            =   360
            TabIndex        =   14
            Top             =   120
            Width           =   1905
         End
      End
      Begin VB.Frame Frame2 
         Height          =   1545
         Left            =   135
         TabIndex        =   1
         Top             =   1215
         Width           =   3480
         Begin VB.TextBox txtOnce 
            Height          =   330
            Left            =   1440
            TabIndex        =   3
            Top             =   810
            Width           =   1410
         End
         Begin VB.VScrollBar vsb 
            Height          =   330
            Left            =   2610
            Max             =   -1
            Min             =   -31
            TabIndex        =   2
            Top             =   270
            Value           =   -1
            Width           =   240
         End
         Begin VB.Label Label1 
            Caption         =   "每月交费日期:"
            Height          =   240
            Left            =   180
            TabIndex        =   7
            Top             =   315
            Width           =   1230
         End
         Begin VB.Label Label4 
            Caption         =   "每次收费日期:"
            Height          =   330
            Left            =   135
            TabIndex        =   6
            Top             =   855
            Width           =   1230
         End
         Begin VB.Label Label5 
            Caption         =   "(格式:2000-12-31)"
            Height          =   285
            Left            =   1350
            TabIndex        =   5
            Top             =   1215
            Width           =   1635
         End
         Begin VB.Label lblDate 
            BorderStyle     =   1  'Fixed Single
            Height          =   330
            Left            =   1440
            TabIndex        =   4
            Top             =   270
            Width           =   1410
         End
      End
   End
   Begin VB.Label Label2 
      Caption         =   "滞纳金费率:"
      Height          =   330
      Left            =   345
      TabIndex        =   12
      Top             =   3225
      Width           =   1050
   End
   Begin VB.Label Label3 
      Caption         =   "%"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   3180
      TabIndex        =   11
      Top             =   3225
      Width           =   420
   End
End
Attribute VB_Name = "frmLateFeeSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/07/09
'描    述:CBB三表户外计量系统 Ver 5.2
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Option Explicit
Dim rcLateFee As Recordset
Dim blnMonth As Boolean
Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    
    Dim SQL As String
    
    On Error GoTo LateFeeErr
    SQL = "delete * from LateFee"
    dbCbb.Execute SQL
    rcLateFee.AddNew
    If optMonth.Value Then
        rcLateFee!LateFeeDate = Trim(lblDate.Caption)
        rcLateFee!LateFeeDay = DateDiff("d", CDate(Year(Date) & "-" & Month(Date) & "-" & Trim(lblDate.Caption)), Date)
        blnMonth = True
    Else
        rcLateFee!LateFeeDay = DateDiff("d", CDate(txtOnce.Text), Date)
        rcLateFee!LateFeeDate = Trim(txtOnce.Text)
        blnMonth = False
    End If
    If txtRate.Text = 0 Then
        rcLateFee!lateFeeRate = 0
    Else
        rcLateFee!lateFeeRate = Format((Val(txtRate.Text)) / 100, "####.##")
    End If
   
    rcLateFee.Update
    
    AppendStatusInfo "滞纳金设置", icoBLUE
    SaveLog "滞纳金设置", 0
    Unload Me
    Exit Sub
LateFeeErr:
    MsgBox "错误的数据格式,请输入一个有效的数值", vbInformation, "错误"
    
End Sub



Private Sub Form_Load()
    
    Dim i As Integer
    If UBound(curForm) > 0 Then
        curForm(UBound(curForm)).Enabled = False
    End If
    ReDim Preserve curForm(UBound(curForm) + 1)
    Set curForm(UBound(curForm)) = Me


    blnMonth = True
    Set rcLateFee = dbCbb.OpenRecordset("LateFee", dbOpenDynaset)
    
    If rcLateFee.RecordCount > 0 Then
        rcLateFee.MoveFirst
        txtRate.Text = rcLateFee!lateFeeRate * 100
            If Len(rcLateFee!LateFeeDate) < 3 Then
                blnMonth = True
                txtOnce.Text = Trim(Format(Date, "yyyy/mm/dd"))
                vsb.Value = Val(-Val(Trim(rcLateFee!LateFeeDate)))
            Else
                blnMonth = False
                txtOnce.Text = Trim(rcLateFee!LateFeeDate)
                vsb.Value = -1
            End If
    Else
        vsb.Value = -1
        txtOnce.Text = Trim(Format(Date, "yyyy/mm/dd"))
        txtRate.Text = "0"
    End If
    
    If blnMonth = False Then
        optOnce.Value = True
    Else
        optMonth.Value = True
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    ReDim Preserve curForm(UBound(curForm) - 1)
    If UBound(curForm) > 0 Then
        curForm(UBound(curForm)).Enabled = True
    End If
End Sub


Private Sub optMonth_Click()
    Label1.Enabled = True
    lblDate.Enabled = True
    Label4.Enabled = False
    Label5.Enabled = False
    txtOnce.Enabled = False
    vsb.Enabled = True
End Sub

Private Sub optOnce_Click()
    Label1.Enabled = False
    lblDate.Enabled = False
    Label4.Enabled = True
    Label5.Enabled = True
    txtOnce.Enabled = True
    vsb.Enabled = False

End Sub


Private Sub txtOnce_GotFocus()
    txtOnce.SetFocus
    txtOnce.SelStart = 0
    txtOnce.SelLength = Len(txtOnce.Text)
End Sub

Private Sub txtOnce_LostFocus()
    If Not IsDate(txtOnce.Text) Then
        MsgBox "无效的日期表达式" + Chr(10) + "格式:""年/月/日""", vbInformation, "错误"
        txtOnce_GotFocus
    End If
End Sub

Private Sub txtRate_GotFocus()
    txtRate.SetFocus
    txtRate.SelStart = 0
    txtRate.SelLength = (Len(txtRate.Text))
End Sub

Private Sub txtRate_LostFocus()
    If Not IsNumeric(txtRate.Text) Then
        MsgBox "错误的数据格式,请输入一个有效的数值", vbInformation, "错误"
        txtRate_GotFocus
    End If
End Sub

Private Sub vsb_Change()
    lblDate.Caption = Abs(vsb.Value)
End Sub

⌨️ 快捷键说明

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