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


VERSION 5.00 
Begin VB.Form frmluru  
   Caption         =   "信息录入" 
   ClientHeight    =   8430 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   9690 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MDIChild        =   -1  'True 
   ScaleHeight     =   8430 
   ScaleWidth      =   9690 
   Begin VB.Frame Frame10  
      Caption         =   "考核月份" 
      Height          =   855 
      Left            =   5520 
      TabIndex        =   31 
      Top             =   240 
      Width           =   3735 
      Begin VB.ComboBox Combo3  
         Height          =   300 
         ItemData        =   "frmluru.frx":0000 
         Left            =   2040 
         List            =   "frmluru.frx":0028 
         TabIndex        =   33 
         Top             =   360 
         Width           =   1095 
      End 
      Begin VB.ComboBox Combo2  
         Height          =   300 
         ItemData        =   "frmluru.frx":0053 
         Left            =   120 
         List            =   "frmluru.frx":0063 
         TabIndex        =   32 
         Top             =   360 
         Width           =   1335 
      End 
      Begin VB.Label Label6  
         Caption         =   "月" 
         Height          =   255 
         Left            =   3240 
         TabIndex        =   35 
         Top             =   360 
         Width           =   375 
      End 
      Begin VB.Label Label5  
         Caption         =   "年" 
         Height          =   375 
         Left            =   1560 
         TabIndex        =   34 
         Top             =   360 
         Width           =   495 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "班主任基本信息" 
      Height          =   855 
      Left            =   360 
      TabIndex        =   26 
      Top             =   240 
      Width           =   4815 
      Begin VB.ComboBox Combo1  
         Height          =   300 
         Left            =   840 
         TabIndex        =   28 
         Text            =   "请选择" 
         Top             =   360 
         Width           =   1095 
      End 
      Begin VB.TextBox Text1  
         Height          =   375 
         Left            =   2880 
         TabIndex        =   27 
         Top             =   360 
         Width           =   1575 
      End 
      Begin VB.Label Label1  
         Caption         =   "班级" 
         BeginProperty Font  
            Name            =   "楷体_GB2312" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   375 
         Left            =   120 
         TabIndex        =   30 
         Top             =   360 
         Width           =   735 
      End 
      Begin VB.Label Label2  
         Caption         =   "姓名" 
         BeginProperty Font  
            Name            =   "楷体_GB2312" 
            Size            =   12 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   375 
         Left            =   2280 
         TabIndex        =   29 
         Top             =   360 
         Width           =   855 
      End 
   End 
   Begin VB.CommandButton Command2  
      Caption         =   "取消" 
      Height          =   495 
      Left            =   4920 
      TabIndex        =   8 
      Top             =   7800 
      Width           =   2415 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "确定" 
      Height          =   495 
      Left            =   1920 
      TabIndex        =   7 
      Top             =   7800 
      Width           =   2175 
   End 
   Begin VB.Frame Frame2  
      Caption         =   "考核信息" 
      Height          =   6375 
      Left            =   360 
      TabIndex        =   0 
      Top             =   1200 
      Width           =   8895 
      Begin VB.Frame Frame11  
         Caption         =   "文明寝室评比" 
         Height          =   1335 
         Left            =   6360 
         TabIndex        =   45 
         Top             =   3240 
         Width           =   2055 
         Begin VB.OptionButton Option8  
            Caption         =   "无" 
            Height          =   255 
            Index           =   1 
            Left            =   600 
            TabIndex        =   47 
            Top             =   840 
            Value           =   -1  'True 
            Width           =   615 
         End 
         Begin VB.OptionButton Option8  
            Caption         =   "有" 
            Height          =   255 
            Index           =   0 
            Left            =   600 
            TabIndex        =   46 
            Top             =   360 
            Width           =   615 
         End 
      End 
      Begin VB.Frame Frame6  
         Caption         =   "教室规范化评比" 
         Height          =   1335 
         Left            =   3720 
         TabIndex        =   42 
         Top             =   3240 
         Width           =   2055 
         Begin VB.OptionButton Option3  
            Caption         =   "无" 
            Height          =   375 
            Index           =   1 
            Left            =   480 
            TabIndex        =   44 
            Top             =   840 
            Value           =   -1  'True 
            Width           =   735 
         End 
         Begin VB.OptionButton Option3  
            Caption         =   "有" 
            Height          =   375 
            Index           =   0 
            Left            =   480 
            TabIndex        =   43 
            Top             =   360 
            Width           =   735 
         End 
      End 
      Begin VB.ComboBox Combo4  
         Height          =   300 
         ItemData        =   "frmluru.frx":007F 
         Left            =   1800 
         List            =   "frmluru.frx":009E 
         TabIndex        =   39 
         Text            =   "选择" 
         Top             =   1800 
         Width           =   1335 
      End 
      Begin VB.Frame Frame9  
         Caption         =   "指导参加“成才杯”活动" 
         Height          =   1095 
         Left            =   240 
         TabIndex        =   24 
         Top             =   3480 
         Width           =   3135 
         Begin VB.OptionButton Option7  
            Caption         =   "否" 
            Height          =   375 
            Index           =   1 
            Left            =   1560 
            TabIndex        =   48 
            Top             =   480 
            Width           =   735 
         End 
         Begin VB.OptionButton Option7  
            Caption         =   "是" 
            Height          =   375 
            Index           =   0 
            Left            =   480 
            TabIndex        =   25 
            Top             =   480 
            Value           =   -1  'True 
            Width           =   735 
         End 
      End 
      Begin VB.Frame Frame8  
         Caption         =   "有无重大事故" 
         Height          =   1335 
         Left            =   6360 
         TabIndex        =   19 
         Top             =   1680 
         Width           =   2055 
         Begin VB.OptionButton Option6  
            Caption         =   "有" 
            Height          =   255 
            Index           =   1 
            Left            =   360 
            TabIndex        =   23 
            Top             =   840 
            Width           =   735 
         End 
         Begin VB.OptionButton Option6  
            Caption         =   "无" 
            Height          =   375 
            Index           =   0 
            Left            =   360 
            TabIndex        =   22 
            Top             =   360 
            Value           =   -1  'True 
            Width           =   855 
         End 
      End 
      Begin VB.Frame Frame7  
         Caption         =   "上交材料" 
         Height          =   1335 
         Left            =   3720 
         TabIndex        =   18 
         Top             =   1680 
         Width           =   2055 
         Begin VB.OptionButton Option5  
            Caption         =   "否" 
            Height          =   255 
            Index           =   1 
            Left            =   480 
            TabIndex        =   21 
            Top             =   840 
            Width           =   735 
         End 
         Begin VB.OptionButton Option5  
            Caption         =   "是" 
            Height          =   255 
            Index           =   0 
            Left            =   480 
            TabIndex        =   20 
            Top             =   360 
            Value           =   -1  'True 
            Width           =   735 
         End 
      End 
      Begin VB.Frame Frame5  
         Caption         =   "有无集体通报批评" 
         Height          =   975 
         Left            =   240 
         TabIndex        =   15 
         Top             =   2400 
         Width           =   3135 
         Begin VB.OptionButton Option1  
            Caption         =   "有" 
            Height          =   375 
            Index           =   2 
            Left            =   1800 
            TabIndex        =   17 
            Top             =   360 
            Width           =   975 
         End 
         Begin VB.OptionButton Option1  
            Caption         =   "无" 
            Height          =   375 
            Index           =   0 
            Left            =   480 
            TabIndex        =   16 
            Top             =   360 
            Value           =   -1  'True 
            Width           =   975 
         End 
      End 
      Begin VB.Frame Frame4  
         Caption         =   "参加班会(次)" 
         Height          =   1215 
         Left            =   6360 
         TabIndex        =   12 
         Top             =   240 
         Width           =   2055 
         Begin VB.OptionButton Option4  
            Caption         =   "没有参加过" 
            Height          =   255 
            Index           =   4 
            Left            =   240 
            TabIndex        =   41 
            Top             =   840 
            Width           =   1335 
         End 
         Begin VB.OptionButton Option4  
            Caption         =   "4" 
            Height          =   255 
            Index           =   3 
            Left            =   960 
            TabIndex        =   37 
            Top             =   600 
            Value           =   -1  'True 
            Width           =   855 
         End 
         Begin VB.OptionButton Option4  
            Caption         =   "3" 
            Height          =   255 
            Index           =   2 
            Left            =   960 
            TabIndex        =   36 
            Top             =   360 
            Width           =   855 
         End 
         Begin VB.OptionButton Option4  
            Caption         =   "2" 
            Height          =   255 
            Index           =   1 
            Left            =   240 
            TabIndex        =   14 
            Top             =   600 
            Width           =   855 
         End 
         Begin VB.OptionButton Option4  
            Caption         =   "1" 
            Height          =   255 
            Index           =   0 
            Left            =   240 
            TabIndex        =   13 
            Top             =   360 
            Width           =   855 
         End 
      End 
      Begin VB.Frame Frame3  
         Caption         =   "参加班主任例会(次)" 
         Height          =   1215 
         Left            =   3720 
         TabIndex        =   9 
         Top             =   240 
         Width           =   2055 
         Begin VB.OptionButton Option2  
            Caption         =   "无" 
            Height          =   255 
            Index           =   2 
            Left            =   480 
            TabIndex        =   40 
            Top             =   840 
            Width           =   855 
         End 
         Begin VB.OptionButton Option2  
            Caption         =   "两次" 
            Height          =   255 
            Index           =   1 
            Left            =   480 
            TabIndex        =   11 
            Top             =   600 
            Value           =   -1  'True 
            Width           =   855 
         End 
         Begin VB.OptionButton Option2  
            Caption         =   "一次" 
            Height          =   255 
            Index           =   0 
            Left            =   480 
            TabIndex        =   10 
            Top             =   360 
            Width           =   855 
         End 
      End 
      Begin VB.TextBox Text4  
         Height          =   1335 
         Left            =   840 
         MultiLine       =   -1  'True 
         TabIndex        =   6 
         Top             =   4680 
         Width           =   7575 
      End 
      Begin VB.TextBox Text3  
         Height          =   375 
         Left            =   1800 
         TabIndex        =   4 
         Top             =   1080 
         Width           =   1335 
      End 
      Begin VB.TextBox Text2  
         Height          =   375 
         Left            =   1800 
         TabIndex        =   2 
         Top             =   360 
         Width           =   1335 
      End 
      Begin VB.Label Label7  
         AutoSize        =   -1  'True 
         Caption         =   "寝室到位(次)" 
         Height          =   180 
         Left            =   360 
         TabIndex        =   38 
         Top             =   1800 
         Width           =   1260 
      End 
      Begin VB.Label Label12  
         Caption         =   "备注" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   15.75 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   240 
         TabIndex        =   5 
         Top             =   5040 
         Width           =   375 
      End 
      Begin VB.Label Label4  
         Caption         =   "通报批评(次)" 
         Height          =   375 
         Left            =   360 
         TabIndex        =   3 
         Top             =   1080 
         Width           =   1095 
      End 
      Begin VB.Label Label3  
         Caption         =   "班级月扣分" 
         Height          =   375 
         Left            =   360 
         TabIndex        =   1 
         Top             =   480 
         Width           =   1335 
      End 
   End 
End 
Attribute VB_Name = "frmluru" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Sub Combo1_Click() 
   Dim mrccc As ADODB.Recordset 
  Dim msgtext As String 
  Dim txtSQL As String 
   
' Combo1.Clear 
  txtSQL = "select name1 from teacher where class='" & Combo1 & "'" 
  Set mrccc = ExecuteSQL(txtSQL, msgtext) 
    Text1.Text = mrccc.Fields(0) 
    mrccc.MoveNext 
   mrccc.Close 
   
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 
  If Trim(Combo4 & "") = "选择" Then 
   MsgBox "选择次数!", vbOKOnly + vbExclamation, "警告" 
   Exit Sub 
  End If 
  If Trim(Text2.Text & "") = "" Then 
    MsgBox "班级月扣分不能为空!", vbOKOnly + vbExclamation, "警告" 
     Exit Sub 
  End If 
  If Not IsNumeric(Trim(Text2.Text)) Then 
     MsgBox "必须是数字!", vbOKOnly + vbExclamation, "警告" 
     Text2.SetFocus 
     Exit Sub 
  End If 
   If Trim(Text3.Text & "") = "" Then 
    MsgBox "通报批评次数不能为空!没有用0代替", vbOKOnly + vbExclamation, "警告" 
     Exit Sub 
  End If 
  If Not IsNumeric(Trim(Text3.Text)) Then 
     MsgBox "必须是数字!", vbOKOnly + vbExclamation, "警告" 
     Text3.SetFocus 
     Exit Sub 
  End If 
   
  smg = Format(CDate(Combo2 & "-" & Combo3 & "-" & "1"), "yyyy-mm-dd") 
  Dim a, b, c, d, e, f, g, h, j As Integer 
 
  If Option6(0).Value Then 
    a = 0 
  ElseIf Option6(1).Value Then 
    a = 1 
  End If 
  If Option1(0).Value Then 
    b = 0 
  ElseIf Option1(1).Value Then 
    b = 1 
  End If 
  If Option2(0).Value Then 
    c = 1 
  ElseIf Option2(1).Value Then 
    c = 2 
  ElseIf Option2(2).Value Then 
    c = 0 
  End If 
  If Option4(0).Value Then 
   d = 1 
  ElseIf Option4(1).Value Then 
    d = 2 
  ElseIf Option4(2).Value Then 
    d = 3 
  ElseIf Option4(3).Value Then 
    d = 4 
  ElseIf Option4(4).Value Then 
    d = 0 
  End If 
  If Option5(0).Value Then 
    e = 0 
  ElseIf Option5(1).Value Then 
    e = 1 
  End If 
  If Option7(0).Value Then 
    g = 0 
  ElseIf Option7(1).Value Then 
    g = 1 
  End If 
  If Option3(0).Value Then 
    h = 1 
  ElseIf Option3(1).Value Then 
    h = 0 
  End If 
  If Option8(0).Value Then 
    j = 1 
  ElseIf Option8(1).Value Then 
    j = 0 
  End If 
  txtSQL = "select * from kaohe where class='" & Trim(Combo1) & "' and yuefen='" & smg & "'" 
  Set mr = ExecuteSQL(txtSQL, msgtext) 
  If mr.EOF = False Then 
    MsgBox "该班主任本月考核信息已经录入!如需要修改请执行修改操作", vbOKOnly + vbExclamation, "警告" 
    Combo1 = "请选择" 
    Text1.Text = "" 
    Text2.Text = "" 
    Text3.Text = "" 
    Combo4 = "0" 
    Combo2 = "" 
    Combo3 = "" 
    Exit Sub 
  End If 
  txtSQL = "execute kaohesetup'" 
  txtSQL = txtSQL & Trim(Text2.Text) & "','" 
   
  txtSQL = txtSQL & Trim(Text3.Text) & "','" 
  txtSQL = txtSQL & a & "','" 
  txtSQL = txtSQL & b & "','" 
  txtSQL = txtSQL & c & "','" 
  txtSQL = txtSQL & d & "','" 
  txtSQL = txtSQL & e & "','" 
  txtSQL = txtSQL & Trim(Combo4) & "','" 
  
  txtSQL = txtSQL & g & "','" 
  txtSQL = txtSQL & Trim(Text4.Text) & "','" 
  txtSQL = txtSQL & Trim(Combo1) & "','" 
  txtSQL = txtSQL & smg & "','" 
  txtSQL = txtSQL & h & "','" 
  txtSQL = txtSQL & j & "'" 
Set mr = ExecuteSQL(txtSQL, msgtext) 
   
  Unload Me 
  frmluru.Show 
    MsgBox "添加纪录成功!", vbOKOnly + vbExclamation, "添加纪录" 
     
End Sub 
 
Private Sub Command2_Click() 
  Unload Me 
End Sub 
 
Private Sub Form_Load() 
  Me.Width = 9810 
  Me.Height = 8835 
  Dim mrccc1 As ADODB.Recordset 
  Dim msgtext1 As String 
  Dim txtSQL As String 
   
' Combo1.Clear 
  txtSQL = "select class from teacher" 
  Set mrccc1 = ExecuteSQL(txtSQL, msgtext1) 
 
   Do While Not mrccc1.EOF 
    Combo1.AddItem mrccc1.Fields(0) 
    mrccc1.MoveNext 
   Loop 
   mrccc1.Close 
   
End Sub 
 
Private Sub Label8_Click() 
 
End Sub