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

📄 frmpuboanewgt.frm

📁 一个OA办公自动化管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPubOANewGT 
   Caption         =   "63"
   ClientHeight    =   2850
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4785
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2850
   ScaleWidth      =   4785
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdDel 
      Caption         =   "13"
      Height          =   375
      Left            =   2400
      TabIndex        =   6
      Top             =   1920
      Width           =   975
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "32"
      Height          =   375
      Left            =   1260
      TabIndex        =   5
      Top             =   1920
      Width           =   975
   End
   Begin VB.TextBox txtExplain 
      Height          =   315
      Left            =   1140
      TabIndex        =   3
      Top             =   1020
      Width           =   3195
   End
   Begin VB.CommandButton cmdNo 
      Caption         =   "18"
      Height          =   375
      Left            =   3420
      TabIndex        =   2
      Top             =   1920
      Width           =   975
   End
   Begin VB.CommandButton cmdNew 
      Caption         =   "15"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   1920
      Width           =   1035
   End
   Begin VB.TextBox txtNew 
      Height          =   315
      Left            =   1140
      TabIndex        =   0
      Top             =   420
      Width           =   3195
   End
   Begin VB.Label Label1 
      Caption         =   "600"
      Height          =   195
      Left            =   240
      TabIndex        =   7
      Top             =   420
      Width           =   675
   End
   Begin VB.Label Label2 
      Caption         =   "65"
      Height          =   195
      Left            =   240
      TabIndex        =   4
      Top             =   1080
      Width           =   675
   End
End
Attribute VB_Name = "frmPubOANewGT"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub SSTab1_DblClick()

End Sub

Private Sub CmdDel_Click()
    Dim rstOAGroup As Recordset
    If MsgBox("确要删除吗?", vbYesNo, "权限管理") = vbYes Then
    
        Set rstOAGroup = New Recordset
        rstOAGroup.Open "Delete  From pubCustomgroup where GroupID='" & Me.txtNew.Text & "' and isSys=1", GetCNClient, adOpenStatic, adLockOptimistic
        Me.txtNew.Text = ""
        Me.txtExplain.Text = ""
        Unload Me
    End If
End Sub

Private Sub cmdNew_Click()
    Me.txtNew.Text = ""
    Me.txtExplain.Text = ""

End Sub

Private Sub cmdNo_Click()
    Unload Me
End Sub

Private Sub CmdOk_Click()
On Error GoTo Err_cmdOK
    Dim rstOAGroup As Recordset
    Set rstOAGroup = New Recordset
    rstOAGroup.Open "Select * From pubCustomgroup where GroupID='" & Me.txtNew.Text & "' ", GetCNClient, adOpenStatic, adLockOptimistic
    With rstOAGroup
        If .EOF And Me.txtNew.Text <> "" And Me.txtExplain.Text <> "" Then
            .AddNew
            ![GroupID] = Me.txtNew.Text
            ![Explain] = Me.txtExplain.Text
            .Update
            MisMsg "新增成功!"
            Unload Me
        Else
            MisMsg "该群组已存在,请重新输入。"
        End If
    End With
    
    Exit Sub
Err_cmdOK:
    MisMsg "cmdOK Error : " & Err.Description
    Exit Sub
End Sub

Private Sub Form_Load()
On Error GoTo Err_form_Load
    Me.Caption = LoadResString(Val(Me.Caption & GLanguageID))
    GGetRes GLanguageID, Me
    If PubOAParentKey = "OAAdmin" Then
        iniGroup
    End If
    
    Exit Sub
Err_form_Load:
    MisMsg "Form_Load Error:" & Err.Description
    Exit Sub
    End Sub

Private Sub iniGroup()
On Error GoTo Err_iniGroup
    Dim rstOAGroup As Recordset
    Set rstOAGroup = New Recordset
    rstOAGroup.Open "Select * From pubOAgroup where GroupID='" & PubOAKey & "'", GetCNClient, adOpenForwardOnly
    With rstOAGroup
        If Not .EOF Then
            Me.txtNew.Text = ![GroupID]
            Me.txtExplain.Text = ![Explain]
        Else
            Me.txtNew.Text = ""
            Me.txtExplain.Text = ""
        End If
    End With
    
    Exit Sub
Err_iniGroup:
    MisMsg "iniGroup Error : " & Err.Description
    Exit Sub
End Sub

Private Sub Form_Unload(Cancel As Integer)
    PubOAKey = ""
    PubOAParentKey = ""
End Sub

⌨️ 快捷键说明

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