main_rsgl_khgl_lr.frm
上传用户:ake0106
上传日期:2022-07-23
资源大小:4052k
文件大小:11k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  4. Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
  5. Begin VB.Form main_rsgl_khgl_lr 
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "Form1"
  8.    ClientHeight    =   3375
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   7290
  12.    Icon            =   "main_rsgl_khgl_lr.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3375
  17.    ScaleWidth      =   7290
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   2  '屏幕中心
  20.    Begin VB.CommandButton Command2 
  21.       Caption         =   "取消"
  22.       Height          =   390
  23.       Left            =   3840
  24.       TabIndex        =   19
  25.       Top             =   2880
  26.       Width           =   1770
  27.    End
  28.    Begin VB.CommandButton Command1 
  29.       Caption         =   "确定"
  30.       Height          =   390
  31.       Left            =   1950
  32.       TabIndex        =   18
  33.       Top             =   2880
  34.       Width           =   1770
  35.    End
  36.    Begin VB.Frame Frame1 
  37.       Height          =   2835
  38.       Left            =   15
  39.       TabIndex        =   0
  40.       Top             =   -60
  41.       Width           =   7275
  42.       Begin VB.ComboBox Combo1 
  43.          Height          =   300
  44.          Left            =   4755
  45.          TabIndex        =   20
  46.          Top             =   975
  47.          Width           =   2400
  48.       End
  49.       Begin VB.TextBox Text1 
  50.          Enabled         =   0   'False
  51.          Height          =   330
  52.          Index           =   0
  53.          Left            =   990
  54.          TabIndex        =   8
  55.          Top             =   225
  56.          Width           =   2730
  57.       End
  58.       Begin VB.TextBox Text1 
  59.          Enabled         =   0   'False
  60.          Height          =   330
  61.          Index           =   1
  62.          Left            =   4755
  63.          TabIndex        =   7
  64.          Top             =   240
  65.          Width           =   2400
  66.       End
  67.       Begin VB.TextBox Text1 
  68.          Height          =   330
  69.          Index           =   2
  70.          Left            =   4740
  71.          TabIndex        =   5
  72.          Top             =   615
  73.          Width           =   2400
  74.       End
  75.       Begin VB.TextBox Text1 
  76.          Height          =   330
  77.          Index           =   3
  78.          Left            =   975
  79.          TabIndex        =   3
  80.          Top             =   1320
  81.          Width           =   2775
  82.       End
  83.       Begin VB.TextBox Text1 
  84.          Height          =   330
  85.          Index           =   4
  86.          Left            =   4755
  87.          TabIndex        =   2
  88.          Top             =   1320
  89.          Width           =   2400
  90.       End
  91.       Begin VB.TextBox Text1 
  92.          Height          =   1050
  93.          Index           =   5
  94.          Left            =   975
  95.          MultiLine       =   -1  'True
  96.          ScrollBars      =   2  'Vertical
  97.          TabIndex        =   1
  98.          Top             =   1695
  99.          Width           =   6165
  100.       End
  101.       Begin MSComCtl2.DTPicker DTP1 
  102.          Height          =   330
  103.          Left            =   990
  104.          TabIndex        =   4
  105.          Top             =   600
  106.          Width           =   2730
  107.          _ExtentX        =   4815
  108.          _ExtentY        =   582
  109.          _Version        =   393216
  110.          Format          =   48103425
  111.          CurrentDate     =   38698
  112.       End
  113.       Begin MSDataListLib.DataCombo DataCombo1 
  114.          Bindings        =   "main_rsgl_khgl_lr.frx":000C
  115.          Height          =   330
  116.          Left            =   990
  117.          TabIndex        =   6
  118.          Top             =   945
  119.          Width           =   2730
  120.          _ExtentX        =   4815
  121.          _ExtentY        =   582
  122.          _Version        =   393216
  123.          ListField       =   "考核项目"
  124.          BoundColumn     =   "编号"
  125.          Text            =   ""
  126.       End
  127.       Begin VB.Label Label9 
  128.          BackStyle       =   0  'Transparent
  129.          Caption         =   "考核意见:"
  130.          Height          =   255
  131.          Left            =   90
  132.          TabIndex        =   17
  133.          Top             =   1830
  134.          Width           =   945
  135.       End
  136.       Begin VB.Label Label1 
  137.          BackStyle       =   0  'Transparent
  138.          Caption         =   "员工编号:"
  139.          Height          =   255
  140.          Left            =   75
  141.          TabIndex        =   16
  142.          Top             =   315
  143.          Width           =   1005
  144.       End
  145.       Begin VB.Label Label2 
  146.          BackStyle       =   0  'Transparent
  147.          Caption         =   "员工姓名:"
  148.          Height          =   255
  149.          Left            =   3840
  150.          TabIndex        =   15
  151.          Top             =   315
  152.          Width           =   1005
  153.       End
  154.       Begin VB.Label Label3 
  155.          BackStyle       =   0  'Transparent
  156.          Caption         =   "考核项目:"
  157.          Height          =   255
  158.          Left            =   90
  159.          TabIndex        =   14
  160.          Top             =   1035
  161.          Width           =   1005
  162.       End
  163.       Begin VB.Label Label4 
  164.          BackStyle       =   0  'Transparent
  165.          Caption         =   "考核期间:"
  166.          Height          =   255
  167.          Left            =   3840
  168.          TabIndex        =   13
  169.          Top             =   690
  170.          Width           =   975
  171.       End
  172.       Begin VB.Label Label5 
  173.          BackStyle       =   0  'Transparent
  174.          Caption         =   "考核日期:"
  175.          Height          =   255
  176.          Left            =   60
  177.          TabIndex        =   12
  178.          Top             =   675
  179.          Width           =   1005
  180.       End
  181.       Begin VB.Label Label6 
  182.          BackStyle       =   0  'Transparent
  183.          Caption         =   "考核等级:"
  184.          Height          =   255
  185.          Left            =   3840
  186.          TabIndex        =   11
  187.          Top             =   1035
  188.          Width           =   1005
  189.       End
  190.       Begin VB.Label Label7 
  191.          BackStyle       =   0  'Transparent
  192.          Caption         =   "考核分数:"
  193.          Height          =   255
  194.          Left            =   60
  195.          TabIndex        =   10
  196.          Top             =   1395
  197.          Width           =   900
  198.       End
  199.       Begin VB.Label Label8 
  200.          BackStyle       =   0  'Transparent
  201.          Caption         =   "考核人员:"
  202.          Height          =   255
  203.          Left            =   3840
  204.          TabIndex        =   9
  205.          Top             =   1380
  206.          Width           =   1215
  207.       End
  208.    End
  209.    Begin MSAdodcLib.Adodc Adodc1 
  210.       Height          =   330
  211.       Left            =   0
  212.       Top             =   0
  213.       Visible         =   0   'False
  214.       Width           =   2040
  215.       _ExtentX        =   3598
  216.       _ExtentY        =   582
  217.       ConnectMode     =   0
  218.       CursorLocation  =   3
  219.       IsolationLevel  =   -1
  220.       ConnectionTimeout=   15
  221.       CommandTimeout  =   30
  222.       CursorType      =   3
  223.       LockType        =   3
  224.       CommandType     =   2
  225.       CursorOptions   =   0
  226.       CacheSize       =   50
  227.       MaxRecords      =   0
  228.       BOFAction       =   0
  229.       EOFAction       =   0
  230.       ConnectStringType=   1
  231.       Appearance      =   1
  232.       BackColor       =   -2147483643
  233.       ForeColor       =   -2147483640
  234.       Orientation     =   0
  235.       Enabled         =   -1
  236.       Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  237.       OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  238.       OLEDBFile       =   ""
  239.       DataSourceName  =   ""
  240.       OtherAttributes =   ""
  241.       UserName        =   ""
  242.       Password        =   ""
  243.       RecordSource    =   "考核项目表"
  244.       Caption         =   "Adodc1"
  245.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  246.          Name            =   "宋体"
  247.          Size            =   9
  248.          Charset         =   134
  249.          Weight          =   400
  250.          Underline       =   0   'False
  251.          Italic          =   0   'False
  252.          Strikethrough   =   0   'False
  253.       EndProperty
  254.       _Version        =   393216
  255.    End
  256. End
  257. Attribute VB_Name = "main_rsgl_khgl_lr"
  258. Attribute VB_GlobalNameSpace = False
  259. Attribute VB_Creatable = False
  260. Attribute VB_PredeclaredId = True
  261. Attribute VB_Exposed = False
  262. Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
  263.   If KeyCode = vbKeyReturn Then Text1(3).SetFocus
  264. End Sub
  265. Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
  266.   If KeyCode = vbKeyReturn Then Combo1.SetFocus
  267. End Sub
  268. Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
  269.   If KeyCode = vbKeyReturn Then Text1(2).SetFocus
  270. End Sub
  271. Private Sub Form_Activate()
  272.   DTP1.SetFocus
  273. End Sub
  274. Private Sub Form_Load()
  275.     Combo1.AddItem "优秀"
  276.     Combo1.AddItem "良好"
  277.     Combo1.AddItem "差"
  278.   If blnAddKH = True Then
  279.     Me.Caption = "考核信息添加"
  280.   Else
  281.     Me.Caption = "考核信息修改"
  282.     With main_rsgl_khgl.Adodc1.Recordset
  283.      If .RecordCount > 0 Then
  284.         Text1(0) = .Fields("员工编号")
  285.         Text1(1) = .Fields("员工姓名")
  286.         DTP1.Value = .Fields("考核日期")
  287.         Text1(2) = .Fields("考核期间")
  288.         DataCombo1 = .Fields("考核项目")
  289.         Combo1 = .Fields("考核等级")
  290.         Text1(3) = .Fields("考核分数")
  291.         Text1(4) = .Fields("考核人员")
  292.         Text1(5) = .Fields("考核意见")
  293.     End If
  294.    End With
  295.   End If
  296. End Sub
  297. Private Sub Command1_Click()
  298.   If IsNumeric(Text1(3)) = False Then
  299.     Text1(3) = Val(Text1(3))
  300.   End If
  301.   If blnAddKH = True Then
  302.     Cnn.Execute ("insert into 考核表(员工编号,员工姓名,考核日期,考核期间,考核项目,考核等级,考核分数,考核人员,考核意见)" _
  303.      & "values('" + Text1(0) + "','" + Text1(1) + "','" + str(DTP1.Value) + "','" + Text1(2) + "','" + _
  304.      DataCombo1 + "','" + Combo1 + "'," + Text1(3) + ",'" + Text1(4) + "','" + Text1(5) + "')")
  305.   Else
  306.     Cnn.Execute ("update 考核表 set 考核日期='" + str(DTP1.Value) + "',考核期间='" + Text1(2) + "',考核项目='" + _
  307.     DataCombo1 + "',考核等级='" + Combo1 + "',考核分数=" + Text1(3) + ",考核人员='" + Text1(4) + _
  308.     "',考核意见='" + Text1(5) + "'where 员工编号='" + Text1(0) + "'and 考核项目='" + DataCombo1 + "'")
  309.   End If
  310.   main_rsgl_khgl.Adodc1.Refresh
  311.   Unload Me
  312. End Sub
  313. Private Sub Command2_Click()
  314.   Unload Me
  315. End Sub
  316. Private Sub Text1_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer)
  317.   If KeyCode = vbKeyReturn And index = 2 Then DataCombo1.SetFocus
  318.   If KeyCode = vbKeyReturn And index = 3 Then Text1(4).SetFocus
  319.   If KeyCode = vbKeyReturn And index = 4 Then Text1(5).SetFocus
  320.   If KeyCode = vbKeyReturn And index = 5 Then Command1.SetFocus
  321. End Sub