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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
  4. Begin VB.Form main_gzgl_xyfgz 
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Form1"
  7.    ClientHeight    =   2760
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   4080
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2760
  15.    ScaleWidth      =   4080
  16.    StartUpPosition =   2  '屏幕中心
  17.    Begin MSComctlLib.ProgressBar ProgressBar1 
  18.       Height          =   240
  19.       Left            =   90
  20.       TabIndex        =   9
  21.       Top             =   1800
  22.       Visible         =   0   'False
  23.       Width           =   3915
  24.       _ExtentX        =   6906
  25.       _ExtentY        =   423
  26.       _Version        =   393216
  27.       Appearance      =   1
  28.    End
  29.    Begin VB.CommandButton Command2 
  30.       Caption         =   "取消"
  31.       Height          =   390
  32.       Left            =   2070
  33.       TabIndex        =   8
  34.       Top             =   2235
  35.       Width           =   1335
  36.    End
  37.    Begin VB.Frame Frame1 
  38.       Height          =   1740
  39.       Left            =   30
  40.       TabIndex        =   1
  41.       Top             =   -30
  42.       Width           =   4020
  43.       Begin VB.TextBox Text2 
  44.          Appearance      =   0  'Flat
  45.          Height          =   330
  46.          Left            =   1605
  47.          TabIndex        =   6
  48.          Text            =   "Text1"
  49.          Top             =   690
  50.          Width           =   2070
  51.       End
  52.       Begin VB.TextBox Text1 
  53.          Appearance      =   0  'Flat
  54.          Height          =   330
  55.          Left            =   1605
  56.          TabIndex        =   5
  57.          Text            =   "Text1"
  58.          Top             =   285
  59.          Width           =   2070
  60.       End
  61.       Begin MSMask.MaskEdBox newmonth 
  62.          Height          =   315
  63.          Left            =   1605
  64.          TabIndex        =   7
  65.          Top             =   1200
  66.          Width           =   2070
  67.          _ExtentX        =   3651
  68.          _ExtentY        =   556
  69.          _Version        =   393216
  70.          MaxLength       =   7
  71.          Mask            =   "####-##"
  72.          PromptChar      =   "_"
  73.       End
  74.       Begin VB.Label Label3 
  75.          Caption         =   "新工资月份:"
  76.          ForeColor       =   &H000000FF&
  77.          Height          =   195
  78.          Left            =   405
  79.          TabIndex        =   4
  80.          Top             =   1275
  81.          Width           =   1095
  82.       End
  83.       Begin VB.Label Label2 
  84.          Caption         =   "结束工资月份:"
  85.          Height          =   195
  86.          Left            =   240
  87.          TabIndex        =   3
  88.          Top             =   750
  89.          Width           =   1275
  90.       End
  91.       Begin VB.Label Label1 
  92.          Caption         =   "开始工资月份:"
  93.          Height          =   195
  94.          Left            =   240
  95.          TabIndex        =   2
  96.          Top             =   360
  97.          Width           =   1275
  98.       End
  99.    End
  100.    Begin VB.CommandButton Command1 
  101.       Caption         =   "确定"
  102.       Height          =   390
  103.       Left            =   660
  104.       TabIndex        =   0
  105.       Top             =   2235
  106.       Width           =   1335
  107.    End
  108. End
  109. Attribute VB_Name = "main_gzgl_xyfgz"
  110. Attribute VB_GlobalNameSpace = False
  111. Attribute VB_Creatable = False
  112. Attribute VB_PredeclaredId = True
  113. Attribute VB_Exposed = False
  114. Dim rs1 As New ADODB.Recordset
  115. Private Sub Command1_Click()
  116.   Cnn.Execute ("update 月份表 set 月份='" + newmonth.text + "'")
  117.   Unload Me
  118. End Sub
  119. Private Sub Command2_Click()
  120.   Unload Me
  121. End Sub
  122. Private Sub Form_Load()
  123.   Me.Caption = text
  124.   Dim mydate As String
  125.   rs1.Open "工资表 order by 所属工资月份", Cnn, adOpenKeyset, adLockOptimistic
  126.   If rs1.RecordCount > 0 Then
  127.     rs1.MoveFirst
  128.     Text1 = rs1.Fields("所属工资月份")
  129.     rs1.MoveLast
  130.     Text2 = rs1.Fields("所属工资月份")
  131.   Else
  132.     mydate = Year(Date) & "-" & Month(Date)
  133.     Text1 = mydate
  134.     Text2 = mydate
  135.     newmonth = mydate
  136.   End If
  137.   rs1.Close
  138. End Sub