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

📄 frmrepman.frm

📁 本系统实现了软件项目开发的流程管理和控制
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmRepMan 
   Appearance      =   0  'Flat
   BorderStyle     =   1  'Fixed Single
   Caption         =   "工作报告管理"
   ClientHeight    =   4455
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5895
   Icon            =   "FrmRepMan.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4455
   ScaleWidth      =   5895
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Ok 
      Caption         =   "确 定"
      Height          =   400
      Left            =   1495
      MouseIcon       =   "FrmRepMan.frx":1272
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   3840
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   3100
      MouseIcon       =   "FrmRepMan.frx":157C
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   3840
      Width           =   1300
   End
   Begin VB.Frame Frame2 
      Height          =   3495
      Left            =   240
      TabIndex        =   4
      Top             =   120
      Width           =   5415
      Begin VB.TextBox txtBody 
         Height          =   2055
         Left            =   840
         MaxLength       =   500
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   1
         Top             =   720
         Width           =   4335
      End
      Begin VB.TextBox txtTitle 
         Height          =   270
         Left            =   840
         MaxLength       =   50
         TabIndex        =   0
         Top             =   240
         Width           =   4335
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "作者"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   3000
         Width           =   360
      End
      Begin VB.Label lblAuthor 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lblAuthor"
         Height          =   180
         Left            =   840
         TabIndex        =   9
         Top             =   3000
         Width           =   810
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "完成日期"
         Height          =   180
         Left            =   2880
         TabIndex        =   8
         Top             =   3000
         Width           =   720
      End
      Begin VB.Label lblCreateDate 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lblCreateDate"
         Height          =   180
         Left            =   3840
         TabIndex        =   7
         Top             =   3000
         Width           =   1170
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "内容"
         Height          =   180
         Left            =   240
         TabIndex        =   6
         Top             =   720
         Width           =   360
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "标题"
         Height          =   180
         Left            =   240
         TabIndex        =   5
         Top             =   285
         Width           =   360
      End
   End
End
Attribute VB_Name = "FrmRepMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Integer
Public OriTitle As String

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  '判断用户输入数据的有效性
  If Trim(txtTitle) = "" Then
    MsgBox "请输入标题"
    txtTitle.SetFocus
    Exit Sub
  End If
  '判断输入的用户标题是否存在
  With MyRep
  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
  '把用户输入的数据赋值到MyRep对象中
  .Title = MakeStr(txtTitle)
  .ProjId = CurProj.ProjId
  .Body = MakeStr(txtBody)
  .Author = CurUser.Ename
  .CreateDate = Format(Now, "yyyy-mm-dd")
  '根据Modify变量的值决定是插入数据还是修改已有的数据
  If Modify = False Then
    .Insert
  Else
    .Update (OriId)
  End If
  End With
  '关闭窗体
  Unload Me
End Sub

⌨️ 快捷键说明

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