www.pudn.com > new xsc.rar > frmjintie.frm


VERSION 5.00 
Begin VB.Form frmjintie  
   Caption         =   "班主任月津贴" 
   ClientHeight    =   7320 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   9435 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MDIChild        =   -1  'True 
   ScaleHeight     =   7320 
   ScaleWidth      =   9435 
   Begin VB.TextBox Text12  
      Height          =   615 
      Left            =   4680 
      MultiLine       =   -1  'True 
      ScrollBars      =   3  'Both 
      TabIndex        =   31 
      Top             =   5040 
      Width           =   4455 
   End 
   Begin VB.CommandButton Command2  
      Caption         =   "取消" 
      Height          =   495 
      Left            =   4920 
      TabIndex        =   29 
      Top             =   6600 
      Width           =   2175 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "确定" 
      Height          =   495 
      Left            =   2040 
      TabIndex        =   28 
      Top             =   6600 
      Width           =   2175 
   End 
   Begin VB.TextBox Text11  
      Height          =   495 
      Left            =   3840 
      TabIndex        =   26 
      Top             =   5880 
      Width           =   2055 
   End 
   Begin VB.CheckBox Check1  
      Alignment       =   1  'Right Justify 
      Caption         =   "本月该班主任所在班级发生重大伤害事故或重大责任事故,扣发当月班主任津贴" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   10.5 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   735 
      Left            =   360 
      TabIndex        =   20 
      Top             =   5040 
      Width           =   3015 
   End 
   Begin VB.Frame Frame2  
      Caption         =   "班主任基本情况" 
      Height          =   1095 
      Left            =   240 
      TabIndex        =   1 
      Top             =   120 
      Width           =   8895 
      Begin VB.ComboBox Combo3  
         Height          =   300 
         ItemData        =   "frmjintie.frx":0000 
         Left            =   7080 
         List            =   "frmjintie.frx":0028 
         TabIndex        =   36 
         Text            =   "请选择" 
         Top             =   420 
         Width           =   1215 
      End 
      Begin VB.ComboBox Combo2  
         Height          =   300 
         ItemData        =   "frmjintie.frx":0053 
         Left            =   5520 
         List            =   "frmjintie.frx":0060 
         TabIndex        =   34 
         Text            =   "请选择" 
         Top             =   420 
         Width           =   1215 
      End 
      Begin VB.TextBox Text2  
         Enabled         =   0   'False 
         Height          =   375 
         Left            =   2160 
         TabIndex        =   7 
         Top             =   383 
         Width           =   1215 
      End 
      Begin VB.TextBox Text1  
         Enabled         =   0   'False 
         Height          =   375 
         Left            =   4440 
         TabIndex        =   5 
         Top             =   383 
         Width           =   855 
      End 
      Begin VB.ComboBox Combo1  
         Height          =   300 
         Left            =   720 
         TabIndex        =   3 
         Text            =   "请选择" 
         Top             =   420 
         Width           =   975 
      End 
      Begin VB.Label Label17  
         AutoSize        =   -1  'True 
         Caption         =   "月" 
         Height          =   180 
         Left            =   8400 
         TabIndex        =   37 
         Top             =   480 
         Width           =   180 
      End 
      Begin VB.Label Label16  
         AutoSize        =   -1  'True 
         Caption         =   "年" 
         Height          =   180 
         Left            =   6840 
         TabIndex        =   35 
         Top             =   480 
         Width           =   180 
      End 
      Begin VB.Label Label3  
         Caption         =   "人数" 
         Height          =   180 
         Left            =   1800 
         TabIndex        =   6 
         Top             =   480 
         Width           =   360 
      End 
      Begin VB.Label Label2  
         Caption         =   "班主任姓名" 
         Height          =   255 
         Left            =   3480 
         TabIndex        =   4 
         Top             =   443 
         Width           =   900 
      End 
      Begin VB.Label Label1  
         Caption         =   "班级" 
         Height          =   180 
         Left            =   240 
         TabIndex        =   2 
         Top             =   480 
         Width           =   360 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "月津贴(所有单位均为元)" 
      Height          =   3615 
      Left            =   240 
      TabIndex        =   0 
      Top             =   1320 
      Width           =   8895 
      Begin VB.TextBox Text13  
         Height          =   375 
         Left            =   2160 
         TabIndex        =   33 
         Top             =   2760 
         Width           =   1335 
      End 
      Begin VB.TextBox Text7  
         Height          =   375 
         Left            =   2160 
         TabIndex        =   24 
         Top             =   360 
         Width           =   1335 
      End 
      Begin VB.TextBox Text3  
         Height          =   375 
         Left            =   6120 
         TabIndex        =   22 
         Top             =   360 
         Width           =   1335 
      End 
      Begin VB.TextBox Text10  
         Height          =   375 
         Left            =   6120 
         TabIndex        =   19 
         Top             =   2160 
         Width           =   1335 
      End 
      Begin VB.TextBox Text9  
         Height          =   375 
         Left            =   6120 
         TabIndex        =   17 
         Top             =   1560 
         Width           =   1335 
      End 
      Begin VB.TextBox Text8  
         Height          =   375 
         Left            =   6120 
         TabIndex        =   15 
         Top             =   960 
         Width           =   1335 
      End 
      Begin VB.TextBox Text6  
         Height          =   375 
         Left            =   2160 
         TabIndex        =   13 
         Top             =   2160 
         Width           =   1335 
      End 
      Begin VB.TextBox Text5  
         Height          =   375 
         Left            =   2160 
         TabIndex        =   11 
         Top             =   1560 
         Width           =   1335 
      End 
      Begin VB.TextBox Text4  
         Height          =   375 
         Left            =   2160 
         TabIndex        =   9 
         Top             =   960 
         Width           =   1335 
      End 
      Begin VB.Label Label15  
         AutoSize        =   -1  'True 
         Caption         =   "参加班会" 
         Height          =   180 
         Left            =   480 
         TabIndex        =   32 
         Top             =   2880 
         Width           =   720 
      End 
      Begin VB.Label Label8  
         AutoSize        =   -1  'True 
         Caption         =   "上交材料" 
         Height          =   495 
         Left            =   5040 
         TabIndex        =   23 
         Top             =   360 
         Width           =   735 
      End 
      Begin VB.Label Label4  
         AutoSize        =   -1  'True 
         Caption         =   "岗位津贴(每人4元)" 
         Height          =   375 
         Left            =   480 
         TabIndex        =   21 
         Top             =   360 
         Width           =   1575 
      End 
      Begin VB.Label Label11  
         AutoSize        =   -1  'True 
         Caption         =   "其它" 
         Height          =   495 
         Left            =   5040 
         TabIndex        =   18 
         Top             =   2160 
         Width           =   375 
      End 
      Begin VB.Label Label10  
         Caption         =   "无集体通报以上处分" 
         Height          =   495 
         Left            =   5040 
         TabIndex        =   16 
         Top             =   1560 
         Width           =   975 
      End 
      Begin VB.Label Label9  
         AutoSize        =   -1  'True 
         Caption         =   "指导活动" 
         Height          =   495 
         Left            =   5040 
         TabIndex        =   14 
         Top             =   960 
         Width           =   735 
      End 
      Begin VB.Label Label7  
         AutoSize        =   -1  'True 
         Caption         =   "深入寝室" 
         Height          =   495 
         Left            =   480 
         TabIndex        =   12 
         Top             =   2160 
         Width           =   735 
      End 
      Begin VB.Label Label6  
         AutoSize        =   -1  'True 
         Caption         =   "违纪扣分情况" 
         Height          =   180 
         Left            =   480 
         TabIndex        =   10 
         Top             =   1560 
         Width           =   1080 
      End 
      Begin VB.Label Label5  
         AutoSize        =   -1  'True 
         Caption         =   "班主任例会" 
         Height          =   375 
         Left            =   480 
         TabIndex        =   8 
         Top             =   960 
         Width           =   975 
      End 
   End 
   Begin VB.Label Label14  
      AutoSize        =   -1  'True 
      Caption         =   "说明" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   10.5 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   210 
      Left            =   3960 
      TabIndex        =   30 
      Top             =   5280 
      Width           =   420 
   End 
   Begin VB.Label Label13  
      AutoSize        =   -1  'True 
      Caption         =   "元" 
      Height          =   180 
      Left            =   6240 
      TabIndex        =   27 
      Top             =   6000 
      Width           =   180 
   End 
   Begin VB.Label Label12  
      AutoSize        =   -1  'True 
      Caption         =   "月津贴合计" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   700 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   240 
      Left            =   2040 
      TabIndex        =   25 
      Top             =   6000 
      Width           =   1275 
   End 
End 
Attribute VB_Name = "frmjintie" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Sub Check1_Click() 
 If Check1.Value = 0 Then 
      Text11.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text13.Text) 
      Text12.Text = "" 
      Check1.Enabled = False 
    ElseIf Check1.Value = 1 Then 
      Text11.Text = 0 
      Text4.Text = "0" 
       Text3.Text = "0" 
        Text5.Text = "0" 
         Text6.Text = "0" 
          Text7.Text = "0" 
           Text8.Text = "0" 
            Text9.Text = "0" 
             Text10.Text = "0" 
              Text13.Text = "0" 
      Text12.Text = "发生重大责任事故或者重大伤害事故,扣发当月班主任津贴!" 
      Check1.Enabled = False 
    End If 
End Sub 
 
Private Sub Command1_Click() 
  Dim intcount As Integer 
  Dim smg As String 
  Dim mr As ADODB.Recordset 
  Dim msgtext As String 
  If Trim(Combo1 & "") = "请选择" Then 
   MsgBox "请选择班级", vbOKOnly + vbExclamation, "警告" 
   Exit Sub 
  End If 
  If Trim(Combo2 & "") = "请选择" Then 
   MsgBox "请选择年份", vbOKOnly + vbExclamation, "警告" 
   Exit Sub 
  End If 
  If Trim(Combo3 & "") = "请选择" Then 
   MsgBox "请选择月份", vbOKOnly + vbExclamation, "警告" 
   Exit Sub 
  End If 
  smg = Format(CDate(Combo2 & "-" & Combo3 & "-" & "1"), "yyyy-mm-dd") 
  txtSQL = "delete from jintie where class='" & Trim(Combo1) & "' and riqi='" & smg & "'" 
  Set mr = ExecuteSQL(txtSQL, msgtext) 
   
  txtSQL = "execute jintiesetup'" 
  txtSQL = txtSQL & Trim(Text7.Text) & "','" 
  txtSQL = txtSQL & Trim(Text4.Text) & "','" 
  txtSQL = txtSQL & Trim(Text13.Text) & "','" 
  txtSQL = txtSQL & Trim(Text5.Text) & "','" 
  txtSQL = txtSQL & Trim(Text6.Text) & "','" 
  txtSQL = txtSQL & Trim(Text3.Text) & "','" 
  txtSQL = txtSQL & Trim(Text8.Text) & "','" 
  txtSQL = txtSQL & Trim(Text9.Text) & "','" 
  txtSQL = txtSQL & Trim(Text10.Text) & "','" 
  txtSQL = txtSQL & Trim(Combo1) & "','" 
  txtSQL = txtSQL & smg & "','" 
  txtSQL = txtSQL & Trim(Text11.Text) & "','" 
  txtSQL = txtSQL & Trim(Text1.Text) & "'" 
  Set mr = ExecuteSQL(txtSQL, msgtext) 
  Unload Me 
  frmjintie.Show 
    MsgBox "添加纪录成功!", vbOKOnly + vbExclamation, "添加纪录" 
End Sub 
 
Private Sub Command2_Click() 
  Unload Me 
End Sub 
 
Private Sub Form_Load() 
  Me.Height = 7725 
  Me.Width = 9555 
   Dim mrccc As ADODB.Recordset 
  Dim msgtext As String 
  Dim txtSQL As String 
   
' Combo1.Clear 
  txtSQL = "select distinct(class) from kaohe" 
  Set mrccc = ExecuteSQL(txtSQL, msgtext) 
 
   Do While Not mrccc.EOF 
    Combo1.AddItem mrccc.Fields(0) 
    mrccc.MoveNext 
   Loop 
   mrccc.Close 
End Sub 
 
Private Sub Combo3_Click() 
   Dim mrccc As ADODB.Recordset 
  Dim msgtext As String 
  Dim txtSQL As String 
  Dim aa As String 
 aa = Format(CDate(Combo2 & "-" & Combo3 & "-" & "1"), "yyyy-mm-dd") 
' Combo1.Clear 
  txtSQL = "select num from class  where id='" & Combo1 & "' " 
  Set mrccc = ExecuteSQL(txtSQL, msgtext) 
    Text2.Text = mrccc.Fields(0) 
    mrccc.MoveNext 
   mrccc.Close 
    Dim mrccc1 As ADODB.Recordset 
   
' Combo1.Clear 
   txtSQL = "select name1 from teacher where class='" & Combo1 & "' " 
  Set mrccc1 = ExecuteSQL(txtSQL, msgtext) 
    Text1.Text = mrccc1.Fields(0) 
    mrccc1.MoveNext 
   mrccc1.Close 
   Text7.Text = 4 * Text2.Text 
    txtSQL = "select lihui,cailiao,jititongbao,qinshi,huodong,banhui,koufen,shijian1,biyeban,zaizhi from kaohe,teacher where kaohe.class=teacher.class and kaohe.class='" & Combo1 & "' and yuefen='" & aa & "' " 
  Set mrccc1 = ExecuteSQL(txtSQL, msgtext) 
  If Not mrccc1.EOF Then 
    Select Case Trim(mrccc1.Fields(9)) 
     Case "在职": 
        Text4.Text = mrccc1.Fields(0) * 20 
        If mrccc1.Fields(1) = 0 Then 
         Text3.Text = 20 
        Else 
         Text3.Text = 0 
        End If 
        If mrccc1.Fields(2) = 0 Then 
           Text9.Text = 10 
        Else 
          Text9.Text = 0 
        End If 
        Text6.Text = mrccc1.Fields(3) * 5 
        If mrccc1.Fields(4) = 0 Then 
          Text8.Text = 20 
        Else 
          Text8.Text = 0 
        End If 
        Text13.Text = mrccc1.Fields(5) * 10 
        If Int(mrccc1.Fields(6)) < Int(Text2.Text / 2) Then 
         Text5.Text = 50 
        ElseIf (Int(mrccc1.Fields(6)) >= Int(Text2.Text / 2) And Int(mrccc1.Fields(6)) <= Int(Text2.Text)) Then 
         Text5.Text = 40 
        ElseIf Int(mrccc1.Fields(6)) > Int(Text2.Text) Then 
         Text5.Text = 20 
        End If 
  'If mrccc1.Fields(8) = 0 Then (下半年开始用) 
        If mrccc1.Fields(7) = 3 Then 
          Text10.Text = 20 
          Text12.Text = "连续担任班主任三年以上(包括三年)" 
        ElseIf mrccc1.Fields(7) = 6 Then 
          Text10.Text = 30 
          Text12.Text = "连续担任班主任六年以上(包括六年)" 
        ElseIf mrccc1.Fields(7) = 8 Then 
          Text10.Text = 40 
          Text12.Text = "连续担任班主任八年以上(包括八年)" 
        ElseIf mrccc1.Fields(7) = 1 Then 
           Text10.Text = 0 
          Text12.Text = "无" 
        End If 
  ' Else: mrccc1.Fields(8) = 1 (下半年开始用) 
  '    Text10.Text = 7 * Text2.Text 
  '    Text4.Text = 0 
  '    Text5.Text = 0 
  '    Text6.Text = 0 
  '    Text7.Text = 0 
  '    Text13.Text = 0 
  '    Text3.Text = 0 
  '    Text8.Text = 0 
  '    Text9.Text = 0 
  '    Text12.Text = "毕业班班主任" 
  '  End If                (下半年开始用) 
    'mrccc1.Close 
       Text11.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text13.Text) 
    Case "聘任": 
        Text4.Text = mrccc1.Fields(0) * 20 
        If mrccc1.Fields(1) = 0 Then 
         Text3.Text = 10 
        Else 
         Text3.Text = 0 
        End If 
        If mrccc1.Fields(2) = 0 Then 
           Text9.Text = 10 
        Else 
          Text9.Text = 0 
        End If 
        Text6.Text = mrccc1.Fields(3) * 2.5 
        If mrccc1.Fields(4) = 0 Then 
          Text8.Text = 10 
        Else 
          Text8.Text = 0 
        End If 
        Text13.Text = mrccc1.Fields(5) * 10 
        If Int(mrccc1.Fields(6)) < Int(Text2.Text / 2) Then 
         Text5.Text = 30 
        ElseIf (Int(mrccc1.Fields(6)) >= Int(Text2.Text / 2) And Int(mrccc1.Fields(6)) <= Int(Text2.Text)) Then 
         Text5.Text = 20 
        ElseIf Int(mrccc1.Fields(6)) > Int(Text2.Text) Then 
         Text5.Text = 10 
        End If 
   
       Text11.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text13.Text) 
    Case "其它(行政人员兼作班主任等情况)": 
       Text7.Text = 0 
       Text10.Text = 0 
       Text4.Text = (mrccc1.Fields(0) - 2) * 20 
        If mrccc1.Fields(1) = 0 Then 
         Text3.Text = 0 
        Else 
         Text3.Text = -10 
        End If 
        If mrccc1.Fields(2) = 0 Then 
           Text9.Text = 0 
        Else 
          Text9.Text = -10 
        End If 
        Text6.Text = (mrccc1.Fields(3) - 8) * 2.5 
        If mrccc1.Fields(4) = 0 Then 
          Text8.Text = 0 
        Else 
          Text8.Text = -10 
        End If 
        Text13.Text = (mrccc1.Fields(5) - 4) * 10 
        If Int(mrccc1.Fields(6)) < Int(Text2.Text / 2) Then 
         Text5.Text = 0 
        ElseIf (Int(mrccc1.Fields(6)) >= Int(Text2.Text / 2) And Int(mrccc1.Fields(6)) <= Int(Text2.Text)) Then 
         Text5.Text = -10 
        ElseIf Int(mrccc1.Fields(6)) > Int(Text2.Text) Then 
         Text5.Text = -20 
        End If 
        Text11.Text = 300 + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text13.Text) 
       Text12.Text = "津贴满额300元,根据相应的项目进行扣减。" + "注意:相应项目显示的为扣除多少津贴,0代表不扣" 
    End Select 
  Else 
  MsgBox "未能找到纪录,可能是信息未录入!", vbOKOnly + vbExclamation, "提示" 
  Text3.Text = "" 
  Text4.Text = "" 
  Text5.Text = "" 
  Text6.Text = "" 
  Text7.Text = "" 
  Text8.Text = "" 
  Text9.Text = "" 
  Text10.Text = "" 
  Text11.Text = "" 
  Text12.Text = "" 
  Text13.Text = "" 
   
  End If 
End Sub