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

企业管理

开发平台:

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_gzgl_jlgl_lr 
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "Form1"
  8.    ClientHeight    =   3465
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   7290
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3465
  16.    ScaleWidth      =   7290
  17.    StartUpPosition =   2  '屏幕中心
  18.    Begin VB.CommandButton Command2 
  19.       Caption         =   "取消"
  20.       Height          =   390
  21.       Left            =   3870
  22.       TabIndex        =   12
  23.       Top             =   2970
  24.       Width           =   1770
  25.    End
  26.    Begin VB.CommandButton Command1 
  27.       Caption         =   "确定"
  28.       Height          =   390
  29.       Left            =   1980
  30.       TabIndex        =   11
  31.       Top             =   2970
  32.       Width           =   1770
  33.    End
  34.    Begin VB.Frame Frame1 
  35.       Height          =   2940
  36.       Left            =   0
  37.       TabIndex        =   0
  38.       Top             =   -60
  39.       Width           =   7275
  40.       Begin MSDataListLib.DataCombo DataCombo1 
  41.          Bindings        =   "main_gzgl_jlgl_lr.frx":0000
  42.          Height          =   330
  43.          Left            =   990
  44.          TabIndex        =   15
  45.          Top             =   630
  46.          Width           =   6165
  47.          _ExtentX        =   10874
  48.          _ExtentY        =   582
  49.          _Version        =   393216
  50.          ListField       =   "奖励项目"
  51.          Text            =   ""
  52.       End
  53.       Begin VB.TextBox Text1 
  54.          Enabled         =   0   'False
  55.          Height          =   330
  56.          Index           =   0
  57.          Left            =   990
  58.          TabIndex        =   5
  59.          Top             =   225
  60.          Width           =   2730
  61.       End
  62.       Begin VB.TextBox Text1 
  63.          Enabled         =   0   'False
  64.          Height          =   330
  65.          Index           =   1
  66.          Left            =   4755
  67.          TabIndex        =   4
  68.          Top             =   225
  69.          Width           =   2400
  70.       End
  71.       Begin VB.TextBox Text1 
  72.          Height          =   330
  73.          Index           =   2
  74.          Left            =   990
  75.          TabIndex        =   3
  76.          Top             =   1035
  77.          Width           =   2565
  78.       End
  79.       Begin VB.TextBox Text1 
  80.          Height          =   330
  81.          Index           =   3
  82.          Left            =   4965
  83.          Locked          =   -1  'True
  84.          TabIndex        =   2
  85.          Top             =   1050
  86.          Width           =   2175
  87.       End
  88.       Begin VB.TextBox Text1 
  89.          Height          =   990
  90.          Index           =   4
  91.          Left            =   975
  92.          TabIndex        =   1
  93.          Top             =   1830
  94.          Width           =   6165
  95.       End
  96.       Begin MSComCtl2.DTPicker DTP1 
  97.          Height          =   300
  98.          Left            =   990
  99.          TabIndex        =   13
  100.          Top             =   1440
  101.          Width           =   2535
  102.          _ExtentX        =   4471
  103.          _ExtentY        =   529
  104.          _Version        =   393216
  105.          Format          =   48234497
  106.          CurrentDate     =   38698
  107.       End
  108.       Begin VB.Label Label3 
  109.          Caption         =   "所属工资月份:"
  110.          Height          =   225
  111.          Left            =   3660
  112.          TabIndex        =   16
  113.          Top             =   1125
  114.          Width           =   1305
  115.       End
  116.       Begin VB.Label Label5 
  117.          BackStyle       =   0  'Transparent
  118.          Caption         =   "记录日期:"
  119.          Height          =   255
  120.          Left            =   75
  121.          TabIndex        =   14
  122.          Top             =   1500
  123.          Width           =   1005
  124.       End
  125.       Begin VB.Label Label9 
  126.          BackStyle       =   0  'Transparent
  127.          Caption         =   "备注:"
  128.          Height          =   255
  129.          Left            =   405
  130.          TabIndex        =   10
  131.          Top             =   1890
  132.          Width           =   555
  133.       End
  134.       Begin VB.Label Label1 
  135.          BackStyle       =   0  'Transparent
  136.          Caption         =   "员工编号:"
  137.          Height          =   255
  138.          Left            =   75
  139.          TabIndex        =   9
  140.          Top             =   315
  141.          Width           =   1005
  142.       End
  143.       Begin VB.Label Label2 
  144.          BackStyle       =   0  'Transparent
  145.          Caption         =   "员工姓名:"
  146.          Height          =   255
  147.          Left            =   3810
  148.          TabIndex        =   8
  149.          Top             =   315
  150.          Width           =   1005
  151.       End
  152.       Begin VB.Label Label4 
  153.          BackStyle       =   0  'Transparent
  154.          Caption         =   "奖励项目:"
  155.          Height          =   255
  156.          Left            =   75
  157.          TabIndex        =   7
  158.          Top             =   705
  159.          Width           =   900
  160.       End
  161.       Begin VB.Label Label7 
  162.          BackStyle       =   0  'Transparent
  163.          Caption         =   "奖励金额:"
  164.          Height          =   255
  165.          Left            =   75
  166.          TabIndex        =   6
  167.          Top             =   1125
  168.          Width           =   960
  169.       End
  170.    End
  171.    Begin MSAdodcLib.Adodc Adodc1 
  172.       Height          =   330
  173.       Left            =   0
  174.       Top             =   0
  175.       Visible         =   0   'False
  176.       Width           =   2040
  177.       _ExtentX        =   3598
  178.       _ExtentY        =   582
  179.       ConnectMode     =   0
  180.       CursorLocation  =   3
  181.       IsolationLevel  =   -1
  182.       ConnectionTimeout=   15
  183.       CommandTimeout  =   30
  184.       CursorType      =   3
  185.       LockType        =   3
  186.       CommandType     =   2
  187.       CursorOptions   =   0
  188.       CacheSize       =   50
  189.       MaxRecords      =   0
  190.       BOFAction       =   0
  191.       EOFAction       =   0
  192.       ConnectStringType=   1
  193.       Appearance      =   1
  194.       BackColor       =   -2147483643
  195.       ForeColor       =   -2147483640
  196.       Orientation     =   0
  197.       Enabled         =   -1
  198.       Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  199.       OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  200.       OLEDBFile       =   ""
  201.       DataSourceName  =   ""
  202.       OtherAttributes =   ""
  203.       UserName        =   ""
  204.       Password        =   ""
  205.       RecordSource    =   "奖励项目表"
  206.       Caption         =   "Adodc1"
  207.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  208.          Name            =   "宋体"
  209.          Size            =   9
  210.          Charset         =   134
  211.          Weight          =   400
  212.          Underline       =   0   'False
  213.          Italic          =   0   'False
  214.          Strikethrough   =   0   'False
  215.       EndProperty
  216.       _Version        =   393216
  217.    End
  218. End
  219. Attribute VB_Name = "main_gzgl_jlgl_lr"
  220. Attribute VB_GlobalNameSpace = False
  221. Attribute VB_Creatable = False
  222. Attribute VB_PredeclaredId = True
  223. Attribute VB_Exposed = False
  224. Dim rs1 As New ADODB.Recordset
  225. Private Sub Form_Activate()
  226.   DataCombo1.SetFocus
  227. End Sub
  228. Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
  229.   If KeyCode = vbKeyReturn Then Text1(2).SetFocus
  230. End Sub
  231. Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
  232.   If KeyCode = vbKeyReturn Then Text1(4).SetFocus
  233. End Sub
  234. Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
  235.   If KeyCode = vbKeyReturn And Index = 2 Then DTP1.SetFocus
  236. End Sub
  237. Private Sub Command1_Click()
  238.   If blnAddJL = True Then
  239.     Cnn.Execute ("insert into 员工奖励表(所属工资月份,员工编号,员工姓名,奖励项目,奖励金额,备注,日期) " _
  240.      & "values('" + Text1(3) + "','" + Text1(0) + "','" + Text1(1) + "','" + DataCombo1 + "'," + Text1(2) + _
  241.      ",'" + Text1(4) + "','" + str(DTP1.Value) + "')")
  242.   Else
  243.     Cnn.Execute ("update 员工奖励表 set 所属工资月份='" + Text1(3) + "',奖励项目='" + DataCombo1 + _
  244.     "',奖励金额=" + Text1(2) + ",备注='" + Text1(4) + "',日期='" + str(DTP1.Value) + "'where 员工编号='" + _
  245.     Text1(0) + "'")
  246.   End If
  247.   main_gzgl_jlgl.Adodc1.Refresh
  248.   Unload Me
  249. End Sub
  250. Private Sub Command2_Click()
  251.   Unload Me
  252. End Sub
  253. Private Sub Form_Load()
  254.   If blnAddJL = True Then
  255.     Me.Caption = "奖励信息添加"
  256.     rs1.Open "select * from 月份表", Cnn, adOpenKeyset, adLockOptimistic
  257.     If rs1.RecordCount > 0 Then
  258.        Text1(3) = rs1.Fields("月份")
  259.     End If
  260.     rs1.Close
  261.   Else
  262.     Me.Caption = "奖励信息修改"
  263.     With main_gzgl_jlgl.Adodc1.Recordset
  264.      If .RecordCount > 0 Then
  265.         Text1(0) = .Fields("员工编号")
  266.         Text1(1) = .Fields("员工姓名")
  267.         DataCombo1 = .Fields("奖励项目")
  268.         Text1(2) = .Fields("奖励金额")
  269.         Text1(3) = .Fields("所属工资月份")
  270.         DTP1.Value = .Fields("日期")
  271.         Text1(4) = .Fields("备注")
  272.     End If
  273.    End With
  274.   End If
  275. End Sub