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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form main_rsgl_bxgl_lr 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   2175
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   6960
  10.    Icon            =   "main_rsgl_bxgl_lr.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2175
  15.    ScaleWidth      =   6960
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   2  '屏幕中心
  18.    Begin VB.CommandButton Command2 
  19.       Caption         =   "取消"
  20.       Height          =   390
  21.       Left            =   3615
  22.       TabIndex        =   12
  23.       Top             =   1650
  24.       Width           =   1770
  25.    End
  26.    Begin VB.CommandButton Command1 
  27.       Caption         =   "确定"
  28.       Height          =   390
  29.       Left            =   1725
  30.       TabIndex        =   11
  31.       Top             =   1650
  32.       Width           =   1770
  33.    End
  34.    Begin VB.Frame Frame1 
  35.       Height          =   1590
  36.       Left            =   15
  37.       TabIndex        =   0
  38.       Top             =   -60
  39.       Width           =   6930
  40.       Begin VB.TextBox Text1 
  41.          Enabled         =   0   'False
  42.          Height          =   330
  43.          Index           =   0
  44.          Left            =   990
  45.          TabIndex        =   5
  46.          Top             =   255
  47.          Width           =   2400
  48.       End
  49.       Begin VB.TextBox Text1 
  50.          Enabled         =   0   'False
  51.          Height          =   330
  52.          Index           =   1
  53.          Left            =   4425
  54.          TabIndex        =   4
  55.          Top             =   255
  56.          Width           =   2400
  57.       End
  58.       Begin VB.TextBox Text1 
  59.          Height          =   330
  60.          Index           =   2
  61.          Left            =   990
  62.          TabIndex        =   3
  63.          Top             =   660
  64.          Width           =   2400
  65.       End
  66.       Begin VB.TextBox Text1 
  67.          Height          =   330
  68.          Index           =   4
  69.          Left            =   990
  70.          TabIndex        =   2
  71.          Top             =   1080
  72.          Width           =   2400
  73.       End
  74.       Begin VB.TextBox Text1 
  75.          Height          =   330
  76.          Index           =   3
  77.          Left            =   4425
  78.          TabIndex        =   1
  79.          Top             =   660
  80.          Width           =   2400
  81.       End
  82.       Begin VB.Label Label1 
  83.          BackStyle       =   0  'Transparent
  84.          Caption         =   "员工编号:"
  85.          Height          =   255
  86.          Left            =   75
  87.          TabIndex        =   10
  88.          Top             =   315
  89.          Width           =   1005
  90.       End
  91.       Begin VB.Label Label2 
  92.          BackStyle       =   0  'Transparent
  93.          Caption         =   "员工姓名:"
  94.          Height          =   255
  95.          Left            =   3480
  96.          TabIndex        =   9
  97.          Top             =   315
  98.          Width           =   1005
  99.       End
  100.       Begin VB.Label Label4 
  101.          BackStyle       =   0  'Transparent
  102.          Caption         =   "养老保险:"
  103.          Height          =   255
  104.          Left            =   90
  105.          TabIndex        =   8
  106.          Top             =   750
  107.          Width           =   930
  108.       End
  109.       Begin VB.Label Label7 
  110.          BackStyle       =   0  'Transparent
  111.          Caption         =   "失业保险:"
  112.          Height          =   255
  113.          Left            =   3450
  114.          TabIndex        =   7
  115.          Top             =   735
  116.          Width           =   975
  117.       End
  118.       Begin VB.Label Label8 
  119.          BackStyle       =   0  'Transparent
  120.          Caption         =   "医疗保险:"
  121.          Height          =   255
  122.          Left            =   105
  123.          TabIndex        =   6
  124.          Top             =   1170
  125.          Width           =   1080
  126.       End
  127.    End
  128.    Begin MSAdodcLib.Adodc Adodc1 
  129.       Height          =   330
  130.       Left            =   0
  131.       Top             =   0
  132.       Visible         =   0   'False
  133.       Width           =   2040
  134.       _ExtentX        =   3598
  135.       _ExtentY        =   582
  136.       ConnectMode     =   0
  137.       CursorLocation  =   3
  138.       IsolationLevel  =   -1
  139.       ConnectionTimeout=   15
  140.       CommandTimeout  =   30
  141.       CursorType      =   3
  142.       LockType        =   3
  143.       CommandType     =   2
  144.       CursorOptions   =   0
  145.       CacheSize       =   50
  146.       MaxRecords      =   0
  147.       BOFAction       =   0
  148.       EOFAction       =   0
  149.       ConnectStringType=   1
  150.       Appearance      =   1
  151.       BackColor       =   -2147483643
  152.       ForeColor       =   -2147483640
  153.       Orientation     =   0
  154.       Enabled         =   -1
  155.       Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  156.       OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  157.       OLEDBFile       =   ""
  158.       DataSourceName  =   ""
  159.       OtherAttributes =   ""
  160.       UserName        =   ""
  161.       Password        =   ""
  162.       RecordSource    =   "培训课程表"
  163.       Caption         =   "Adodc1"
  164.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  165.          Name            =   "宋体"
  166.          Size            =   9
  167.          Charset         =   134
  168.          Weight          =   400
  169.          Underline       =   0   'False
  170.          Italic          =   0   'False
  171.          Strikethrough   =   0   'False
  172.       EndProperty
  173.       _Version        =   393216
  174.    End
  175. End
  176. Attribute VB_Name = "main_rsgl_bxgl_lr"
  177. Attribute VB_GlobalNameSpace = False
  178. Attribute VB_Creatable = False
  179. Attribute VB_PredeclaredId = True
  180. Attribute VB_Exposed = False
  181. Private Sub Form_Activate()
  182.   Text1(2).SetFocus
  183. End Sub
  184. Private Sub Form_Load()
  185.   If blnAddBX = True Then
  186.     Me.Caption = "保险信息添加"
  187.   Else
  188.     Me.Caption = "保险信息修改"
  189.     With main_rsgl_bxgl.Adodc1.Recordset
  190.      If .RecordCount > 0 Then
  191.         Text1(0) = .Fields("员工编号")
  192.         Text1(1) = .Fields("员工姓名")
  193.         Text1(2) = .Fields("养老保险")
  194.         Text1(3) = .Fields("失业保险")
  195.         Text1(4) = .Fields("医疗保险")
  196.     End If
  197.    End With
  198.   End If
  199. End Sub
  200. Private Sub Command1_Click()
  201.   If IsNumeric(Text1(2)) = False Or IsNumeric(Text1(3)) = False Or IsNumeric(Text1(4)) = False Then
  202.     MsgBox "请输入数值型数据!"
  203.     Exit Sub
  204.   End If
  205.   If blnAddBX = True Then
  206.     Cnn.Execute ("insert into 保险表(员工编号,员工姓名,养老保险,失业保险,医疗保险) " _
  207.      & "values('" + Text1(0) + "','" + Text1(1) + "'," + Text1(2) + "," + Text1(3) + _
  208.      "," + Text1(4) + ")")
  209.   Else
  210.     Cnn.Execute ("update 保险表 set 养老保险=" + Text1(2) + ",失业保险=" + Text1(3) + _
  211.     ",医疗保险=" + Text1(4) + "where 员工编号='" + Text1(0) + "'")
  212.   End If
  213.   main_rsgl_bxgl.Adodc1.Refresh
  214.   Unload Me
  215. End Sub
  216. Private Sub Command2_Click()
  217.   Unload Me
  218. End Sub
  219. Private Sub Text1_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer)
  220.   If KeyCode = vbKeyReturn And index >= 2 And index < 4 Then Text1(index + 1).SetFocus
  221.   If KeyCode = vbKeyReturn And index = 4 Then Command1.SetFocus
  222. End Sub