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

📄 frmsumedit.frm

📁 本系统实现了软件项目开发的流程管理和控制
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmSumEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑项目总结信息"
   ClientHeight    =   3210
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5925
   Icon            =   "FrmSumEdit.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3210
   ScaleWidth      =   5925
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   2295
      Left            =   240
      TabIndex        =   4
      Top             =   120
      Width           =   5415
      Begin VB.TextBox txtTitle 
         Height          =   270
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   0
         Top             =   240
         Width           =   3975
      End
      Begin VB.TextBox txtBody 
         Height          =   1095
         Left            =   1200
         MaxLength       =   300
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   1
         Top             =   600
         Width           =   3975
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "总结标题"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   285
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "具体描述"
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   645
         Width           =   720
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "总结人"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   1965
         Width           =   540
      End
      Begin VB.Label lblAuthor 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lblFill_in"
         Height          =   180
         Left            =   1200
         TabIndex        =   7
         Top             =   1965
         Width           =   900
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "总结日期"
         Height          =   180
         Left            =   2880
         TabIndex        =   6
         Top             =   1965
         Width           =   720
      End
      Begin VB.Label lblCreateDate 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lblFilldate"
         Height          =   180
         Left            =   3840
         TabIndex        =   5
         Top             =   1965
         Width           =   990
      End
   End
   Begin VB.CommandButton Cmd_Cancel 
      BackColor       =   &H80000000&
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   3212
      MouseIcon       =   "FrmSumEdit.frx":1272
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   2640
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Ok 
      BackColor       =   &H80000000&
      Caption         =   "确 定"
      Height          =   400
      Left            =   1412
      MouseIcon       =   "FrmSumEdit.frx":157C
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   2640
      Width           =   1300
   End
End
Attribute VB_Name = "FrmSumEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriTitle As String
Public OriId As Long

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  Dim TmpId As String
  '检查用户录入数据的有效性
  If Trim(txtTitle) = "" Then
    MsgBox "请输入标题"
    txtTitle.SetFocus
    Exit Sub
  End If
  '判断项目总结信息的标题已经存在,如果存在则不能再添加到数据库中
  With MySum
  If Modify = False Or OriTitle <> Trim(txtTitle) Then
    If .In_DB(CurProj.ProjId, MakeStr(txtTitle)) = True Then
      MsgBox "总结标题已经存在,请重新输入"
      txtTitle.SetFocus
      txtTitle.SelStart = 0
      txtTitle.SelLength = Len(txtTitle)
      Exit Sub
    End If
  End If
  '把用户录入的数据赋值到MySum对象中
  .ProjId = CurProj.ProjId
  .Title = MakeStr(txtTitle)
  .Body = MakeStr(txtBody)
  .Author = CurUser.Ename
  .CreateDate = Format(Now, "yyyy-mm-dd")
  '根据变量Modify的值,决定是插入新数据,还是更新已有的数据
  If Modify = False Then
    .Insert
  Else
    Call .Update(OriId)
  End If
  End With
  '关闭窗体
  Unload Me
End Sub

⌨️ 快捷键说明

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