main_rsgl_pygl_lr.frm
上传用户:wd52qq
上传日期:2022-07-24
资源大小:5366k
文件大小:12k
源码类别:

企业管理

开发平台:

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_pygl_lr 
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "Form1"
  8.    ClientHeight    =   4080
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   7290
  12.    Icon            =   "main_rsgl_pygl_lr.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4080
  17.    ScaleWidth      =   7290
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   2  '屏幕中心
  20.    Begin VB.CommandButton Command2 
  21.       Caption         =   "取消"
  22.       Height          =   390
  23.       Left            =   3825
  24.       TabIndex        =   20
  25.       Top             =   3525
  26.       Width           =   1770
  27.    End
  28.    Begin VB.CommandButton Command1 
  29.       Caption         =   "确定"
  30.       Height          =   390
  31.       Left            =   1935
  32.       TabIndex        =   19
  33.       Top             =   3525
  34.       Width           =   1770
  35.    End
  36.    Begin VB.Frame Frame1 
  37.       Height          =   3405
  38.       Left            =   15
  39.       TabIndex        =   0
  40.       Top             =   -60
  41.       Width           =   7275
  42.       Begin VB.TextBox Text1 
  43.          Height          =   330
  44.          Index           =   6
  45.          Left            =   4755
  46.          TabIndex        =   22
  47.          Top             =   1740
  48.          Width           =   2400
  49.       End
  50.       Begin VB.TextBox Text1 
  51.          Height          =   330
  52.          Index           =   5
  53.          Left            =   1140
  54.          TabIndex        =   21
  55.          Top             =   1740
  56.          Width           =   2535
  57.       End
  58.       Begin VB.TextBox Text1 
  59.          Height          =   330
  60.          Index           =   0
  61.          Left            =   1140
  62.          Locked          =   -1  'True
  63.          TabIndex        =   8
  64.          Top             =   225
  65.          Width           =   2535
  66.       End
  67.       Begin VB.TextBox Text1 
  68.          Enabled         =   0   'False
  69.          Height          =   330
  70.          Index           =   1
  71.          Left            =   4755
  72.          Locked          =   -1  'True
  73.          TabIndex        =   7
  74.          Top             =   255
  75.          Width           =   2400
  76.       End
  77.       Begin VB.TextBox Text1 
  78.          Enabled         =   0   'False
  79.          Height          =   330
  80.          Index           =   2
  81.          Left            =   4755
  82.          Locked          =   -1  'True
  83.          TabIndex        =   5
  84.          Top             =   630
  85.          Width           =   2400
  86.       End
  87.       Begin VB.TextBox Text1 
  88.          Height          =   330
  89.          Index           =   3
  90.          Left            =   1140
  91.          TabIndex        =   3
  92.          Top             =   1365
  93.          Width           =   2535
  94.       End
  95.       Begin VB.TextBox Text1 
  96.          Height          =   330
  97.          Index           =   4
  98.          Left            =   4755
  99.          TabIndex        =   2
  100.          Top             =   1365
  101.          Width           =   2400
  102.       End
  103.       Begin VB.TextBox Text1 
  104.          Height          =   1110
  105.          Index           =   7
  106.          Left            =   1140
  107.          MultiLine       =   -1  'True
  108.          ScrollBars      =   2  'Vertical
  109.          TabIndex        =   1
  110.          Top             =   2130
  111.          Width           =   6015
  112.       End
  113.       Begin MSComCtl2.DTPicker DTP1 
  114.          Height          =   330
  115.          Left            =   1140
  116.          TabIndex        =   4
  117.          Top             =   1005
  118.          Width           =   2535
  119.          _ExtentX        =   4471
  120.          _ExtentY        =   582
  121.          _Version        =   393216
  122.          Format          =   48168961
  123.          CurrentDate     =   38698
  124.       End
  125.       Begin MSDataListLib.DataCombo DataCombo1 
  126.          Bindings        =   "main_rsgl_pygl_lr.frx":000C
  127.          Height          =   330
  128.          Left            =   1140
  129.          TabIndex        =   6
  130.          Top             =   615
  131.          Width           =   2535
  132.          _ExtentX        =   4471
  133.          _ExtentY        =   582
  134.          _Version        =   393216
  135.          ListField       =   "聘用类型"
  136.          Text            =   ""
  137.       End
  138.       Begin MSComCtl2.DTPicker DTP2 
  139.          Height          =   300
  140.          Left            =   4755
  141.          TabIndex        =   17
  142.          Top             =   1005
  143.          Width           =   2400
  144.          _ExtentX        =   4233
  145.          _ExtentY        =   529
  146.          _Version        =   393216
  147.          Format          =   48168961
  148.          CurrentDate     =   38698
  149.       End
  150.       Begin VB.Label Label11 
  151.          BackStyle       =   0  'Transparent
  152.          Caption         =   "试用期工资:"
  153.          Height          =   255
  154.          Left            =   3690
  155.          TabIndex        =   24
  156.          Top             =   1800
  157.          Width           =   1125
  158.       End
  159.       Begin VB.Label Label10 
  160.          BackStyle       =   0  'Transparent
  161.          Caption         =   "聘用期工资:"
  162.          Height          =   195
  163.          Left            =   75
  164.          TabIndex        =   23
  165.          Top             =   1800
  166.          Width           =   1110
  167.       End
  168.       Begin VB.Label Label9 
  169.          BackStyle       =   0  'Transparent
  170.          Caption         =   "备注:"
  171.          Height          =   255
  172.          Left            =   570
  173.          TabIndex        =   18
  174.          Top             =   2145
  175.          Width           =   555
  176.       End
  177.       Begin VB.Label Label1 
  178.          BackStyle       =   0  'Transparent
  179.          Caption         =   "聘用编号:"
  180.          Height          =   255
  181.          Left            =   195
  182.          TabIndex        =   16
  183.          Top             =   315
  184.          Width           =   915
  185.       End
  186.       Begin VB.Label Label2 
  187.          BackStyle       =   0  'Transparent
  188.          Caption         =   "员工编号:"
  189.          Height          =   255
  190.          Left            =   3840
  191.          TabIndex        =   15
  192.          Top             =   330
  193.          Width           =   1005
  194.       End
  195.       Begin VB.Label Label3 
  196.          BackStyle       =   0  'Transparent
  197.          Caption         =   "聘用类型:"
  198.          Height          =   255
  199.          Left            =   195
  200.          TabIndex        =   14
  201.          Top             =   705
  202.          Width           =   1005
  203.       End
  204.       Begin VB.Label Label4 
  205.          BackStyle       =   0  'Transparent
  206.          Caption         =   "员工姓名:"
  207.          Height          =   255
  208.          Left            =   3840
  209.          TabIndex        =   13
  210.          Top             =   705
  211.          Width           =   915
  212.       End
  213.       Begin VB.Label Label5 
  214.          BackStyle       =   0  'Transparent
  215.          Caption         =   "聘用日期:"
  216.          Height          =   255
  217.          Left            =   195
  218.          TabIndex        =   12
  219.          Top             =   1080
  220.          Width           =   1005
  221.       End
  222.       Begin VB.Label Label6 
  223.          BackStyle       =   0  'Transparent
  224.          Caption         =   "结束日期:"
  225.          Height          =   255
  226.          Left            =   3855
  227.          TabIndex        =   11
  228.          Top             =   1095
  229.          Width           =   1005
  230.       End
  231.       Begin VB.Label Label7 
  232.          BackStyle       =   0  'Transparent
  233.          Caption         =   "聘用期限:"
  234.          Height          =   255
  235.          Left            =   195
  236.          TabIndex        =   10
  237.          Top             =   1425
  238.          Width           =   915
  239.       End
  240.       Begin VB.Label Label8 
  241.          BackStyle       =   0  'Transparent
  242.          Caption         =   "试用期:"
  243.          Height          =   255
  244.          Left            =   4020
  245.          TabIndex        =   9
  246.          Top             =   1440
  247.          Width           =   735
  248.       End
  249.    End
  250.    Begin MSAdodcLib.Adodc Adodc1 
  251.       Height          =   330
  252.       Left            =   0
  253.       Top             =   0
  254.       Visible         =   0   'False
  255.       Width           =   2040
  256.       _ExtentX        =   3598
  257.       _ExtentY        =   582
  258.       ConnectMode     =   0
  259.       CursorLocation  =   3
  260.       IsolationLevel  =   -1
  261.       ConnectionTimeout=   15
  262.       CommandTimeout  =   30
  263.       CursorType      =   3
  264.       LockType        =   3
  265.       CommandType     =   2
  266.       CursorOptions   =   0
  267.       CacheSize       =   50
  268.       MaxRecords      =   0
  269.       BOFAction       =   0
  270.       EOFAction       =   0
  271.       ConnectStringType=   1
  272.       Appearance      =   1
  273.       BackColor       =   -2147483643
  274.       ForeColor       =   -2147483640
  275.       Orientation     =   0
  276.       Enabled         =   -1
  277.       Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  278.       OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  279.       OLEDBFile       =   ""
  280.       DataSourceName  =   ""
  281.       OtherAttributes =   ""
  282.       UserName        =   ""
  283.       Password        =   ""
  284.       RecordSource    =   "聘用类型表"
  285.       Caption         =   "Adodc1"
  286.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  287.          Name            =   "宋体"
  288.          Size            =   9
  289.          Charset         =   134
  290.          Weight          =   400
  291.          Underline       =   0   'False
  292.          Italic          =   0   'False
  293.          Strikethrough   =   0   'False
  294.       EndProperty
  295.       _Version        =   393216
  296.    End
  297. End
  298. Attribute VB_Name = "main_rsgl_pygl_lr"
  299. Attribute VB_GlobalNameSpace = False
  300. Attribute VB_Creatable = False
  301. Attribute VB_PredeclaredId = True
  302. Attribute VB_Exposed = False
  303. Private Sub Form_Activate()
  304.   DataCombo1.SetFocus
  305. End Sub
  306. Private Sub Form_Load()
  307.   Text1(0) = Year(Date) & Month(Date) & HTygbh
  308.   If blnAddPY = True Then
  309.     Me.Caption = "聘用信息添加"
  310.     DTP1.Value = Date
  311.     DTP2.Value = DateAdd("yyyy", 1, Date)
  312.   Else
  313.     Me.Caption = "聘用信息修改"
  314.     With main_rsgl_pygl.Adodc1.Recordset
  315.      If .RecordCount > 0 Then
  316.         Text1(0) = .Fields("聘用编号")
  317.         Text1(1) = .Fields("员工编号")
  318.         Text1(2) = .Fields("员工姓名")
  319.         DataCombo1 = .Fields("聘用类型")
  320.         DTP1.Value = .Fields("聘用开始日期")
  321.         DTP2.Value = .Fields("聘用结束日期")
  322.         Text1(3) = .Fields("聘用期限")
  323.         Text1(5) = .Fields("聘用期工资")
  324.         Text1(4) = .Fields("试用期")
  325.         Text1(6) = .Fields("试用期工资")
  326.         Text1(7) = .Fields("备注")
  327.     End If
  328.    End With
  329.   End If
  330. End Sub
  331. Private Sub Text1_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer)
  332.   If KeyCode = vbKeyReturn And index >= 4 And index < 7 Then Text1(index + 1).SetFocus
  333.   If KeyCode = vbKeyReturn And index = 7 Then Command1.SetFocus
  334. End Sub
  335. Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
  336.   If KeyCode = vbKeyReturn Then DTP1.SetFocus
  337. End Sub
  338. Private Sub DTP1_Change()
  339.   Text1(3) = DateDiff("yyyy", DTP1.Value, DTP2.Value)
  340. End Sub
  341. Private Sub DTP2_Change()
  342.  Text1(3) = DateDiff("yyyy", DTP1.Value, DTP2.Value)
  343. End Sub
  344. Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
  345.   If KeyCode = vbKeyReturn Then DTP2.SetFocus
  346. End Sub
  347. Private Sub DTP2_KeyDown(KeyCode As Integer, Shift As Integer)
  348.   If KeyCode = vbKeyReturn Then Text1(4).SetFocus
  349. End Sub
  350. Private Sub Command1_Click()
  351.   If blnAddPY = True Then
  352.     Cnn.Execute ("insert into 聘用表(员工编号,员工姓名,聘用编号,聘用类型,聘用开始日期," _
  353.     & "聘用结束日期,聘用期限,聘用期工资,试用期,试用期工资,备注,状态)values('" + Text1(1) + "','" + _
  354.     Text1(2) + "','" + Text1(0) + "','" + DataCombo1 + "','" + str(DTP1.Value) + "','" + _
  355.     str(DTP2.Value) + "','" + Text1(3) + "'," + Text1(5) + ",'" + Text1(4) + "'," + Text1(6) + _
  356.     ",'" + Text1(7) + "','生效')")
  357.   Else
  358.     Cnn.Execute ("update 聘用表 set 聘用编号='" + Text1(0) + "',聘用类型='" + DataCombo1 + _
  359.     "',聘用开始日期='" + str(DTP1.Value) + "',聘用结束日期='" + str(DTP2.Value) + "',聘用期限='" + _
  360.     Text1(3) + "',聘用期工资=" + Text1(5) + ",试用期='" + Text1(4) + "',试用期工资=" + Text1(6) + _
  361.     ",备注='" + Text1(7) + "'where 员工编号='" + Text1(1) + "'")
  362.   End If
  363.   main_rsgl_pygl.Adodc1.Refresh
  364.   Unload Me
  365. End Sub
  366. Private Sub Command2_Click()
  367.   Unload Me
  368. End Sub