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

📄 frmactive.frm

📁 办公流程定制
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmActive 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Form1"
   ClientHeight    =   3120
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3810
   Icon            =   "frmActive.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3120
   ScaleWidth      =   3810
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame frabk 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      ForeColor       =   &H80000008&
      Height          =   3210
      Left            =   0
      TabIndex        =   0
      Top             =   -90
      Width           =   3795
      Begin VB.CommandButton cmdDel 
         BackColor       =   &H80000009&
         Caption         =   "删除"
         Height          =   330
         Left            =   1890
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   2790
         Width           =   870
      End
      Begin VB.CommandButton cmdAdd 
         BackColor       =   &H80000009&
         Caption         =   "添加"
         Height          =   330
         Left            =   990
         Style           =   1  'Graphical
         TabIndex        =   6
         ToolTipText     =   "添加子条件"
         Top             =   2790
         Width           =   870
      End
      Begin MSFlexGridLib.MSFlexGrid mfgCondition 
         Height          =   2220
         Left            =   0
         TabIndex        =   5
         Top             =   495
         Width           =   3795
         _ExtentX        =   6694
         _ExtentY        =   3916
         _Version        =   393216
         BackColorBkg    =   16777215
         SelectionMode   =   1
         AllowUserResizing=   3
         Appearance      =   0
      End
      Begin VB.CommandButton cmdYes 
         BackColor       =   &H80000009&
         Caption         =   "确定"
         Height          =   330
         Left            =   90
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   2790
         Width           =   870
      End
      Begin VB.CommandButton cmdNo 
         Appearance      =   0  'Flat
         BackColor       =   &H80000009&
         Caption         =   "取消"
         Height          =   330
         Left            =   2790
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   2790
         Width           =   870
      End
      Begin VB.TextBox txtName 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   1080
         TabIndex        =   1
         Top             =   180
         Width           =   2535
      End
      Begin VB.Label lblTitle 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "动作名称:"
         Height          =   180
         Index           =   0
         Left            =   135
         TabIndex        =   2
         Top             =   225
         Width           =   900
      End
   End
End
Attribute VB_Name = "frmActive"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private mvarActLine As clsLine
Public Property Set GetActLine(ByVal vData As Object)
    Set mvarActLine = vData
End Property

Private Sub cmdAdd_Click()
Dim tmpStr As String
Dim i As Integer
    With frmAddCondition
        i = mvarActLine.BeginRect
        frmAddCondition.SetTbName = mvarRect(i).RefAppTable
        Load frmAddCondition
        .Show 1
    End With
End Sub

Private Sub cmdDel_Click()
Dim i, j, k As Integer
    With mfgCondition
        If .Row > 1 Then
            j = .Row
            k = MsgBox("确信要删除" & j & "号条件吗? [是(Y)]完成删除,[否(N)]取消删除。", vbQuestion + vbYesNo + vbDefaultButton2, "删除提示")
            If k = 6 Then
                .RemoveItem j
                For i = j To .Rows - 1
                    .TextMatrix(i, 0) = i
                Next i
            End If
        ElseIf .Rows > 2 And .Row = 1 Then
            k = MsgBox("确信要删除1号条件吗? [是(Y)]完成删除,[否(N)]取消删除。", vbQuestion + vbYesNo + vbDefaultButton2, "删除提示")
            If k = 6 Then
                .RemoveItem 1
                .TextMatrix(1, 6) = ""
                For i = 1 To .Rows - 1
                    .TextMatrix(i, 0) = i
                Next i
            End If
        ElseIf .Row = 1 Then
            k = MsgBox("确信要删除1号条件吗? [是(Y)]完成删除,[否(N)]取消删除。", vbQuestion + vbYesNo + vbDefaultButton2, "删除提示")
            If k = 6 Then
                .Rows = 1
            End If
        End If
    End With
End Sub

Private Sub cmdNo_Click()
    Unload Me
End Sub

Private Sub cmdYes_Click()
Dim i, j As Integer
Dim vData As ConditionStruct
    With txtName
        If Trim$(.Text) = "" Then
            MsgBox "动作名称为空。", vbCritical + vbOKOnly, "错误提示"
            .SetFocus
            Exit Sub
        End If
    End With
    With mvarActLine
        .LineName = Trim$(txtName.Text)
    End With
    With mfgCondition
        i = .Rows
        If i > 1 Then
            mvarActLine.SetCondNum (i - 1)
            For j = 1 To i - 1
                vData.CDS_SubCondId = j
                vData.CDS_CondName = .TextMatrix(j, 1)
                vData.CDS_AppName = .TextMatrix(j, 2)
                vData.CDS_AppField = .TextMatrix(j, 3)
                vData.CDS_OperSignal = .TextMatrix(j, 4)
                vData.CDS_CondValue = .TextMatrix(j, 5)
                vData.CDS_LogicSignal = .TextMatrix(j, 6)
                mvarActLine.SetCondition vData, j
            Next j
        End If
    End With
    Unload Me
End Sub

Private Sub Form_Load()
Dim i, j As Integer
Dim vData As ConditionStruct
Dim tmpStr As String
    txtName.Text = mvarActLine.LineName
    With mfgCondition
        .Cols = 7
        .Rows = 1
        .TextMatrix(0, 1) = "条件名称"
        .TextMatrix(0, 2) = "应用表名称"
        .TextMatrix(0, 3) = "字段名"
        .TextMatrix(0, 4) = "运算符"
        .TextMatrix(0, 5) = "条件值"
        .TextMatrix(0, 6) = "逻辑关系符"
        
        .ColWidth(0) = 200
        .ColWidth(1) = 800
        .ColWidth(2) = 1000
        .ColWidth(3) = 800
        .ColWidth(4) = 600
        .ColWidth(5) = 800
        .ColWidth(6) = 1200
        
        i = mvarActLine.GetCondNum
        For j = 1 To i
            .Rows = j + 1
            vData = mvarActLine.ReturnCondition(j)
            .TextMatrix(j, 0) = vData.CDS_SubCondId
            .TextMatrix(j, 1) = vData.CDS_CondName
            .TextMatrix(j, 2) = vData.CDS_AppName
            .TextMatrix(j, 3) = vData.CDS_AppField
            .TextMatrix(j, 4) = vData.CDS_OperSignal
            .TextMatrix(j, 5) = vData.CDS_CondValue
            .TextMatrix(j, 6) = vData.CDS_LogicSignal
        Next j
        
        If mvarActLine.LineType = 3 Or mvarActLine.LineType = 4 Then
            cmdAdd.Enabled = False
        End If
    End With
End Sub

⌨️ 快捷键说明

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