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

企业管理

开发平台:

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 = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  5. Begin VB.Form F_LaoWuFeiCX 
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "劳务费查询"
  8.    ClientHeight    =   6660
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   10140
  12.    ControlBox      =   0   'False
  13.    LinkTopic       =   "Form1"
  14.    LockControls    =   -1  'True
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    Moveable        =   0   'False
  18.    ScaleHeight     =   6660
  19.    ScaleWidth      =   10140
  20.    ShowInTaskbar   =   0   'False
  21.    StartUpPosition =   2  '屏幕中心
  22.    Begin VB.Frame Frame1 
  23.       Caption         =   "选择查询条件"
  24.       Height          =   1455
  25.       Left            =   0
  26.       TabIndex        =   5
  27.       Top             =   120
  28.       Width           =   9735
  29.       Begin Threed.SSCommand Command1 
  30.          Height          =   375
  31.          Left            =   6840
  32.          TabIndex        =   30
  33.          Top             =   840
  34.          Width           =   1095
  35.          _Version        =   65536
  36.          _ExtentX        =   1931
  37.          _ExtentY        =   661
  38.          _StockProps     =   78
  39.          Caption         =   "&S.查 询"
  40.          Font3D          =   3
  41.       End
  42.       Begin VB.CheckBox Check2 
  43.          Caption         =   "Check2"
  44.          Height          =   255
  45.          Left            =   1800
  46.          TabIndex        =   8
  47.          Top             =   360
  48.          Width           =   255
  49.       End
  50.       Begin VB.CheckBox Check1 
  51.          Caption         =   "Check1"
  52.          Height          =   255
  53.          Left            =   360
  54.          TabIndex        =   7
  55.          Top             =   360
  56.          Width           =   255
  57.       End
  58.       Begin VB.ComboBox Combo2 
  59.          Height          =   315
  60.          Left            =   360
  61.          TabIndex        =   0
  62.          Top             =   840
  63.          Visible         =   0   'False
  64.          Width           =   1695
  65.       End
  66.       Begin VB.ComboBox Combo1 
  67.          Height          =   315
  68.          Left            =   360
  69.          TabIndex        =   6
  70.          Top             =   840
  71.          Visible         =   0   'False
  72.          Width           =   1695
  73.       End
  74.       Begin MSComCtl2.DTPicker DTPicker2 
  75.          Height          =   300
  76.          Left            =   4800
  77.          TabIndex        =   2
  78.          Top             =   840
  79.          Visible         =   0   'False
  80.          Width           =   1455
  81.          _ExtentX        =   2566
  82.          _ExtentY        =   529
  83.          _Version        =   393216
  84.          Format          =   69009409
  85.          CurrentDate     =   36251
  86.       End
  87.       Begin MSComCtl2.DTPicker DTPicker1 
  88.          Height          =   300
  89.          Left            =   2160
  90.          TabIndex        =   1
  91.          Top             =   840
  92.          Visible         =   0   'False
  93.          Width           =   1575
  94.          _ExtentX        =   2778
  95.          _ExtentY        =   529
  96.          _Version        =   393216
  97.          Format          =   69009409
  98.          CurrentDate     =   36251
  99.       End
  100.       Begin Threed.SSCommand SSCommand1 
  101.          Height          =   375
  102.          Left            =   8160
  103.          TabIndex        =   32
  104.          Top             =   840
  105.          Width           =   1095
  106.          _Version        =   65536
  107.          _ExtentX        =   1931
  108.          _ExtentY        =   661
  109.          _StockProps     =   78
  110.          Caption         =   "&Q.关 闭"
  111.          Font3D          =   3
  112.       End
  113.       Begin VB.Label Label5 
  114.          Caption         =   "结束时间"
  115.          Height          =   255
  116.          Left            =   3960
  117.          TabIndex        =   12
  118.          Top             =   900
  119.          Visible         =   0   'False
  120.          Width           =   735
  121.       End
  122.       Begin VB.Label Label4 
  123.          Caption         =   "开始时间"
  124.          Height          =   375
  125.          Left            =   360
  126.          TabIndex        =   11
  127.          Top             =   840
  128.          Visible         =   0   'False
  129.          Width           =   735
  130.       End
  131.       Begin VB.Label Label2 
  132.          Caption         =   "时间"
  133.          Height          =   255
  134.          Left            =   2160
  135.          TabIndex        =   10
  136.          Top             =   400
  137.          Width           =   975
  138.       End
  139.       Begin VB.Label Label1 
  140.          Caption         =   "项目"
  141.          Height          =   255
  142.          Left            =   720
  143.          TabIndex        =   9
  144.          Top             =   400
  145.          Width           =   975
  146.       End
  147.    End
  148.    Begin VB.Frame Frame3 
  149.       Height          =   4695
  150.       Left            =   0
  151.       TabIndex        =   13
  152.       Top             =   1680
  153.       Width           =   9735
  154.       Begin VB.TextBox txtFields 
  155.          Appearance      =   0  'Flat
  156.          DataField       =   "项目"
  157.          Height          =   285
  158.          Index           =   1
  159.          Left            =   7320
  160.          TabIndex        =   21
  161.          Top             =   600
  162.          Width           =   2055
  163.       End
  164.       Begin VB.TextBox txtFields 
  165.          Appearance      =   0  'Flat
  166.          DataField       =   "人数"
  167.          Height          =   285
  168.          Index           =   2
  169.          Left            =   7320
  170.          TabIndex        =   20
  171.          Top             =   1320
  172.          Width           =   2055
  173.       End
  174.       Begin VB.TextBox txtFields 
  175.          Appearance      =   0  'Flat
  176.          DataField       =   "税前工资"
  177.          Height          =   285
  178.          Index           =   3
  179.          Left            =   2160
  180.          TabIndex        =   19
  181.          Top             =   2040
  182.          Width           =   2055
  183.       End
  184.       Begin VB.TextBox txtFields 
  185.          Appearance      =   0  'Flat
  186.          DataField       =   "税率"
  187.          Height          =   285
  188.          Index           =   4
  189.          Left            =   7320
  190.          TabIndex        =   18
  191.          Top             =   2040
  192.          Width           =   2055
  193.       End
  194.       Begin VB.TextBox txtFields 
  195.          Appearance      =   0  'Flat
  196.          DataField       =   "个人税"
  197.          Height          =   285
  198.          Index           =   5
  199.          Left            =   2160
  200.          TabIndex        =   17
  201.          Top             =   2760
  202.          Width           =   2055
  203.       End
  204.       Begin VB.TextBox txtFields 
  205.          Appearance      =   0  'Flat
  206.          DataField       =   "实发金额"
  207.          Enabled         =   0   'False
  208.          Height          =   285
  209.          Index           =   6
  210.          Left            =   7320
  211.          TabIndex        =   16
  212.          Top             =   2760
  213.          Width           =   2055
  214.       End
  215.       Begin VB.ComboBox Combo3 
  216.          Appearance      =   0  'Flat
  217.          DataField       =   "所属部门"
  218.          Height          =   300
  219.          Left            =   2160
  220.          TabIndex        =   14
  221.          Top             =   1320
  222.          Width           =   2055
  223.       End
  224.       Begin MSComCtl2.DTPicker DTPicker3 
  225.          DataField       =   "时间"
  226.          Height          =   300
  227.          Left            =   2160
  228.          TabIndex        =   15
  229.          Top             =   600
  230.          Width           =   2055
  231.          _ExtentX        =   3625
  232.          _ExtentY        =   529
  233.          _Version        =   393216
  234.          CheckBox        =   -1  'True
  235.          DateIsNull      =   -1  'True
  236.          Format          =   69009409
  237.          CurrentDate     =   36187
  238.       End
  239.       Begin Threed.SSCommand CmdXianShi_Exit 
  240.          Height          =   375
  241.          Left            =   8280
  242.          TabIndex        =   31
  243.          Top             =   4080
  244.          Width           =   1095
  245.          _Version        =   65536
  246.          _ExtentX        =   1931
  247.          _ExtentY        =   661
  248.          _StockProps     =   78
  249.          Caption         =   "&E.关闭"
  250.          Font3D          =   3
  251.       End
  252.       Begin VB.Label lblLabels 
  253.          Caption         =   "时  间"
  254.          Height          =   255
  255.          Index           =   0
  256.          Left            =   360
  257.          TabIndex        =   29
  258.          Top             =   600
  259.          Width           =   1815
  260.       End
  261.       Begin VB.Label lblLabels 
  262.          Caption         =   "项  目"
  263.          Height          =   255
  264.          Index           =   1
  265.          Left            =   5520
  266.          TabIndex        =   28
  267.          Top             =   600
  268.          Width           =   1815
  269.       End
  270.       Begin VB.Label lblLabels 
  271.          Caption         =   "人  数"
  272.          Height          =   255
  273.          Index           =   2
  274.          Left            =   5520
  275.          TabIndex        =   27
  276.          Top             =   1320
  277.          Width           =   975
  278.       End
  279.       Begin VB.Label lblLabels 
  280.          Caption         =   "税前工资"
  281.          Height          =   255
  282.          Index           =   3
  283.          Left            =   360
  284.          TabIndex        =   26
  285.          Top             =   2040
  286.          Width           =   975
  287.       End
  288.       Begin VB.Label lblLabels 
  289.          Caption         =   "税  率"
  290.          Height          =   255
  291.          Index           =   4
  292.          Left            =   5520
  293.          TabIndex        =   25
  294.          Top             =   2040
  295.          Width           =   735
  296.       End
  297.       Begin VB.Label lblLabels 
  298.          Caption         =   "个人税"
  299.          Height          =   255
  300.          Index           =   5
  301.          Left            =   360
  302.          TabIndex        =   24
  303.          Top             =   2760
  304.          Width           =   1815
  305.       End
  306.       Begin VB.Label lblLabels 
  307.          Caption         =   "实发金额"
  308.          Height          =   255
  309.          Index           =   6
  310.          Left            =   5520
  311.          TabIndex        =   23
  312.          Top             =   2760
  313.          Width           =   855
  314.       End
  315.       Begin VB.Label lblLabels 
  316.          Caption         =   "所属部门"
  317.          Height          =   255
  318.          Index           =   7
  319.          Left            =   360
  320.          TabIndex        =   22
  321.          Top             =   1320
  322.          Width           =   975
  323.       End
  324.    End
  325.    Begin VB.Frame Frame2 
  326.       Caption         =   "查询结果"
  327.       Height          =   4695
  328.       Left            =   0
  329.       TabIndex        =   3
  330.       Top             =   1680
  331.       Width           =   9735
  332.       Begin MSDataGridLib.DataGrid DataGrid1 
  333.          Height          =   3615
  334.          Left            =   240
  335.          TabIndex        =   4
  336.          Top             =   360
  337.          Width           =   9255
  338.          _ExtentX        =   16325
  339.          _ExtentY        =   6376
  340.          _Version        =   393216
  341.          HeadLines       =   1
  342.          RowHeight       =   15
  343.          BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  344.             Name            =   "MS Sans Serif"
  345.             Size            =   8.25
  346.             Charset         =   0
  347.             Weight          =   400
  348.             Underline       =   0   'False
  349.             Italic          =   0   'False
  350.             Strikethrough   =   0   'False
  351.          EndProperty
  352.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  353.             Name            =   "MS Sans Serif"
  354.             Size            =   8.25
  355.             Charset         =   0
  356.             Weight          =   400
  357.             Underline       =   0   'False
  358.             Italic          =   0   'False
  359.             Strikethrough   =   0   'False
  360.          EndProperty
  361.          ColumnCount     =   2
  362.          BeginProperty Column00 
  363.             DataField       =   ""
  364.             Caption         =   ""
  365.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  366.                Type            =   0
  367.                Format          =   ""
  368.                HaveTrueFalseNull=   0
  369.                FirstDayOfWeek  =   0
  370.                FirstWeekOfYear =   0
  371.                LCID            =   2052
  372.                SubFormatType   =   0
  373.             EndProperty
  374.          EndProperty
  375.          BeginProperty Column01 
  376.             DataField       =   ""
  377.             Caption         =   ""
  378.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  379.                Type            =   0
  380.                Format          =   ""
  381.                HaveTrueFalseNull=   0
  382.                FirstDayOfWeek  =   0
  383.                FirstWeekOfYear =   0
  384.                LCID            =   2052
  385.                SubFormatType   =   0
  386.             EndProperty
  387.          EndProperty
  388.          SplitCount      =   1
  389.          BeginProperty Split0 
  390.             BeginProperty Column00 
  391.             EndProperty
  392.             BeginProperty Column01 
  393.             EndProperty
  394.          EndProperty
  395.       End
  396.       Begin Threed.SSCommand Command3 
  397.          Height          =   375
  398.          Left            =   8280
  399.          TabIndex        =   33
  400.          Top             =   4080
  401.          Width           =   1095
  402.          _Version        =   65536
  403.          _ExtentX        =   1931
  404.          _ExtentY        =   661
  405.          _StockProps     =   78
  406.          Caption         =   "&X.显 示"
  407.          Font3D          =   3
  408.       End
  409.    End
  410. End
  411. Attribute VB_Name = "F_LaoWuFeiCX"
  412. Attribute VB_GlobalNameSpace = False
  413. Attribute VB_Creatable = False
  414. Attribute VB_PredeclaredId = True
  415. Attribute VB_Exposed = False
  416. Dim WithEvents rs As Recordset
  417. Attribute rs.VB_VarHelpID = -1
  418. Dim WithEvents adoPrimaryRS As Recordset
  419. Attribute adoPrimaryRS.VB_VarHelpID = -1
  420. Dim WithEvents adoXianshiRS As Recordset
  421. Attribute adoXianshiRS.VB_VarHelpID = -1
  422. Dim Row_ID As String  '为找到ID 的查询SQL 语句
  423. Private Sub Check1_Click()
  424. If Check1.Value = 1 Then
  425.     Check2.Value = 0
  426.    
  427.     Combo1.Clear
  428.     
  429.     Sql = "select distinct 项目 from 劳务费登记"
  430.     Set rs = db.Execute(Sql)
  431.     
  432.     Do While Not rs.EOF
  433.             If IsNull(rs("项目")) = False Then
  434.                 Combo1.AddItem rs("项目")
  435.             End If
  436.             rs.MoveNext
  437.     Loop
  438.     Combo1.Visible = True
  439.    
  440.     Label4.Visible = False
  441.     Label5.Visible = False
  442.     DTPicker1.Visible = False
  443.     DTPicker2.Visible = False
  444.     Frame2.Visible = False
  445.     Frame3.Visible = False
  446. End If
  447. End Sub
  448. Private Sub Check2_Click()
  449. If Check2.Value = 1 Then
  450.     Check1.Value = 0
  451.  
  452.    
  453.     Combo1.Visible = False
  454.    
  455.     Label4.Visible = True
  456.     Label5.Visible = True
  457.     DTPicker1.Visible = True
  458.     DTPicker2.Visible = True
  459.     
  460.     Frame2.Visible = False
  461.     Frame3.Visible = False
  462. End If
  463. End Sub
  464. Private Sub CmdXianShi_Exit_Click()
  465. Frame2.Visible = True
  466. Frame3.Visible = False
  467. End Sub
  468. Private Sub Command1_Click()
  469. Dim DataGrid_sql  As String  '数据表格中的数据源
  470. Dim oText As TextBox
  471. If Check1.Value = 1 Then
  472.          
  473.    DataGrid_sql = "select * from 劳务费登记 where 项目 ='" & Combo1.Text & "'"
  474.    Set adoPrimaryRS = New Recordset
  475.     adoPrimaryRS.Open DataGrid_sql, db, adOpenStatic, adLockOptimistic
  476.     Set DataGrid1.DataSource = adoPrimaryRS
  477.     
  478.           
  479.     Frame3.Visible = False
  480.     Frame2.Visible = True
  481.    
  482.  End If
  483.    
  484.  If Check2.Value = 1 Then
  485.     DataGrid_sql = "select * from 劳务费登记 where 时间   between ' " & DTPicker1 & " ' and ' " & DTPicker2 & " '"
  486.     Set adoPrimaryRS = New Recordset
  487.     adoPrimaryRS.Open DataGrid_sql, db, adOpenStatic, adLockOptimistic
  488.     Set DataGrid1.DataSource = adoPrimaryRS
  489.     
  490.           
  491.     Frame3.Visible = False
  492.     Frame2.Visible = True
  493.         
  494.   
  495.        
  496. End If
  497.     
  498.     
  499.     
  500.     
  501. End Sub
  502. Private Sub Command2_Click()
  503. RSGL.Enabled = True
  504. Unload Me
  505. End Sub
  506. Private Sub Command3_Click()
  507. Dim XianShi_sql    As String '单条数据显示的数据源
  508.   
  509.   
  510.   If Row_ID = "" Then
  511.     MsgBox "请您选择其中一条信息!"
  512.     Exit Sub
  513.   Else
  514.     XianShi_sql = "select * from 劳务费登记 where ID = " & Row_ID
  515.     
  516.     Set adoXianshiRS = New Recordset
  517.     adoXianshiRS.Open XianShi_sql, db, adOpenStatic, adLockOptimistic
  518.          
  519.    
  520.     For Each oText In Me.txtFields
  521.           Set oText.DataSource = adoXianshiRS
  522.     Next
  523.     
  524.     Set DTPicker3.DataSource = adoXianshiRS
  525.     Set Combo3.DataSource = adoXianshiRS
  526.    
  527.   
  528. End If
  529.   
  530.   Frame2.Visible = False
  531.   Frame3.Visible = True
  532.        
  533. End Sub
  534. Private Sub DataGrid1_Click()
  535.   If Not adoPrimaryRS.BOF And Not adoPrimaryRS.EOF Then
  536.       If Not IsNull(adoPrimaryRS.Fields("ID")) Then
  537.           Row_ID = adoPrimaryRS.Fields("ID")
  538.       Else
  539.           MsgBox "请您选择其中一条信息!"
  540.       End If
  541.    Else
  542.     Exit Sub
  543.   End If
  544.   
  545. End Sub
  546. Private Sub Form_Load()
  547. On Error Resume Next
  548. For Each TextBox In Me.Controls
  549.     TextBox.Font.Name = "宋体"
  550.     TextBox.Font.Size = 9
  551. Next
  552. Frame2.Visible = False
  553. Frame3.Visible = False
  554. For Each oText In Me.txtFields
  555.    oText.Locked = True
  556. Next
  557. DTPicker3.Enabled = True
  558. Combo3.Enabled = True
  559. Me.DTPicker1.Value = Format(Now, "yyyy年mm月dd日")
  560. Me.DTPicker2.Value = Format(Now, "yyyy年mm月dd日")
  561.            
  562. End Sub