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

📄 main_rckh_cc.frm

📁 1系统功能分析 系统开发的总体任务是实现学生信息关系的系统化
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form main_rckh_cc 
   BackColor       =   &H00D0E8EE&
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   4995
   ClientLeft      =   45
   ClientTop       =   270
   ClientWidth     =   6495
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4995
   ScaleWidth      =   6495
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton CmdSave 
      BackColor       =   &H00FFC0C0&
      Caption         =   "保存"
      Height          =   390
      Left            =   3105
      Style           =   1  'Graphical
      TabIndex        =   14
      Top             =   4530
      Width           =   1650
   End
   Begin VB.CommandButton CmdEnd 
      BackColor       =   &H00FFC0C0&
      Caption         =   "返回"
      Height          =   390
      Left            =   4785
      Style           =   1  'Graphical
      TabIndex        =   13
      Top             =   4530
      Width           =   1650
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00D0E8EE&
      Height          =   3870
      Left            =   90
      TabIndex        =   0
      Top             =   585
      Width           =   6330
      Begin MSComCtl2.DTPicker DTP1 
         Height          =   300
         Left            =   1485
         TabIndex        =   15
         Top             =   2925
         Width           =   1665
         _ExtentX        =   2937
         _ExtentY        =   529
         _Version        =   393216
         Format          =   71237633
         CurrentDate     =   38125
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   8
         Left            =   1095
         ScrollBars      =   1  'Horizontal
         TabIndex        =   12
         Top             =   3450
         Width           =   5070
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   7
         Left            =   1110
         TabIndex        =   11
         Top             =   2355
         Width           =   5070
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   6
         Left            =   1110
         TabIndex        =   10
         Top             =   1800
         Width           =   5070
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   5
         Left            =   1110
         TabIndex        =   9
         Top             =   1260
         Width           =   5070
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   4
         Left            =   4050
         Locked          =   -1  'True
         TabIndex        =   8
         Top             =   735
         Width           =   2130
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   3
         Left            =   1110
         Locked          =   -1  'True
         TabIndex        =   7
         Top             =   735
         Width           =   1860
      End
      Begin VB.TextBox Text1 
         Height          =   330
         Index           =   2
         Left            =   4065
         Locked          =   -1  'True
         TabIndex        =   6
         Top             =   165
         Width           =   2115
      End
      Begin MSDataListLib.DataCombo DataCombo1 
         Bindings        =   "main_rckh_cc.frx":0000
         Height          =   330
         Left            =   1110
         TabIndex        =   5
         Top             =   150
         Width           =   1845
         _ExtentX        =   3254
         _ExtentY        =   582
         _Version        =   393216
         ListField       =   "工号"
         Text            =   ""
      End
      Begin MSComCtl2.DTPicker DTP2 
         Height          =   300
         Left            =   4515
         TabIndex        =   16
         Top             =   2910
         Width           =   1665
         _ExtentX        =   2937
         _ExtentY        =   529
         _Version        =   393216
         Format          =   71237633
         CurrentDate     =   38125
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "备    注:"
         Height          =   225
         Left            =   195
         TabIndex        =   17
         Top             =   3510
         Width           =   930
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "出差起始日期:                    出差结束日期:"
         Height          =   225
         Left            =   195
         TabIndex        =   4
         Top             =   3000
         Width           =   5175
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "出差地点:"
         Height          =   225
         Left            =   195
         TabIndex        =   3
         Top             =   2430
         Width           =   5175
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "出差目的:"
         Height          =   225
         Left            =   195
         TabIndex        =   2
         Top             =   1875
         Width           =   1050
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   $"main_rckh_cc.frx":0015
         Height          =   1530
         Left            =   195
         TabIndex        =   1
         Top             =   255
         Width           =   4380
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   -1185
      Top             =   555
      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         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
      OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 人事档案信息表  where 员工状态='在职'"
      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
   Begin VB.Label Label10 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H00FFC0C0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "出差信息录入"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C000C0&
      Height          =   375
      Left            =   1575
      TabIndex        =   18
      Top             =   135
      Width           =   3270
   End
End
Attribute VB_Name = "main_rckh_cc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset
Private Sub CmdSave_Click()
  If blnAdd2 = True Then
    rs1.Open "select * from 出差信息表", Cnn, adOpenKeyset, adLockOptimistic
    rs1.AddNew
    rs1.Fields("工号") = DataCombo1.Text
    For i = 2 To 7
        rs1.Fields(i) = Text1(i).Text
    Next i
    rs1.Fields("出差起始日期") = DTP1.Value
    rs1.Fields("出差截止日期") = DTP2.Value
    rs1.Fields("备注") = Text1(8).Text
    rs1.Update
    rs1.Close
  Else
    rs1.Open "select * from 出差信息表 where 工号='" + DataCombo1.Text + "'", Cnn, adOpenKeyset, adLockOptimistic
    If rs1.RecordCount > 0 Then
        For i = 5 To 7
            rs1.Fields(i) = Text1(i).Text
        Next i
        rs1.Fields("出差起始日期") = DTP1.Value
        rs1.Fields("出差截止日期") = DTP2.Value
        rs1.Fields("备注") = Text1(8).Text
        rs1.Update
    End If
    rs1.Close
  End If
  main_rckh.Adodc3.Refresh
  Unload Me
End Sub
Private Sub DataCombo1_Change()
  rs1.Open "select * from 人事档案信息表 where 工号='" + DataCombo1.Text + "'", Cnn, adOpenKeyset, adLockOptimistic
  If rs1.RecordCount > 0 Then
     Text1(2).Text = rs1.Fields("姓名")
     Text1(3).Text = rs1.Fields("部门名称")
     Text1(4).Text = rs1.Fields("行政职务")
  End If
  rs1.Close
End Sub

Private Sub Form_Activate()
  DataCombo1.SetFocus
End Sub
Private Sub Form_Load()
  If blnAdd2 = True Then
     Me.Caption = "出差信息添加"
     Label10.Caption = "出差信息添加"
  Else
     Me.Caption = "出差信息修改"
     Label10.Caption = "出差信息修改"
     DataCombo1.Locked = True
     With main_rckh.Adodc3.Recordset
        DataCombo1.Text = .Fields("工号")
        For i = 2 To 7
          Text1(i).Text = .Fields(i)
        Next i
        DTP1.Value = .Fields("出差起始日期")
        DTP2.Value = .Fields("出差截止日期")
        Text1(8).Text = .Fields("备注")
     End With
  End If
End Sub
Private Sub Text1_GotFocus(Index As Integer)
  Text1(Index).SelStart = 0
  Text1(Index).SelLength = Len(Text1(Index))
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
  If Index < 8 And KeyCode = vbKeyReturn Then Text1(Index + 1).SetFocus
  If Index = 7 And KeyCode = vbKeyReturn Then DTP1.SetFocus
  If Index = 8 And KeyCode = vbKeyReturn Then CmdSave.SetFocus
End Sub
Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Text1(5).SetFocus
  End If
End Sub
Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then DTP2.SetFocus
End Sub
Private Sub DTP2_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then Text1(8).SetFocus
End Sub
Private Sub Form_Unload(Cancel As Integer)
 Form1.Enabled = True
End Sub
Private Sub CmdEnd_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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