⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmteapay.frm

📁 ASP编程留言板功能强大
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      EndProperty
      Height          =   495
      Index           =   6
      Left            =   3960
      TabIndex        =   18
      Top             =   2640
      Width           =   1335
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "医疗保险:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   5
      Left            =   240
      TabIndex        =   17
      Top             =   3480
      Width           =   1815
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "养老保险:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   4
      Left            =   3960
      TabIndex        =   16
      Top             =   3480
      Width           =   1815
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "住房公积金:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   3
      Left            =   240
      TabIndex        =   15
      Top             =   4320
      Width           =   2175
   End
   Begin VB.Label mshifa 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      DataField       =   "实发工资"
      DataSource      =   "Adodc2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   6000
      TabIndex        =   14
      Top             =   4320
      Width           =   180
   End
   Begin VB.Label mzhu 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      DataField       =   "住房公积金"
      DataSource      =   "Adodc2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   2520
      TabIndex        =   13
      Top             =   4320
      Width           =   180
   End
   Begin VB.Label myang 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      DataField       =   "养老保险"
      DataSource      =   "Adodc2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   6000
      TabIndex        =   12
      Top             =   3480
      Width           =   180
   End
   Begin VB.Label myi 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      DataField       =   "医疗保险"
      DataSource      =   "Adodc2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   2280
      TabIndex        =   11
      Top             =   3480
      Width           =   180
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "基本工资:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   1
      Left            =   240
      TabIndex        =   5
      Top             =   960
      Width           =   1815
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "编号:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   0
      Left            =   240
      TabIndex        =   3
      Top             =   240
      Width           =   975
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "姓名:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   2
      Left            =   3960
      TabIndex        =   2
      Top             =   240
      Width           =   975
   End
   Begin VB.Label xm 
      BackStyle       =   0  'Transparent
      DataField       =   "姓名"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5040
      TabIndex        =   1
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "frmteapay"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bb As String
Dim ryi, ryang, rzhu As Single
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
   Adodc1.Caption = "记录:" & Adodc1.Recordset.AbsolutePosition
   If Not (Adodc1.Recordset.EOF Or Adodc1.Recordset.BOF) Then
     bb = "编号=" & "'" & Adodc1.Recordset!编号 & "'"
     Set rs2 = New Recordset
     rs2.Open "select * from 教师工资情况表 where " & bb, DataEnvironment1.Connect, adOpenStatic, adLockOptimistic
     If rs2.RecordCount = 0 Then
       Command1(0).Enabled = True
       Command1(3).Enabled = False
       mbase.Enabled = False: msheng.Enabled = False: mshi.Enabled = False
       mgong.Enabled = False: mkeshi.Enabled = False: mquan.Enabled = False
       mbase.Text = "": msheng.Text = "": mshi.Text = ""
       mgong.Text = "": mkeshi.Text = "": mquan.Text = ""
       myi.Caption = "": myang.Caption = "": mzhu.Caption = ""
       mshifa.Caption = ""
     Else
       Command1(0).Enabled = False
       Command1(3).Enabled = True
       If Not mbase.Enabled Then
          mbase.Enabled = True: msheng.Enabled = True: mshi.Enabled = True
          mgong.Enabled = True: mkeshi.Enabled = True: mquan.Enabled = True
       End If
       mbase.Text = rs2.Fields(1):  msheng.Text = rs2.Fields(2): mshi.Text = rs2.Fields(3)
       mgong.Text = rs2.Fields(4):  mkeshi.Text = rs2.Fields(5): mquan.Text = rs2.Fields(6):
       myi.Caption = rs2.Fields(7): myang.Caption = rs2.Fields(8): mzhu.Caption = rs2.Fields(9):
       mshifa.Caption = rs2.Fields(10)
     End If
   End If
End Sub



Private Sub Command1_Click(Index As Integer)
  On Error Resume Next
  Select Case Index
    Case 0   '添加
      rs2.MoveLast
      rs2.AddNew
      rs2.Fields(0).Value = Adodc1.Recordset!编号
      mbase.Enabled = True: msheng.Enabled = True: mshi.Enabled = True
      mgong.Enabled = True: mkeshi.Enabled = True: mquan.Enabled = True
      mbase.SetFocus
      Command1(0).Enabled = False
      Command1(3).Enabled = True
    Case 3  '更新
      myi.Caption = Str(Format(Val(mbase.Text) * ryi, "####.##"))
      myang.Caption = Str(Format(Val(mbase.Text) * ryang, "####.##"))
      mzhu.Caption = Str(Format(Val(mbase.Text) * rzhu, "####.##"))
      mshifa.Caption = Str(Val(mbase.Text) + Val(msheng.Text) + Val(mshi.Text) + Val(mgong.Text) + Val(mkeshi.Text) + Val(mquan.Text) - Val(myi.Caption) - Val(myang.Caption) - Val(mzhu.Caption))
      rs2.Fields(1).Value = Val(mbase.Text)
      rs2.Fields(2).Value = Val(msheng.Text)
      rs2.Fields(3).Value = Val(mshi.Text)
      rs2.Fields(4).Value = Val(mgong.Text)
      rs2.Fields(5).Value = Val(mkeshi.Text)
      rs2.Fields(6).Value = Val(mquan.Text)
      rs2.Fields(7).Value = Val(myi.Caption)
      rs2.Fields(8).Value = Val(myang.Caption)
      rs2.Fields(9).Value = Val(mzhu.Caption)
      rs2.Fields(10).Value = Val(mshifa.Caption)
      rs2.Update
    Case 4   '关闭
      Adodc1.Recordset.Close
      rs2.Close
      Unload frmteapay
  End Select
End Sub


Private Sub Form_Load()
  ryi = 0.02
  ryang = 0.03
  rzhu = 0.05
End Sub

'Private Sub Form_Resize()
 ' Frame2.Top = frmteapay.Height - Frame2.Height - 2 * Adodc1.Height
'End Sub


Private Sub mbase_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then msheng.SetFocus
End Sub
Private Sub msheng_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then mshi.SetFocus
End Sub
Private Sub mshi_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then mgong.SetFocus
End Sub
Private Sub mgong_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then mkeshi.SetFocus
End Sub
Private Sub mkeshi_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then mquan.SetFocus
End Sub
Private Sub mquan_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     myi.Caption = Str(Format(Val(mbase.Text) * ryi, "####.##"))
     myang.Caption = Str(Format(Val(mbase.Text) * ryang, "####.##"))
     mzhu.Caption = Str(Format(Val(mbase.Text) * rzhu, "####.##"))
     mshifa.Caption = Str(Val(mbase.Text) + Val(msheng.Text) + Val(mshi.Text) + Val(mgong.Text) + Val(mkeshi.Text) + Val(mquan.Text) - Val(myi.Caption) - Val(myang.Caption) - Val(mzhu.Caption))
  End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -