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

📄 frmtax.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmTax 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "新增个人所得税扣税标准"
   ClientHeight    =   2265
   ClientLeft      =   2220
   ClientTop       =   2310
   ClientWidth     =   5340
   HelpContextID   =   10238
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2265
   ScaleWidth      =   5340
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txtTaxType 
      Height          =   285
      Index           =   3
      Left            =   1800
      TabIndex        =   7
      Top             =   1650
      Width           =   1905
   End
   Begin VB.TextBox txtTaxType 
      Height          =   285
      Index           =   2
      Left            =   1800
      TabIndex        =   5
      Top             =   1230
      Width           =   1905
   End
   Begin VB.TextBox txtTaxType 
      Height          =   285
      Index           =   1
      Left            =   1800
      TabIndex        =   3
      Text            =   "0"
      Top             =   810
      Width           =   1905
   End
   Begin VB.TextBox txtTaxType 
      Height          =   285
      Index           =   0
      Left            =   1800
      MaxLength       =   20
      TabIndex        =   1
      Top             =   330
      Width           =   1905
   End
   Begin VB.CommandButton cmdNext 
      Height          =   350
      Left            =   4000
      Style           =   1  'Graphical
      TabIndex        =   10
      Tag             =   "1009"
      Top             =   1050
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Height          =   350
      Left            =   4000
      Style           =   1  'Graphical
      TabIndex        =   9
      Tag             =   "1002"
      Top             =   600
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdOk 
      Height          =   350
      Left            =   4000
      Style           =   1  'Graphical
      TabIndex        =   8
      Tag             =   "1001"
      Top             =   150
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.Label lblTax 
      Caption         =   "元"
      Height          =   255
      Index           =   6
      Left            =   3030
      TabIndex        =   13
      Top             =   1260
      Width           =   255
   End
   Begin VB.Label lblTax 
      Caption         =   "%"
      Height          =   255
      Index           =   5
      Left            =   3480
      TabIndex        =   12
      Top             =   1770
      Width           =   255
   End
   Begin VB.Label lblTax 
      Caption         =   "扣除金额内税率(&T)"
      Height          =   255
      Index           =   4
      Left            =   270
      TabIndex        =   6
      Top             =   1680
      Width           =   1575
   End
   Begin VB.Label lblTax 
      Caption         =   "扣除金额(&A)"
      Height          =   255
      Index           =   3
      Left            =   270
      TabIndex        =   4
      Top             =   1245
      Width           =   1215
   End
   Begin VB.Label lblTax 
      Caption         =   "元"
      Height          =   195
      Index           =   2
      Left            =   3480
      TabIndex        =   11
      Top             =   885
      Width           =   195
   End
   Begin VB.Label lblTax 
      Caption         =   "起征金额(&S)"
      Height          =   255
      Index           =   1
      Left            =   270
      TabIndex        =   2
      Top             =   795
      Width           =   1485
   End
   Begin VB.Label lblTax 
      Caption         =   "扣税标准名称(&N)"
      Height          =   255
      Index           =   0
      Left            =   270
      TabIndex        =   0
      Top             =   360
      Width           =   1485
   End
End
Attribute VB_Name = "frmTax"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'                                                                        '
'功能:    完成个人所得税扣税标准的增、删、改。                           '
'卡片接口:             EditCard 参数: lngID 记录的ID号                   '
'作用:                         LNGID为零是增加记录、其它为编辑记录       '
'                   DelCard 参数: lngID 记录的ID号                       '
'作用:                          删除ID号为LNGID的记录                    '
'作者:     冉升                                                                  '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''



Option Explicit

Private mstrTaxName As String
Private mdblStart As Double
Private mdblDeductAmount As Double
Private mdblStartTaxRate As Double
Private mblnIsList As Boolean
Private mblnIsNew As Boolean
Private mblnIsChanged As Boolean
Private mlngTaxID As Integer
Private mblnIsFirst As Boolean

Public Property Get getID()
    getID = mlngTaxID
End Property

Private Sub Form_Activate()
    SetHelpID Me.HelpContextID
End Sub

'Private Sub Form_Activate()
'
''  txtTaxType(0).SelStart = 0
''  txtTaxType(0).SelLength = StrLen(txtTaxType(0).Text)
''  txtTaxType(0).SetFocus
'End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If mblnIsList Then
        mblnIsList = False
        Exit Sub
    End If
    If KeyAscii = vbKeyReturn Then
        BKKEY Me.ActiveControl.hwnd, vbKeyTab
    End If
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn And Shift = 2 Then
        cmdOk.Value = True
    End If
End Sub

Private Sub Form_Load()
        On Error GoTo ErrHandle
'        SetHelpID Me.hwnd, 10238
        mblnIsChanged = False
        Utility.LoadFormResPicture Me
'        SendKeys "%{N}"
        Exit Sub
    Dim edtErrReturn As ErrDealType
ErrHandle:
    edtErrReturn = Errors.ErrorsDeal
    
    If edtErrReturn = edtResume Then
         Resume
    Else
         On Error Resume Next
         Unload Me
    End If
End Sub

Private Sub Form_Paint()
  FrameBox Me.hwnd, 150, 150, 3850, 2110
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
     Dim intResponse As Integer
     
        If UnloadMode = vbFormControlMenu And mblnIsChanged Then
            intResponse = ShowMsg(0, "当前个人所得税扣税标准已被修改,是否保存?", _
                         vbYesNoCancel + vbQuestion + MB_TASKMODAL, Caption)
            If intResponse = vbYes Then
               Cancel = Not SaveCard()
            ElseIf intResponse = vbCancel Then
               Cancel = True
            End If
        End If
        If Not Cancel Then mblnIsChanged = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
    On Error Resume Next
    Utility.UnLoadFormResPicture Me
    mblnIsFirst = False
End Sub

Private Sub CmdCancel_Click()
  Unload Me
End Sub

Private Sub cmdNext_Click()
     If Not SaveCard() Then
        Exit Sub
     End If
     mlngTaxID = 0
     InitCard
     txtTaxType(0).SetFocus
End Sub

Private Sub cmdOK_Click()
    If SaveCard Then
       Unload Me
    End If
End Sub

Public Function AddCard(Optional strName As String = "", Optional intModal As Integer = 0, _
    Optional ByVal IsList As Boolean = False) As Long
    mblnIsFirst = True
    mlngTaxID = 0
    mblnIsNew = True
    mblnIsList = IsList
    InitCard strName
    Show vbModal
    AddCard = mlngTaxID
End Function

Public Sub EditCard(ByVal lngID As Long, Optional intModal As Integer = 0)
    mblnIsFirst = True
    If Not CheckIDUsed("PersonTaxType", "lngPersonTaxTypeID", lngID) Then
        ShowMsg 0, "该个人所得税扣税标准不存在,不能进行修改!", _
                  vbExclamation + MB_TASKMODAL, Caption
        Unload Me
    Else
        mlngTaxID = lngID
        mblnIsNew = False

⌨️ 快捷键说明

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