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

📄 main_rsgl_pxgl_lr.frm

📁 HRMS是一个人力资源管理系统,非常好用,功能非常强大,希望大家的支持
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form main_rsgl_pxgl_lr 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Form1"
   ClientHeight    =   3465
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7290
   Icon            =   "main_rsgl_pxgl_lr.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3465
   ScaleWidth      =   7290
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   390
      Left            =   3870
      TabIndex        =   18
      Top             =   2970
      Width           =   1770
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   390
      Left            =   1980
      TabIndex        =   17
      Top             =   2970
      Width           =   1770
   End
   Begin VB.Frame Frame1 
      Height          =   2940
      Left            =   15
      TabIndex        =   0
      Top             =   -60
      Width           =   7275
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   6
         Left            =   4755
         Locked          =   -1  'True
         TabIndex        =   20
         Text            =   "0"
         Top             =   1380
         Width           =   2400
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   5
         Left            =   990
         TabIndex        =   19
         Top             =   1380
         Width           =   2730
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   330
         Index           =   0
         Left            =   990
         TabIndex        =   7
         Top             =   225
         Width           =   2730
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   330
         Index           =   1
         Left            =   4755
         TabIndex        =   6
         Top             =   255
         Width           =   2400
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   2
         Left            =   4755
         Locked          =   -1  'True
         TabIndex        =   4
         Text            =   "0"
         Top             =   630
         Width           =   2400
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   3
         Left            =   990
         Locked          =   -1  'True
         TabIndex        =   3
         Text            =   "0"
         Top             =   990
         Width           =   2730
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   4
         Left            =   4755
         Locked          =   -1  'True
         TabIndex        =   2
         Text            =   "0"
         Top             =   1005
         Width           =   2400
      End
      Begin VB.TextBox Text1 
         Height          =   1050
         Index           =   7
         Left            =   975
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   1
         Top             =   1770
         Width           =   6165
      End
      Begin MSDataListLib.DataCombo DataCombo1 
         Bindings        =   "main_rsgl_pxgl_lr.frx":000C
         Height          =   330
         Left            =   990
         TabIndex        =   5
         Top             =   600
         Width           =   2730
         _ExtentX        =   4815
         _ExtentY        =   582
         _Version        =   393216
         ListField       =   "课程名称"
         BoundColumn     =   "课程编号"
         Text            =   ""
      End
      Begin VB.Label Label9 
         BackStyle       =   0  'Transparent
         Caption         =   "备注:"
         Height          =   255
         Left            =   405
         TabIndex        =   16
         Top             =   1875
         Width           =   555
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "员工编号:"
         Height          =   255
         Left            =   75
         TabIndex        =   15
         Top             =   315
         Width           =   1005
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "员工姓名:"
         Height          =   255
         Left            =   3795
         TabIndex        =   14
         Top             =   315
         Width           =   1005
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "课程名称:"
         Height          =   255
         Left            =   75
         TabIndex        =   13
         Top             =   705
         Width           =   1005
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "时数:"
         Height          =   255
         Left            =   4170
         TabIndex        =   12
         Top             =   690
         Width           =   555
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "开始时间:"
         Height          =   255
         Left            =   60
         TabIndex        =   11
         Top             =   1080
         Width           =   1005
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "结束时间:"
         Height          =   255
         Left            =   3825
         TabIndex        =   10
         Top             =   1080
         Width           =   1005
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "成绩:"
         Height          =   255
         Left            =   420
         TabIndex        =   9
         Top             =   1425
         Width           =   555
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "费用:"
         Height          =   255
         Left            =   4200
         TabIndex        =   8
         Top             =   1425
         Width           =   555
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   2040
      _ExtentX        =   3598
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "培训课程表"
      Caption         =   "Adodc1"
      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
End
Attribute VB_Name = "main_rsgl_pxgl_lr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Private Sub DataCombo1_Change()
  rs.Open "select * from 培训课程表 where 课程编号='" + DataCombo1.BoundText + "'", Cnn, adOpenKeyset, adLockOptimistic
  If rs.RecordCount > 0 Then
    Text1(2) = rs.Fields("授课时数")
    Text1(3) = rs.Fields("开课时间")
    Text1(4) = rs.Fields("结束时间")
    Text1(6) = rs.Fields("费用")
  End If
  rs.Close
End Sub
Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then Text1(5).SetFocus
End Sub
Private Sub Form_Activate()
  DataCombo1.SetFocus
End Sub
Private Sub Form_Load()
  If blnAddPX = True Then
    Me.Caption = "培训信息添加"
  Else
    Me.Caption = "培训信息修改"
    With main_rsgl_pxgl.Adodc1.Recordset
     If .RecordCount > 0 Then
        Text1(0) = .Fields("员工编号")
        Text1(1) = .Fields("员工姓名")
        DataCombo1 = .Fields("课程名称")
        Text1(2) = .Fields("时数")
        Text1(3) = .Fields("开始时间")
        Text1(4) = .Fields("结束时间")
        Text1(5) = .Fields("成绩")
        Text1(6) = .Fields("费用")
        Text1(7) = .Fields("备注")
    End If
   End With
  End If
End Sub
Private Sub Text1_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn And index = 2 Then DTP1.SetFocus
  If KeyCode = vbKeyReturn And index = 5 Then Text1(7).SetFocus
  If KeyCode = vbKeyReturn And index = 7 Then Command1.SetFocus
End Sub
Private Sub Command1_Click()
  If DataCombo1.text = "" Then
    MsgBox "请选择课程!", , "提示"
    Exit Sub
  End If
  If blnAddPX = True Then
    Cnn.Execute ("insert into 培训表(员工编号,员工姓名,课程名称,时数,开始时间,结束时间,成绩,费用,备注) " _
     & "values('" + Text1(0) + "','" + Text1(1) + "','" + DataCombo1 + "'," + Text1(2) + ",'" + _
     Text1(3) + "','" + Text1(4) + "','" + Text1(5) + "'," + Text1(6) + ",'" + Text1(7) + "')")
  Else
    Cnn.Execute ("update 培训表 set 课程名称='" + DataCombo1 + "',时数=" + Text1(2) + ",开始时间='" + _
    Text1(3) + "',结束时间='" + Text1(4) + "',成绩='" + Text1(5) + "',费用=" + Text1(6) + _
    ",备注='" + Text1(7) + "'where 员工编号='" + Text1(0) + "'and 课程名称='" + DataCombo1 + "'")
  End If
  main_rsgl_pxgl.Adodc1.Refresh
  Unload Me
End Sub
Private Sub Command2_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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