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

📄 frmmodedit.frm

📁 本系统实现了软件项目开发的流程管理和控制
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmModEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑功能模块信息"
   ClientHeight    =   4035
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5805
   Icon            =   "FrmModEdit.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4035
   ScaleWidth      =   5805
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   3055
      MouseIcon       =   "FrmModEdit.frx":1272
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   3480
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Ok 
      Caption         =   "确 定"
      Height          =   400
      Left            =   1450
      MouseIcon       =   "FrmModEdit.frx":157C
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   3480
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Height          =   3135
      Left            =   240
      TabIndex        =   5
      Top             =   120
      Width           =   5295
      Begin VB.ComboBox ComboEname 
         Height          =   300
         Left            =   1200
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   2700
         Width           =   1575
      End
      Begin VB.TextBox txtDescribe 
         Height          =   1455
         Left            =   1200
         MaxLength       =   20
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   1
         Top             =   1080
         Width           =   3855
      End
      Begin VB.TextBox txtMod 
         Height          =   270
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   0
         Top             =   622
         Width           =   3855
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "负责人"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   2760
         Width           =   540
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "功能描述"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   1095
         Width           =   720
      End
      Begin VB.Label lblUpper 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "上级模块"
         Height          =   180
         Left            =   1200
         TabIndex        =   8
         Top             =   240
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "上级模块"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   7
         Top             =   240
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "模块名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   6
         Top             =   667
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmModEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriUpper As Integer
Public OriId As Integer
Public OriName As String
Public OriEname As String

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  '检查用户数据的有效性
  If Trim(txtMod) = "" Then
    MsgBox "请输入模块名"
    txtMod.SetFocus
    Exit Sub
  End If
  With MyMod
  '判断当前的模块名称是否已经存在
  If Modify = False Or OriName <> Trim(txtMod) Then
    If .In_DB(CurProj.ProjId, MakeStr(txtMod)) = True Then
      MsgBox "模块名称已经存在,请重新输入"
      txtMod.SetFocus
      txtMod.SelStart = 0
      txtMod.SelLength = Len(txtMod)
      Exit Sub
    End If
  End If
  '把用户录入的数据赋值到MyMod对象中
  .Modname = MakeStr(txtMod)
  .ProjId = CurProj.ProjId
  .Describe = MakeStr(txtDescribe)
  .UpperId = OriUpper
  .Ename = ComboEname.Text
  '根据Modify的值决定是插入新数据,还是修改数据
  If Modify = False Then
    .Insert
  Else
    .Update (OriId)
  End If
  End With
  Unload Me
End Sub

Private Sub Form_Load()
  '装入所有的开发工程师姓名
  MyUser.LoadEname (5)
  i = 0
  '把当前工程中的所有工程师姓名添加到ComboEname中
  Do While Arr_Ename(i) <> ""
    If MyTeam.In_DB(CurProj.ProjId, Arr_Ename(i)) = True Then
      ComboEname.AddItem Arr_Ename(i)
    End If
    i = i + 1
  Loop
  '对负责人组合框进行初始化
  If OriEname = "" Then
    If ComboEname.ListCount > 0 Then
      ComboEname.ListIndex = 0
    End If
  Else
    If InCombo(OriEname, ComboEname) = True Then
      ComboEname.Text = OriEname
    End If
  End If
End Sub

⌨️ 快捷键说明

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