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

📄 frmprojectedit.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 FrmProjectEdit 
   Caption         =   "编辑项目信息"
   ClientHeight    =   4905
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7590
   LinkTopic       =   "Form1"
   ScaleHeight     =   4905
   ScaleWidth      =   7590
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "取 消"
      Height          =   495
      Left            =   4680
      TabIndex        =   18
      Top             =   4200
      Width           =   1335
   End
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Height          =   495
      Left            =   1680
      TabIndex        =   17
      Top             =   4200
      Width           =   1335
   End
   Begin VB.TextBox txtMHour 
      Height          =   330
      Left            =   5040
      TabIndex        =   15
      Top             =   1659
      Width           =   1695
   End
   Begin VB.TextBox txtMSum 
      Height          =   330
      Left            =   1680
      TabIndex        =   13
      Top             =   1659
      Width           =   1695
   End
   Begin VB.TextBox txtSum 
      Height          =   330
      Left            =   1680
      TabIndex        =   11
      Top             =   1146
      Width           =   1695
   End
   Begin VB.TextBox txtName 
      Height          =   330
      Left            =   1680
      TabIndex        =   2
      Top             =   120
      Width           =   5055
   End
   Begin VB.TextBox txtDetail 
      Height          =   1095
      Left            =   1680
      TabIndex        =   1
      Top             =   2760
      Width           =   5175
   End
   Begin MSDataListLib.DataCombo dco_SType 
      Height          =   330
      Left            =   5040
      TabIndex        =   0
      Top             =   633
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSComCtl2.DTPicker dt_SDate 
      Height          =   330
      Left            =   1680
      TabIndex        =   3
      Top             =   2175
      Width           =   1740
      _ExtentX        =   3069
      _ExtentY        =   582
      _Version        =   393216
      Format          =   20840448
      CurrentDate     =   38247
   End
   Begin MSComCtl2.DTPicker dt_EDate 
      Height          =   330
      Left            =   5040
      TabIndex        =   4
      Top             =   2175
      Width           =   1740
      _ExtentX        =   3069
      _ExtentY        =   582
      _Version        =   393216
      Format          =   20840448
      CurrentDate     =   38247
   End
   Begin MSAdodcLib.Adodc AdoType 
      Height          =   330
      Left            =   5400
      Top             =   960
      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         =   "AdoTypes"
      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_Type 
      Height          =   330
      Left            =   1680
      TabIndex        =   19
      Top             =   600
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc AdoSType 
      Height          =   330
      Left            =   5400
      Top             =   1200
      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 VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "小时"
      Height          =   180
      Left            =   6840
      TabIndex        =   22
      Top             =   1734
      Width           =   360
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "万"
      Height          =   180
      Left            =   3480
      TabIndex        =   21
      Top             =   1734
      Width           =   180
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "万 人民币"
      Height          =   180
      Left            =   3480
      TabIndex        =   20
      Top             =   1200
      Width           =   810
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "工时总数"
      Height          =   180
      Left            =   3960
      TabIndex        =   16
      Top             =   1734
      Width           =   720
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "人工费总额"
      Height          =   180
      Left            =   420
      TabIndex        =   14
      Top             =   1734
      Width           =   900
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "项目总额"
      Height          =   180
      Left            =   600
      TabIndex        =   12
      Top             =   1221
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "项目名称"
      Height          =   180
      Left            =   600
      TabIndex        =   10
      Top             =   195
      Width           =   720
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "项目类型"
      Height          =   180
      Left            =   600
      TabIndex        =   9
      Top             =   708
      Width           =   720
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "开始日期"
      Height          =   180
      Left            =   600
      TabIndex        =   8
      Top             =   2247
      Width           =   720
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "结束日期"
      Height          =   180
      Left            =   3960
      TabIndex        =   7
      Top             =   2247
      Width           =   720
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "项目状态"
      Height          =   180
      Left            =   3960
      TabIndex        =   6
      Top             =   708
      Width           =   720
   End
   Begin VB.Label Label14 
      AutoSize        =   -1  'True
      Caption         =   "项目介绍"
      Height          =   180
      Left            =   600
      TabIndex        =   5
      Top             =   2760
      Width           =   720
   End
End
Attribute VB_Name = "FrmProjectEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
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_Type.Text)) = 0 Then
    MsgBox "请选择项目类型"
    dco_Type.SetFocus
    Exit Sub
  End If
  If Len(Trim(dco_SType.Text)) = 0 Then
    MsgBox "请选择项目状态"
    dco_SType.SetFocus
    Exit Sub
  End If
  If Len(Trim(txtSum)) = 0 Then
    MsgBox "请输入项目总金额"
    txtSum.SetFocus
    Exit Sub
  End If
  With MyPro
    .ProName = Trim(txtName)
    .ProSum = Val(txtSum)
    .TypeId = dco_Type.BoundText()
    .StatusId = dco_SType.BoundText()
    .ManHourSum = Val(txtMSum)
    .ManHours = Val(txtMHour)
    .StartDate = Trim(dt_SDate.Value)
    .EndDate = Trim(dt_EDate.Value)
    .ProDetail = Trim(txtDetail)
    If Modify Then
      .Update (OriProId)
      MsgBox "修改成功"
    Else
      .Insert
      MsgBox "添加成功"
    End If
  End With
  Unload Me
End Sub

Private Sub Form_Load()
  '装入项目类型信息
  AdoType.ConnectionString = Conn
  AdoType.RecordSource = "Select * From Types Where Flag=1 Order By TypeId"
  AdoType.Refresh
  Set dco_Type.RowSource = AdoType
  dco_Type.BoundColumn = "TypeId"
  dco_Type.ListField = "TypeName"
  '装入项目状态信息
  AdoSType.ConnectionString = Conn
  AdoSType.RecordSource = "Select * From Types Where Flag=2 Order By TypeId"
  AdoSType.Refresh
  Set dco_SType.RowSource = AdoSType
  dco_SType.BoundColumn = "TypeId"
  dco_SType.ListField = "TypeName"
  '设置日期
  dt_SDate.Value = Date
  dt_EDate.Value = Date
End Sub

⌨️ 快捷键说明

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