F_LaoDongHeTong.frm
上传用户:xiao_xia32
上传日期:2022-07-21
资源大小:1174k
文件大小:33k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  3. Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
  4. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  5. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  6. Begin VB.Form F_LaoDongHeTong 
  7.    BorderStyle     =   3  'Fixed Dialog
  8.    Caption         =   "劳动合同"
  9.    ClientHeight    =   7740
  10.    ClientLeft      =   1095
  11.    ClientTop       =   330
  12.    ClientWidth     =   11250
  13.    ControlBox      =   0   'False
  14.    KeyPreview      =   -1  'True
  15.    LinkTopic       =   "Form1"
  16.    LockControls    =   -1  'True
  17.    MaxButton       =   0   'False
  18.    MinButton       =   0   'False
  19.    Moveable        =   0   'False
  20.    ScaleHeight     =   7740
  21.    ScaleWidth      =   11250
  22.    StartUpPosition =   2  '屏幕中心
  23.    Begin VB.Frame Frame1 
  24.       Height          =   7455
  25.       Left            =   120
  26.       TabIndex        =   26
  27.       Top             =   120
  28.       Width           =   10935
  29.       Begin TabDlg.SSTab SSTab1 
  30.          Height          =   6855
  31.          Left            =   240
  32.          TabIndex        =   27
  33.          Top             =   360
  34.          Width           =   10455
  35.          _ExtentX        =   18441
  36.          _ExtentY        =   12091
  37.          _Version        =   393216
  38.          Tabs            =   2
  39.          TabHeight       =   520
  40.          TabCaption(0)   =   "编        辑"
  41.          TabPicture(0)   =   "F_LaoDongHeTong.frx":0000
  42.          Tab(0).ControlEnabled=   -1  'True
  43.          Tab(0).Control(0)=   "Frame2"
  44.          Tab(0).Control(0).Enabled=   0   'False
  45.          Tab(0).Control(1)=   "Picture1"
  46.          Tab(0).Control(1).Enabled=   0   'False
  47.          Tab(0).ControlCount=   2
  48.          TabCaption(1)   =   "列        表"
  49.          TabPicture(1)   =   "F_LaoDongHeTong.frx":001C
  50.          Tab(1).ControlEnabled=   0   'False
  51.          Tab(1).Control(0)=   "Frame3"
  52.          Tab(1).Control(0).Enabled=   0   'False
  53.          Tab(1).ControlCount=   1
  54.          Begin VB.PictureBox Picture1 
  55.             Appearance      =   0  'Flat
  56.             BorderStyle     =   0  'None
  57.             BeginProperty Font 
  58.                Name            =   "MS Sans Serif"
  59.                Size            =   8.25
  60.                Charset         =   0
  61.                Weight          =   400
  62.                Underline       =   0   'False
  63.                Italic          =   0   'False
  64.                Strikethrough   =   0   'False
  65.             EndProperty
  66.             ForeColor       =   &H80000008&
  67.             Height          =   420
  68.             Left            =   2880
  69.             ScaleHeight     =   420
  70.             ScaleWidth      =   6720
  71.             TabIndex        =   52
  72.             Top             =   6240
  73.             Width           =   6720
  74.             Begin Threed.SSCommand cmdClose 
  75.                Height          =   330
  76.                Left            =   5520
  77.                TabIndex        =   53
  78.                Top             =   0
  79.                Width           =   1095
  80.                _Version        =   65536
  81.                _ExtentX        =   1931
  82.                _ExtentY        =   573
  83.                _StockProps     =   78
  84.                Caption         =   "&Q.关 闭"
  85.                Font3D          =   1
  86.             End
  87.             Begin Threed.SSCommand CmdAdd 
  88.                Height          =   330
  89.                Left            =   720
  90.                TabIndex        =   21
  91.                Top             =   0
  92.                Width           =   1095
  93.                _Version        =   65536
  94.                _ExtentX        =   1931
  95.                _ExtentY        =   573
  96.                _StockProps     =   78
  97.                Caption         =   "&A.增 加"
  98.                Font3D          =   1
  99.             End
  100.             Begin Threed.SSCommand cmdEdit 
  101.                Height          =   330
  102.                Left            =   1920
  103.                TabIndex        =   22
  104.                Top             =   0
  105.                Width           =   1095
  106.                _Version        =   65536
  107.                _ExtentX        =   1931
  108.                _ExtentY        =   573
  109.                _StockProps     =   78
  110.                Caption         =   "&E.编 辑"
  111.                Font3D          =   1
  112.             End
  113.             Begin Threed.SSCommand CmdDelete 
  114.                Height          =   330
  115.                Left            =   3120
  116.                TabIndex        =   23
  117.                Top             =   0
  118.                Width           =   1095
  119.                _Version        =   65536
  120.                _ExtentX        =   1931
  121.                _ExtentY        =   573
  122.                _StockProps     =   78
  123.                Caption         =   "&D.删 除"
  124.                Font3D          =   1
  125.             End
  126.             Begin Threed.SSCommand cmdUpdate 
  127.                Height          =   330
  128.                Left            =   4320
  129.                TabIndex        =   54
  130.                Top             =   0
  131.                Width           =   1095
  132.                _Version        =   65536
  133.                _ExtentX        =   1931
  134.                _ExtentY        =   573
  135.                _StockProps     =   78
  136.                Caption         =   "&Y.保 存"
  137.                Font3D          =   1
  138.             End
  139.             Begin Threed.SSCommand cmdRefresh 
  140.                Height          =   330
  141.                Left            =   4320
  142.                TabIndex        =   24
  143.                Top             =   0
  144.                Width           =   1095
  145.                _Version        =   65536
  146.                _ExtentX        =   1931
  147.                _ExtentY        =   573
  148.                _StockProps     =   78
  149.                Caption         =   "&R.刷新"
  150.                Font3D          =   1
  151.             End
  152.             Begin Threed.SSCommand cmdCancel 
  153.                Height          =   330
  154.                Left            =   5520
  155.                TabIndex        =   25
  156.                Top             =   0
  157.                Width           =   1095
  158.                _Version        =   65536
  159.                _ExtentX        =   1931
  160.                _ExtentY        =   573
  161.                _StockProps     =   78
  162.                Caption         =   "&C.取消"
  163.                Font3D          =   1
  164.             End
  165.          End
  166.          Begin VB.Frame Frame3 
  167.             Height          =   6135
  168.             Left            =   -74760
  169.             TabIndex        =   48
  170.             Top             =   480
  171.             Width           =   9975
  172.             Begin MSDataGridLib.DataGrid DataGrid1 
  173.                Height          =   5535
  174.                Left            =   240
  175.                TabIndex        =   49
  176.                Top             =   480
  177.                Width           =   9495
  178.                _ExtentX        =   16748
  179.                _ExtentY        =   9763
  180.                _Version        =   393216
  181.                HeadLines       =   1
  182.                RowHeight       =   14
  183.                BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  184.                   Name            =   "MS Sans Serif"
  185.                   Size            =   8.25
  186.                   Charset         =   0
  187.                   Weight          =   400
  188.                   Underline       =   0   'False
  189.                   Italic          =   0   'False
  190.                   Strikethrough   =   0   'False
  191.                EndProperty
  192.                BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  193.                   Name            =   "宋体"
  194.                   Size            =   9
  195.                   Charset         =   134
  196.                   Weight          =   400
  197.                   Underline       =   0   'False
  198.                   Italic          =   0   'False
  199.                   Strikethrough   =   0   'False
  200.                EndProperty
  201.                ColumnCount     =   2
  202.                BeginProperty Column00 
  203.                   DataField       =   ""
  204.                   Caption         =   ""
  205.                   BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  206.                      Type            =   0
  207.                      Format          =   ""
  208.                      HaveTrueFalseNull=   0
  209.                      FirstDayOfWeek  =   0
  210.                      FirstWeekOfYear =   0
  211.                      LCID            =   2052
  212.                      SubFormatType   =   0
  213.                   EndProperty
  214.                EndProperty
  215.                BeginProperty Column01 
  216.                   DataField       =   ""
  217.                   Caption         =   ""
  218.                   BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  219.                      Type            =   0
  220.                      Format          =   ""
  221.                      HaveTrueFalseNull=   0
  222.                      FirstDayOfWeek  =   0
  223.                      FirstWeekOfYear =   0
  224.                      LCID            =   2052
  225.                      SubFormatType   =   0
  226.                   EndProperty
  227.                EndProperty
  228.                SplitCount      =   1
  229.                BeginProperty Split0 
  230.                   BeginProperty Column00 
  231.                   EndProperty
  232.                   BeginProperty Column01 
  233.                   EndProperty
  234.                EndProperty
  235.             End
  236.          End
  237.          Begin VB.Frame Frame2 
  238.             Height          =   5655
  239.             Left            =   360
  240.             TabIndex        =   28
  241.             Top             =   480
  242.             Width           =   9855
  243.             Begin VB.ComboBox Combo2 
  244.                Appearance      =   0  'Flat
  245.                DataField       =   "是否已停止"
  246.                Height          =   300
  247.                Left            =   1680
  248.                TabIndex        =   18
  249.                Top             =   4800
  250.                Width           =   1695
  251.             End
  252.             Begin VB.TextBox txtFields 
  253.                Appearance      =   0  'Flat
  254.                DataField       =   "签定期限"
  255.                Height          =   285
  256.                Index           =   2
  257.                Left            =   1680
  258.                TabIndex        =   12
  259.                Top             =   2768
  260.                Width           =   1695
  261.             End
  262.             Begin VB.ComboBox Combo1 
  263.                Appearance      =   0  'Flat
  264.                DataField       =   "停止方式"
  265.                Height          =   300
  266.                Left            =   4800
  267.                TabIndex        =   19
  268.                Top             =   4800
  269.                Width           =   1695
  270.             End
  271.             Begin MSComCtl2.DTPicker DTPicker1 
  272.                DataField       =   "出生日期"
  273.                BeginProperty DataFormat 
  274.                   Type            =   1
  275.                   Format          =   "yyyy""年""M""月""d""日"""
  276.                   HaveTrueFalseNull=   0
  277.                   FirstDayOfWeek  =   0
  278.                   FirstWeekOfYear =   0
  279.                   LCID            =   2052
  280.                   SubFormatType   =   3
  281.                EndProperty
  282.                Height          =   300
  283.                Left            =   4920
  284.                TabIndex        =   4
  285.                Top             =   832
  286.                Width           =   1575
  287.                _ExtentX        =   2778
  288.                _ExtentY        =   529
  289.                _Version        =   393216
  290.                CheckBox        =   -1  'True
  291.                DateIsNull      =   -1  'True
  292.                Format          =   69271553
  293.                CurrentDate     =   36189
  294.             End
  295.             Begin MSComCtl2.DTPicker DTPicker2 
  296.                DataField       =   "签定时间"
  297.                Height          =   300
  298.                Left            =   7920
  299.                TabIndex        =   11
  300.                Top             =   2280
  301.                Width           =   1695
  302.                _ExtentX        =   2990
  303.                _ExtentY        =   529
  304.                _Version        =   393216
  305.                CheckBox        =   -1  'True
  306.                DateIsNull      =   -1  'True
  307.                Format          =   69271553
  308.                CurrentDate     =   36186
  309.             End
  310.             Begin VB.TextBox txtFields 
  311.                Appearance      =   0  'Flat
  312.                DataField       =   "劳动合同编号"
  313.                Height          =   285
  314.                Index           =   0
  315.                Left            =   1680
  316.                TabIndex        =   0
  317.                Top             =   360
  318.                Width           =   1695
  319.             End
  320.             Begin VB.TextBox txtFields 
  321.                Appearance      =   0  'Flat
  322.                DataField       =   "姓名"
  323.                Height          =   285
  324.                Index           =   1
  325.                Left            =   4920
  326.                TabIndex        =   1
  327.                Top             =   360
  328.                Width           =   1575
  329.             End
  330.             Begin VB.TextBox txtFields 
  331.                Appearance      =   0  'Flat
  332.                DataField       =   "文化程度"
  333.                Height          =   285
  334.                Index           =   3
  335.                Left            =   7920
  336.                TabIndex        =   2
  337.                Top             =   360
  338.                Width           =   1695
  339.             End
  340.             Begin VB.TextBox txtFields 
  341.                Appearance      =   0  'Flat
  342.                DataField       =   "性别"
  343.                Height          =   285
  344.                Index           =   4
  345.                Left            =   1680
  346.                TabIndex        =   3
  347.                Top             =   840
  348.                Width           =   1695
  349.             End
  350.             Begin VB.TextBox txtFields 
  351.                Appearance      =   0  'Flat
  352.                DataField       =   "身份证号"
  353.                Height          =   285
  354.                Index           =   6
  355.                Left            =   7920
  356.                TabIndex        =   7
  357.                Top             =   1320
  358.                Width           =   1695
  359.             End
  360.             Begin VB.TextBox txtFields 
  361.                Appearance      =   0  'Flat
  362.                DataField       =   "家庭通讯地址"
  363.                Height          =   285
  364.                Index           =   7
  365.                Left            =   1680
  366.                TabIndex        =   6
  367.                Top             =   1320
  368.                Width           =   4815
  369.             End
  370.             Begin VB.TextBox txtFields 
  371.                Appearance      =   0  'Flat
  372.                DataField       =   "邮编"
  373.                Height          =   285
  374.                Index           =   8
  375.                Left            =   7920
  376.                TabIndex        =   5
  377.                Top             =   840
  378.                Width           =   1695
  379.             End
  380.             Begin VB.TextBox txtFields 
  381.                Appearance      =   0  'Flat
  382.                DataField       =   "所在街道办事处"
  383.                Height          =   285
  384.                Index           =   9
  385.                Left            =   1680
  386.                TabIndex        =   8
  387.                Top             =   1800
  388.                Width           =   4815
  389.             End
  390.             Begin VB.TextBox txtFields 
  391.                Appearance      =   0  'Flat
  392.                DataField       =   "部门"
  393.                Height          =   285
  394.                Index           =   14
  395.                Left            =   1680
  396.                TabIndex        =   9
  397.                Top             =   2288
  398.                Width           =   1695
  399.             End
  400.             Begin VB.TextBox txtFields 
  401.                Appearance      =   0  'Flat
  402.                DataField       =   "岗位"
  403.                Height          =   285
  404.                Index           =   15
  405.                Left            =   4800
  406.                TabIndex        =   10
  407.                Top             =   2288
  408.                Width           =   1695
  409.             End
  410.             Begin VB.TextBox txtFields 
  411.                Appearance      =   0  'Flat
  412.                DataField       =   "当事人约定的其他内容"
  413.                Height          =   765
  414.                Index           =   16
  415.                Left            =   1680
  416.                TabIndex        =   17
  417.                Top             =   3840
  418.                Width           =   4815
  419.             End
  420.             Begin MSComCtl2.DTPicker DTPicker3 
  421.                DataField       =   "结束时间"
  422.                Height          =   300
  423.                Left            =   7920
  424.                TabIndex        =   14
  425.                Top             =   2760
  426.                Width           =   1695
  427.                _ExtentX        =   2990
  428.                _ExtentY        =   529
  429.                _Version        =   393216
  430.                CheckBox        =   -1  'True
  431.                DateIsNull      =   -1  'True
  432.                Format          =   69271553
  433.                CurrentDate     =   36186
  434.             End
  435.             Begin MSComCtl2.DTPicker DTPicker4 
  436.                DataField       =   "开始时间"
  437.                Height          =   300
  438.                Left            =   4800
  439.                TabIndex        =   13
  440.                Top             =   2760
  441.                Width           =   1695
  442.                _ExtentX        =   2990
  443.                _ExtentY        =   529
  444.                _Version        =   393216
  445.                CheckBox        =   -1  'True
  446.                DateIsNull      =   -1  'True
  447.                Format          =   69271553
  448.                CurrentDate     =   36186
  449.             End
  450.             Begin MSComCtl2.DTPicker DTPicker5 
  451.                DataField       =   "试用开始时间"
  452.                Height          =   300
  453.                Left            =   1680
  454.                TabIndex        =   15
  455.                Top             =   3360
  456.                Width           =   1695
  457.                _ExtentX        =   2990
  458.                _ExtentY        =   529
  459.                _Version        =   393216
  460.                CheckBox        =   -1  'True
  461.                DateIsNull      =   -1  'True
  462.                Format          =   69271553
  463.                CurrentDate     =   36186
  464.             End
  465.             Begin MSComCtl2.DTPicker DTPicker6 
  466.                DataField       =   "试用结束时间"
  467.                Height          =   300
  468.                Left            =   4800
  469.                TabIndex        =   16
  470.                Top             =   3360
  471.                Width           =   1695
  472.                _ExtentX        =   2990
  473.                _ExtentY        =   529
  474.                _Version        =   393216
  475.                CheckBox        =   -1  'True
  476.                DateIsNull      =   -1  'True
  477.                Format          =   69271553
  478.                CurrentDate     =   36186
  479.             End
  480.             Begin MSComCtl2.DTPicker DTPicker7 
  481.                DataField       =   "停止时间"
  482.                Height          =   300
  483.                Left            =   7920
  484.                TabIndex        =   20
  485.                Top             =   4800
  486.                Width           =   1695
  487.                _ExtentX        =   2990
  488.                _ExtentY        =   529
  489.                _Version        =   393216
  490.                CheckBox        =   -1  'True
  491.                DateIsNull      =   -1  'True
  492.                Format          =   69271553
  493.                CurrentDate     =   36186
  494.             End
  495.             Begin VB.Label lblLabels 
  496.                Caption         =   "是否已停止"
  497.                Height          =   255
  498.                Index           =   20
  499.                Left            =   360
  500.                TabIndex        =   51
  501.                Top             =   4823
  502.                Width           =   1215
  503.             End
  504.             Begin VB.Label lblLabels 
  505.                Caption         =   "签定期限"
  506.                DataField       =   $"F_LaoDongHeTong.frx":0038
  507.                Height          =   255
  508.                Index           =   19
  509.                Left            =   360
  510.                TabIndex        =   50
  511.                Top             =   2783
  512.                Width           =   1215
  513.             End
  514.             Begin VB.Label lblLabels 
  515.                Caption         =   "劳动合同编号"
  516.                Height          =   255
  517.                Index           =   0
  518.                Left            =   360
  519.                TabIndex        =   47
  520.                Top             =   375
  521.                Width           =   1215
  522.             End
  523.             Begin VB.Label lblLabels 
  524.                Caption         =   "姓  名"
  525.                Height          =   255
  526.                Index           =   1
  527.                Left            =   3600
  528.                TabIndex        =   46
  529.                Top             =   375
  530.                Width           =   1095
  531.             End
  532.             Begin VB.Label lblLabels 
  533.                Caption         =   "签定时间"
  534.                Height          =   255
  535.                Index           =   2
  536.                Left            =   6720
  537.                TabIndex        =   45
  538.                Top             =   2303
  539.                Width           =   855
  540.             End
  541.             Begin VB.Label lblLabels 
  542.                Caption         =   "文化程度"
  543.                Height          =   255
  544.                Index           =   3
  545.                Left            =   6720
  546.                TabIndex        =   44
  547.                Top             =   375
  548.                Width           =   735
  549.             End
  550.             Begin VB.Label lblLabels 
  551.                Caption         =   "性  别"
  552.                Height          =   255
  553.                Index           =   4
  554.                Left            =   360
  555.                TabIndex        =   43
  556.                Top             =   855
  557.                Width           =   735
  558.             End
  559.             Begin VB.Label lblLabels 
  560.                Caption         =   "出生日期"
  561.                Height          =   255
  562.                Index           =   5
  563.                Left            =   3600
  564.                TabIndex        =   42
  565.                Top             =   855
  566.                Width           =   855
  567.             End
  568.             Begin VB.Label lblLabels 
  569.                Caption         =   "身份证号"
  570.                Height          =   255
  571.                Index           =   6
  572.                Left            =   6720
  573.                TabIndex        =   41
  574.                Top             =   1320
  575.                Width           =   855
  576.             End
  577.             Begin VB.Label lblLabels 
  578.                Caption         =   "家庭通讯地址"
  579.                Height          =   255
  580.                Index           =   7
  581.                Left            =   360
  582.                TabIndex        =   40
  583.                Top             =   1335
  584.                Width           =   1215
  585.             End
  586.             Begin VB.Label lblLabels 
  587.                Caption         =   "邮  编"
  588.                Height          =   255
  589.                Index           =   8
  590.                Left            =   6720
  591.                TabIndex        =   39
  592.                Top             =   855
  593.                Width           =   615
  594.             End
  595.             Begin VB.Label lblLabels 
  596.                Caption         =   "所在街道办事处"
  597.                Height          =   255
  598.                Index           =   9
  599.                Left            =   360
  600.                TabIndex        =   38
  601.                Top             =   1815
  602.                Width           =   1335
  603.             End
  604.             Begin VB.Label lblLabels 
  605.                Caption         =   "开始时间"
  606.                DataField       =   $"F_LaoDongHeTong.frx":0100
  607.                Height          =   255
  608.                Index           =   10
  609.                Left            =   3600
  610.                TabIndex        =   37
  611.                Top             =   2783
  612.                Width           =   1215
  613.             End
  614.             Begin VB.Label lblLabels 
  615.                Caption         =   "结束时间"
  616.                Height          =   255
  617.                Index           =   11
  618.                Left            =   6720
  619.                TabIndex        =   36
  620.                Top             =   2783
  621.                Width           =   975
  622.             End
  623.             Begin VB.Label lblLabels 
  624.                Caption         =   "试用开始时间"
  625.                Height          =   255
  626.                Index           =   12
  627.                Left            =   360
  628.                TabIndex        =   35
  629.                Top             =   3383
  630.                Width           =   1215
  631.             End
  632.             Begin VB.Label lblLabels 
  633.                Caption         =   "试用结束时间"
  634.                Height          =   255
  635.                Index           =   13
  636.                Left            =   3480
  637.                TabIndex        =   34
  638.                Top             =   3383
  639.                Width           =   1095
  640.             End
  641.             Begin VB.Label lblLabels 
  642.                Caption         =   "部  门"
  643.                Height          =   255
  644.                Index           =   14
  645.                Left            =   360
  646.                TabIndex        =   33
  647.                Top             =   2303
  648.                Width           =   735
  649.             End
  650.             Begin VB.Label lblLabels 
  651.                Caption         =   "岗  位"
  652.                Height          =   255
  653.                Index           =   15
  654.                Left            =   3600
  655.                TabIndex        =   32
  656.                Top             =   2303
  657.                Width           =   615
  658.             End
  659.             Begin VB.Label lblLabels 
  660.                Caption         =   "当事人约定的其他内容"
  661.                Height          =   495
  662.                Index           =   16
  663.                Left            =   360
  664.                TabIndex        =   31
  665.                Top             =   3840
  666.                Width           =   1095
  667.             End
  668.             Begin VB.Label lblLabels 
  669.                Caption         =   "停止方式"
  670.                Height          =   255
  671.                Index           =   17
  672.                Left            =   3720
  673.                TabIndex        =   30
  674.                Top             =   4823
  675.                Width           =   1215
  676.             End
  677.             Begin VB.Label lblLabels 
  678.                Caption         =   "停止时间"
  679.                Height          =   255
  680.                Index           =   18
  681.                Left            =   6720
  682.                TabIndex        =   29
  683.                Top             =   4823
  684.                Width           =   1095
  685.             End
  686.          End
  687.       End
  688.    End
  689. End
  690. Attribute VB_Name = "F_LaoDongHeTong"
  691. Attribute VB_GlobalNameSpace = False
  692. Attribute VB_Creatable = False
  693. Attribute VB_PredeclaredId = True
  694. Attribute VB_Exposed = False
  695. Dim WithEvents adoPrimaryRS As Recordset
  696. Attribute adoPrimaryRS.VB_VarHelpID = -1
  697. Dim mvBookMark As Variant
  698. Dim mbEditFlag As Boolean
  699. Dim mbAddNewFlag As Boolean
  700. Private Sub Combo1_KeyPress(KeyAscii As Integer)
  701. If KeyAscii = vbKeyReturn Then
  702.     SendKeys "{TAB}"
  703. End If
  704. End Sub
  705. Private Sub Combo2_KeyPress(KeyAscii As Integer)
  706. If KeyAscii = vbKeyReturn Then
  707.     SendKeys "{TAB}"
  708. End If
  709. End Sub
  710. Private Sub DTPicker1_KeyPress(KeyAscii As Integer)
  711. If KeyAscii = vbKeyReturn Then
  712.     SendKeys "{TAB}"
  713. End If
  714. End Sub
  715. Private Sub DTPicker2_KeyPress(KeyAscii As Integer)
  716. If KeyAscii = vbKeyReturn Then
  717.     SendKeys "{TAB}"
  718. End If
  719. End Sub
  720. Private Sub DTPicker3_KeyPress(KeyAscii As Integer)
  721. If KeyAscii = vbKeyReturn Then
  722.     SendKeys "{TAB}"
  723. End If
  724. End Sub
  725. Private Sub DTPicker4_KeyPress(KeyAscii As Integer)
  726. If KeyAscii = vbKeyReturn Then
  727.     SendKeys "{TAB}"
  728. End If
  729. End Sub
  730. Private Sub DTPicker5_KeyPress(KeyAscii As Integer)
  731. If KeyAscii = vbKeyReturn Then
  732.     SendKeys "{TAB}"
  733. End If
  734. End Sub
  735. Private Sub DTPicker6_KeyPress(KeyAscii As Integer)
  736. If KeyAscii = vbKeyReturn Then
  737.     SendKeys "{TAB}"
  738. End If
  739. End Sub
  740. Private Sub DTPicker7_KeyPress(KeyAscii As Integer)
  741. If KeyAscii = vbKeyReturn Then
  742.     SendKeys "{TAB}"
  743. End If
  744. End Sub
  745. Private Sub Form_Load()
  746. On Error Resume Next
  747.     For Each TextBox In Me.Controls
  748.         TextBox.Font.Name = "宋体"
  749.         TextBox.Font.Size = 9
  750.     Next
  751.   Set adoPrimaryRS = New Recordset
  752.   adoPrimaryRS.Open "select * from 劳动合同 ", db, adOpenStatic, adLockOptimistic
  753.   Set DTPicker1.DataSource = adoPrimaryRS
  754.   Set DTPicker2.DataSource = adoPrimaryRS
  755.   Set DTPicker3.DataSource = adoPrimaryRS
  756.   Set DTPicker4.DataSource = adoPrimaryRS
  757.   Set DTPicker5.DataSource = adoPrimaryRS
  758.   Set DTPicker6.DataSource = adoPrimaryRS
  759.   Set DTPicker7.DataSource = adoPrimaryRS
  760.     
  761.    Set DataGrid1.DataSource = adoPrimaryRS
  762.    
  763.    Set Combo1.DataSource = adoPrimaryRS
  764.    Set Combo2.DataSource = adoPrimaryRS
  765.    
  766.   SetButtons True
  767.   
  768.   Dim oText As TextBox
  769.   'Bind the text boxes to the data provider
  770.   For Each oText In Me.txtFields
  771.     Set oText.DataSource = adoPrimaryRS
  772.   Next
  773.   
  774.   Combo1.AddItem "终止"
  775.   Combo1.AddItem "解除"
  776.   Combo1.AddItem "续定"
  777.   
  778.   Combo2.AddItem "是"
  779.   Combo2.AddItem "否"
  780.  
  781. End Sub
  782. Private Sub Form_Unload(Cancel As Integer)
  783.   Screen.MousePointer = vbDefault
  784. End Sub
  785. Private Sub cmdAdd_Click()
  786.   On Error GoTo AddErr
  787.  With adoPrimaryRS
  788.     If Not (.BOF And .EOF) Then
  789.       mvBookMark = .Bookmark
  790.     End If
  791.     .AddNew
  792.     mbAddNewFlag = True
  793.     SetButtons False
  794.   End With
  795.   On Error GoTo 0
  796.   Exit Sub
  797. AddErr:
  798.   MsgBox "增加操作有错误", vbExclamation + vbOKOnly, pTitle
  799.   
  800. End Sub
  801. Private Sub cmdDelete_Click()
  802.   On Error GoTo DeleteErr
  803.   With adoPrimaryRS
  804.     .Delete
  805.     .MoveNext
  806.     If .EOF Then .MoveLast
  807.   End With
  808.   If MsgBox("确认删除劳动合同信息吗?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
  809.   Exit Sub
  810. DeleteErr:
  811.   MsgBox "删除操作有错误", vbExclamation + vbOKOnly, pTitle
  812. End Sub
  813. Private Sub cmdRefresh_Click()
  814.   'This is only needed for multi user apps
  815.   On Error GoTo RefreshErr
  816.   adoPrimaryRS.Requery
  817.   Exit Sub
  818. RefreshErr:
  819.    MsgBox "刷新操作有错误", vbExclamation + vbOKOnly, pTitle
  820. End Sub
  821. Private Sub cmdEdit_Click()
  822.   On Error GoTo EditErr
  823.   mbEditFlag = True
  824.   SetButtons False
  825.   On Error GoTo 0
  826.   Exit Sub
  827. EditErr:
  828.    MsgBox "更改操作有错误", vbExclamation + vbOKOnly, pTitle
  829. End Sub
  830. Private Sub cmdCancel_Click()
  831.  ' On Error Resume Next
  832.  On Error GoTo CancelErr
  833.   mbEditFlag = False
  834.   mbAddNewFlag = False
  835.   adoPrimaryRS.CancelUpdate
  836.   If mvBookMark > 0 Then
  837.    adoPrimaryRS.Bookmark = mvBookMark
  838.   Else
  839.    adoPrimaryRS.MoveFirst
  840.   End If
  841.  SetButtons True
  842.   Exit Sub
  843. CancelErr:
  844.    
  845.    MsgBox "取消操作有错误", vbExclamation + vbOKOnly, pTitle
  846.   SetButtons True
  847. End Sub
  848. Private Sub cmdUpdate_Click()
  849.   On Error GoTo UpdateErr
  850.   If MsgBox("是否确认此操作?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
  851.   adoPrimaryRS.UpdateBatch adAffectAll
  852.   If mbAddNewFlag Then
  853.     adoPrimaryRS.MoveLast              'move to the new record
  854.   End If
  855.   mbEditFlag = False
  856.   mbAddNewFlag = False
  857.   SetButtons True
  858.   Exit Sub
  859. UpdateErr:
  860.    MsgBox "保存操作有错误", vbExclamation + vbOKOnly, pTitle
  861.    SetButtons True
  862. End Sub
  863. Private Sub cmdClose_Click()
  864.     RSGL.Enabled = True
  865.     Unload Me
  866. End Sub
  867. Private Sub SetButtons(bVal As Boolean)
  868. Dim oText As TextBox
  869.   
  870.   CmdAdd.Visible = bVal
  871.   cmdEdit.Visible = bVal
  872.   cmdUpdate.Visible = Not bVal
  873.   cmdCancel.Visible = Not bVal
  874.   CmdDelete.Visible = bVal
  875.   cmdClose.Visible = bVal
  876.   cmdRefresh.Visible = bVal
  877.   
  878.   For Each oText In Me.txtFields
  879.      oText.Enabled = Not bVal
  880.   Next
  881.   
  882.   DTPicker1.Enabled = Not bVal
  883.   DTPicker2.Enabled = Not bVal
  884.   DTPicker3.Enabled = Not bVal
  885.   DTPicker4.Enabled = Not bVal
  886.   DTPicker5.Enabled = Not bVal
  887.   DTPicker6.Enabled = Not bVal
  888.   DTPicker7.Enabled = Not bVal
  889.   
  890.   If bVal Then
  891.    Set DataGrid1.DataSource = adoPrimaryRS
  892.   Else
  893.    Set DataGrid1.DataSource = Nothing
  894.   End If
  895.   
  896.   Combo1.Enabled = Not bVal
  897.   Combo2.Enabled = Not bVal
  898. End Sub
  899. Private Sub txtFields_KeyPress(Index As Integer, KeyAscii As Integer)
  900. If KeyAscii = vbKeyReturn Then
  901.     SendKeys "{TAB}"
  902. End If
  903. End Sub
  904. Private Sub txtFields_LostFocus(Index As Integer)
  905. If Index = 0 Then
  906. Dim Sql3 As String
  907. Sql3 = "select  distinct 部门 ,姓名 ,性别 ,出生日期 ,岗位,学历 ,家庭通讯地址 ,邮编 ,身份证号,所在街道办事处   from 员工基本信息  where 员工号 = '" & txtFields(0).Text & "'"
  908.     Set rs3 = db.Execute(Sql3)
  909.    If Not rs3.EOF Then
  910.    
  911.    If Not IsNull(rs3("姓名")) Then
  912.        txtFields(1).Text = Trim(rs3("姓名"))
  913.    End If
  914.    
  915.    If Not IsNull(rs3("学历")) Then
  916.        txtFields(3).Text = Trim(rs3("学历"))
  917.    End If
  918.    
  919.    If Not IsNull(rs3("性别")) Then
  920.        txtFields(4).Text = Trim(rs3("性别"))
  921.    End If
  922.    
  923.    If Not IsNull(rs3("出生日期")) Then
  924.        DTPicker1.Value = Trim(rs3("出生日期"))
  925.    End If
  926.    
  927.    If Not IsNull(rs3("邮编")) Then
  928.        txtFields(8).Text = Trim(rs3("邮编"))
  929.    End If
  930.    
  931.    If Not IsNull(rs3("家庭通讯地址")) Then
  932.        txtFields(7).Text = Trim(rs3("家庭通讯地址"))
  933.    End If
  934.    
  935.    If Not IsNull(rs3("身份证号")) Then
  936.        txtFields(6).Text = Trim(rs3("身份证号"))
  937.    End If
  938.    
  939.    If Not IsNull(rs3("所在街道办事处")) Then
  940.        txtFields(7).Text = Trim(rs3("所在街道办事处"))
  941.    End If
  942.    
  943.   
  944.    End If
  945. End If
  946. End Sub