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

📄 frmsalarylistname.frm

📁 金算盘软件代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSalaryListname 
   Caption         =   "栏目名称"
   ClientHeight    =   1650
   ClientLeft      =   2220
   ClientTop       =   1950
   ClientWidth     =   4245
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1650
   ScaleWidth      =   4245
   Begin VB.Frame Frame1 
      Height          =   1215
      Left            =   50
      TabIndex        =   3
      Top             =   160
      Width           =   3015
      Begin VB.TextBox txtListName 
         Height          =   270
         Left            =   120
         TabIndex        =   0
         Top             =   600
         Width           =   2775
      End
      Begin VB.Label lblListname 
         Caption         =   "请输入栏目名称:"
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   240
         Width           =   1575
      End
   End
   Begin VB.CommandButton cmdListName 
      Height          =   375
      Index           =   1
      Left            =   3120
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   240
      UseMaskColor    =   -1  'True
      Width           =   1095
   End
   Begin VB.CommandButton cmdListName 
      Cancel          =   -1  'True
      Height          =   375
      Index           =   0
      Left            =   3120
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   630
      UseMaskColor    =   -1  'True
      Width           =   1095
   End
End
Attribute VB_Name = "frmSalaryListname"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'工资录入栏目
'
'功能:保存当前栏目设置,并设置当前栏目设置的名称
'
'作者:唐吉禹
'
'1998-7-8
'
Option Explicit
Private Sub cmdListName_Click(Index As Integer)
    Dim lngListID As Long
    Dim recList As Recordset
    Dim strSql As String
    Dim strField As String
    Dim lngOperatorID As Long
    Dim lngSalaryViewID As Long
    Select Case Index
    Case 0
        Unload Me
    Case 1
        '取出ListID
        If Trim(txtListName.Text) = "" Then
            ShowMsg Me.hwnd, "栏目名称不能为空", vbInformation, Me.Caption
            Exit Sub
        End If
        lngListID = frmSalaryEdit.ListID
        lngOperatorID = frmSalaryEdit.OperatorID
        lngSalaryViewID = frmSalaryList.SalaryViewID
        strField = frmSalaryEdit.strField
        '取出工资表的List
        Set recList = gclsBase.BaseDB.OpenRecordset("SELECT * FROM List WHERE lngViewID=" & lngSalaryViewID, dbOpenDynaset)
        recList.FindFirst "strListName='" & txtListName.Text & "'"
        If recList.NoMatch And Trim(txtListName.Text) <> "保存栏目" Then
            '将List表中当前操作员ID置为0
            strSql = "UPDATE List SET lngOperatorID=0 WHERE lngViewID=" & lngSalaryViewID _
                & " AND lngOperatorID=" & lngOperatorID
            gclsBase.BaseDB.Execute strSql
            '将List表中当前ListID对应的操作员ID置为当前操作员ID
            strSql = "UPDATE List SET lngOperatorID=" & lngOperatorID & ",strListName= '" & Trim(txtListName.Text) _
                & "' WHERE lngListID=" _
                & lngListID
            gclsBase.BaseDB.Execute strSql
            frmSalaryEdit.ItemSet = False
            frmSalaryEdit.ListID = -1
            frmSalaryEdit.ListName = Trim(txtListName.Text)
            Unload Me
        Else
            ShowMsg Me.hwnd, "工资栏目名称重复", vbInformation, "工资发放"
        End If
    End Select
End Sub
Private Sub Form_Load()
    Set cmdListName(0).Picture = Utility.GetFormResPicture(1002, 0)
    Set cmdListName(1).Picture = Utility.GetFormResPicture(1015, 0)
    Set Me.Icon = Utility.GetFormResPicture(139, vbResCursor)
End Sub
Private Sub Form_Unload(Cancel As Integer)
    Utility.RemoveFormResPicture (139)
    Set frmSalaryListname = Nothing
End Sub

Private Sub txtListName_Change()
    If ContainErrorChar(txtListName.Text, "`~!@#$%^*&'<>+-.;,?|") Then BKKEY txtListName.hwnd
End Sub

⌨️ 快捷键说明

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