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

📄 frmbugedit.frm

📁 软件项目管理的基本功能
💻 FRM
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmBugEdit 
   Caption         =   "编辑软件缺陷信息"
   ClientHeight    =   5700
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6780
   LinkTopic       =   "Form1"
   ScaleHeight     =   5700
   ScaleWidth      =   6780
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "取 消"
      Height          =   495
      Left            =   4080
      TabIndex        =   17
      Top             =   4920
      Width           =   1335
   End
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Height          =   495
      Left            =   1440
      TabIndex        =   16
      Top             =   4920
      Width           =   1335
   End
   Begin VB.TextBox txtSDetail 
      Height          =   810
      Left            =   1560
      MultiLine       =   -1  'True
      TabIndex        =   14
      Top             =   3840
      Width           =   4455
   End
   Begin VB.TextBox txtPoster 
      Height          =   330
      Left            =   4560
      TabIndex        =   12
      Top             =   1695
      Width           =   1455
   End
   Begin VB.TextBox txtName 
      Height          =   330
      Left            =   1560
      TabIndex        =   3
      Top             =   165
      Width           =   4455
   End
   Begin VB.TextBox txtDate 
      Height          =   330
      Left            =   1560
      TabIndex        =   2
      Top             =   1695
      Width           =   1695
   End
   Begin VB.TextBox txtDetail 
      Height          =   735
      Left            =   1560
      TabIndex        =   1
      Top             =   2280
      Width           =   4455
   End
   Begin MSDataListLib.DataCombo dco_SType 
      Height          =   330
      Left            =   4560
      TabIndex        =   0
      Top             =   1185
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSComCtl2.DTPicker dt_Date 
      Height          =   330
      Left            =   1560
      TabIndex        =   4
      Top             =   3255
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   582
      _Version        =   393216
      Format          =   20774912
      CurrentDate     =   38247
   End
   Begin MSAdodcLib.Adodc AdoModule 
      Height          =   330
      Left            =   0
      Top             =   2520
      Visible         =   0   'False
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "AdoModule"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataListLib.DataCombo dco_Module 
      Height          =   330
      Left            =   1560
      TabIndex        =   18
      Top             =   1185
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc AdoSType 
      Height          =   330
      Left            =   3720
      Top             =   3240
      Visible         =   0   'False
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "AdoSType"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataListLib.DataCombo dco_Pro 
      Height          =   330
      Left            =   1560
      TabIndex        =   19
      Top             =   675
      Width           =   4455
      _ExtentX        =   7858
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc AdoPro 
      Height          =   330
      Left            =   120
      Top             =   2880
      Visible         =   0   'False
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "AdoPro"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "缺陷名称"
      Height          =   180
      Left            =   600
      TabIndex        =   15
      Top             =   240
      Width           =   720
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "创 建 人"
      Height          =   180
      Left            =   3600
      TabIndex        =   13
      Top             =   1770
      Width           =   720
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "解决方案"
      Height          =   180
      Left            =   600
      TabIndex        =   11
      Top             =   3855
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "项目名称"
      Height          =   180
      Left            =   600
      TabIndex        =   10
      Top             =   750
      Width           =   720
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "项目模块"
      Height          =   180
      Left            =   600
      TabIndex        =   9
      Top             =   1260
      Width           =   720
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "创建日期"
      Height          =   180
      Left            =   600
      TabIndex        =   8
      Top             =   1770
      Width           =   720
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "解决日期"
      Height          =   180
      Left            =   600
      TabIndex        =   7
      Top             =   3330
      Width           =   720
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "缺陷级别"
      Height          =   180
      Left            =   3600
      TabIndex        =   6
      Top             =   1260
      Width           =   720
   End
   Begin VB.Label Label14 
      AutoSize        =   -1  'True
      Caption         =   "缺陷描述"
      Height          =   180
      Left            =   600
      TabIndex        =   5
      Top             =   2280
      Width           =   720
   End
End
Attribute VB_Name = "FrmBugEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriBugId As Long
Public OriProId As Long

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  If Len(Trim(txtName)) = 0 Then
    MsgBox "请输入缺陷题目"
    txtName.SetFocus
    Exit Sub
  End If
  If Len(Trim(dco_Pro.Text)) = 0 Then
    MsgBox "请选择项目"
    dco_Pro.SetFocus
    Exit Sub
  End If
  If Len(Trim(dco_Module.Text)) = 0 Then
    MsgBox "请选择项目模块"
    dco_Module.SetFocus
    Exit Sub
  End If
  If Len(Trim(dco_SType.Text)) = 0 Then
    MsgBox "请选择缺陷级别"
    dco_SType.SetFocus
    Exit Sub
  End If
  If Len(Trim(txtDetail)) = 0 Then
    MsgBox "请输入缺陷描述"
    txtDetail.SetFocus
    Exit Sub
  End If
  With MyBug
    .BugTitle = Trim(txtName)
    .ModuleId = dco_Module.BoundText()
    .LevelId = dco_SType.BoundText()
    .CreateDate = Trim(txtDate)
    .Poster = Trim(txtPoster)
    .BugDetail = Trim(txtDetail)
    .SolveDate = Trim(dt_Date.Value)
    .SolveDetail = Trim(txtSDetail)
    If Modify Then
      .Update (OriBugId)
      MsgBox "修改成功"
    Else
      .Insert
      MsgBox "添加成功"
    End If
  End With
  Unload Me
End Sub

Private Sub dco_Pro_Click(Area As Integer)
  If Len(Trim(dco_Pro.Text)) = 0 Then
    Exit Sub
  End If
  '装入模块信息
  AdoModule.ConnectionString = Conn
  AdoModule.RecordSource = "Select * From Modules Where ProId=" + Trim(dco_Pro.BoundText()) + " Order By ProId"
  AdoModule.Refresh
  Set dco_Module.RowSource = AdoModule
  dco_Module.BoundColumn = "ModuleId"
  dco_Module.ListField = "ModuleName"
End Sub

Private Sub Form_Load()
  '装入项目信息
  AdoPro.ConnectionString = Conn
  AdoPro.RecordSource = "Select * From Projects Order By ProId"
  AdoPro.Refresh
  Set dco_Pro.RowSource = AdoPro
  dco_Pro.BoundColumn = "ProId"
  dco_Pro.ListField = "ProName"
  '装入缺陷级别信息
  AdoSType.ConnectionString = Conn
  AdoSType.RecordSource = "Select * From Types Where Flag=4 Order By TypeId"
  AdoSType.Refresh
  Set dco_SType.RowSource = AdoSType
  dco_SType.BoundColumn = "TypeId"
  dco_SType.ListField = "TypeName"
  '设置日期
  dt_Date.Value = Date
  If OriProId > 0 Then
    '装入模块信息
    AdoModule.ConnectionString = Conn
    AdoModule.RecordSource = "Select * From Modules Where ProId=" + Trim(OriProId) + " Order By ProId"
    AdoModule.Refresh
    Set dco_Module.RowSource = AdoModule
    dco_Module.BoundColumn = "ModuleId"
    dco_Module.ListField = "ModuleName"
  End If
End Sub

⌨️ 快捷键说明

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