www.pudn.com > myActivebart.rar > upgrade.frm


VERSION 5.00 
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX" 
Begin VB.Form Form7  
   Caption         =   "学生调班处理" 
   ClientHeight    =   6360 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   9315 
   Icon            =   "upgrade.frx":0000 
   LinkTopic       =   "Form7" 
   ScaleHeight     =   6360 
   ScaleWidth      =   9315 
   StartUpPosition =   2  '屏幕中心 
   Begin VB.Frame Frame2  
      Caption         =   "更改信息" 
      Height          =   1035 
      Left            =   270 
      TabIndex        =   32 
      Top             =   5010 
      Width           =   8775 
      Begin VB.CommandButton Command3  
         Caption         =   "退出" 
         Height          =   405 
         Left            =   7350 
         TabIndex        =   36 
         Top             =   300 
         Width           =   1305 
      End 
      Begin VB.CommandButton Command2  
         Caption         =   "保存" 
         Height          =   405 
         Left            =   6060 
         TabIndex        =   35 
         Top             =   300 
         Width           =   1305 
      End 
      Begin VB.ComboBox Combo3  
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   330 
         Left            =   1290 
         TabIndex        =   33 
         Top             =   300 
         Width           =   1485 
      End 
      Begin VB.Label Label17  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "班级:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   540 
         TabIndex        =   34 
         Top             =   360 
         Width           =   570 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "基本信息" 
      Height          =   4305 
      Left            =   270 
      TabIndex        =   3 
      Top             =   660 
      Width           =   8775 
      Begin VB.TextBox Text3  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   1200 
         TabIndex        =   17 
         Top             =   270 
         Width           =   1485 
      End 
      Begin VB.TextBox Text2  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   3990 
         TabIndex        =   16 
         Top             =   270 
         Width           =   1485 
      End 
      Begin VB.ComboBox Combo1  
         Enabled         =   0   'False 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   330 
         Left            =   6990 
         TabIndex        =   15 
         Top             =   300 
         Width           =   1485 
      End 
      Begin VB.ComboBox Combo2  
         Enabled         =   0   'False 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   330 
         ItemData        =   "upgrade.frx":08CA 
         Left            =   1200 
         List            =   "upgrade.frx":08D4 
         TabIndex        =   14 
         Top             =   780 
         Width           =   1485 
      End 
      Begin VB.ComboBox Combo4  
         Enabled         =   0   'False 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   330 
         Left            =   4020 
         TabIndex        =   13 
         Top             =   780 
         Width           =   1485 
      End 
      Begin VB.TextBox Text4  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   4020 
         TabIndex        =   12 
         Top             =   1320 
         Width           =   4425 
      End 
      Begin VB.TextBox Text5  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   1170 
         TabIndex        =   11 
         Top             =   1890 
         Width           =   1485 
      End 
      Begin VB.TextBox Text6  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   3990 
         TabIndex        =   10 
         Top             =   1890 
         Width           =   1485 
      End 
      Begin VB.TextBox Text7  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   1170 
         TabIndex        =   9 
         Top             =   2430 
         Width           =   7335 
      End 
      Begin VB.TextBox Text8  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   7020 
         TabIndex        =   8 
         Top             =   1860 
         Width           =   1485 
      End 
      Begin VB.TextBox Text9  
         Enabled         =   0   'False 
         Height          =   345 
         Left            =   1200 
         TabIndex        =   7 
         Top             =   2940 
         Width           =   7305 
      End 
      Begin VB.TextBox Text10  
         Enabled         =   0   'False 
         Height          =   525 
         Left            =   1200 
         TabIndex        =   6 
         Top             =   3510 
         Width           =   7335 
      End 
      Begin MSComCtl2.DTPicker DTPicker2  
         Height          =   375 
         Left            =   1200 
         TabIndex        =   4 
         Top             =   1320 
         Width           =   1455 
         _ExtentX        =   2566 
         _ExtentY        =   661 
         _Version        =   393216 
         Enabled         =   0   'False 
         Format          =   23789569 
         CurrentDate     =   36698 
      End 
      Begin MSComCtl2.DTPicker DTPicker1  
         Height          =   345 
         Left            =   6990 
         TabIndex        =   5 
         Top             =   750 
         Width           =   1485 
         _ExtentX        =   2619 
         _ExtentY        =   609 
         _Version        =   393216 
         Enabled         =   0   'False 
         Format          =   23789569 
         CurrentDate     =   36698 
      End 
      Begin VB.Label Label15  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "学号:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   540 
         TabIndex        =   31 
         Top             =   330 
         Width           =   570 
      End 
      Begin VB.Label Label2  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "姓名:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   3270 
         TabIndex        =   30 
         Top             =   330 
         Width           =   570 
      End 
      Begin VB.Label Label3  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "班级:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   6330 
         TabIndex        =   29 
         Top             =   390 
         Width           =   570 
      End 
      Begin VB.Label Label4  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "性别:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   540 
         TabIndex        =   28 
         Top             =   870 
         Width           =   570 
      End 
      Begin VB.Label Label5  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "出生日期:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   5850 
         TabIndex        =   27 
         Top             =   810 
         Width           =   1020 
      End 
      Begin VB.Label Label6  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "入学日期:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   150 
         TabIndex        =   26 
         Top             =   1440 
         Width           =   1020 
      End 
      Begin VB.Label Label7  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "民族:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   3300 
         TabIndex        =   25 
         Top             =   840 
         Width           =   570 
      End 
      Begin VB.Label Label8  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "家庭住址:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   2910 
         TabIndex        =   24 
         Top             =   1380 
         Width           =   1020 
      End 
      Begin VB.Label Label9  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "联系电话:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   120 
         TabIndex        =   23 
         Top             =   1980 
         Width           =   1020 
      End 
      Begin VB.Label Label10  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "父亲姓名:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   2910 
         TabIndex        =   22 
         Top             =   2010 
         Width           =   1020 
      End 
      Begin VB.Label Label11  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "父亲单位:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   120 
         TabIndex        =   21 
         Top             =   2550 
         Width           =   1020 
      End 
      Begin VB.Label Label12  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "母亲姓名:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   5910 
         TabIndex        =   20 
         Top             =   1920 
         Width           =   1020 
      End 
      Begin VB.Label Label13  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "母亲单位:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   150 
         TabIndex        =   19 
         Top             =   3060 
         Width           =   1020 
      End 
      Begin VB.Label Label14  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "备注:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Left            =   570 
         TabIndex        =   18 
         Top             =   3540 
         Width           =   570 
      End 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "检索(&S)" 
      Height          =   375 
      Left            =   2700 
      TabIndex        =   2 
      Top             =   120 
      Width           =   1365 
   End 
   Begin VB.TextBox Text1  
      Height          =   345 
      Left            =   1050 
      TabIndex        =   0 
      Top             =   120 
      Width           =   1485 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "学号:" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   10.5 
         Charset         =   134 
         Weight          =   700 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   210 
      Left            =   390 
      TabIndex        =   1 
      Top             =   180 
      Width           =   570 
   End 
End 
Attribute VB_Name = "Form7" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Dim rs As New ADODB.Recordset 
 
Private Sub Command1_Click() 
 If rs.State = 1 Then rs.Close 
 rs.Open "select * from  基本表 where 学号='" & Text1.Text & "'", cnn, adOpenKeyset, adLockPessimistic 
 showinfo 
End Sub 
 
Private Sub Command2_Click() 
  If rs.State = 1 Then rs.Close 
  rs.Open "update 基本表 set 班级='" & Combo3.Text & "' where 学号 = '" & Text3.Text & "'", cnn, adOpenKeyset, adLockPessimistic 
  MsgBox "学籍修改成功", vbOKOnly, "提示" 
  clearinfo 
End Sub 
 
Private Sub Command3_Click() 
  Unload Me 
End Sub 
 
Private Sub showinfo() 
    If rs.EOF Or rs.BOF Then 
      clearinfo 
      Exit Sub 
    End If 
    If Not IsNull(rs.Fields("学号")) Then Text3.Text = rs.Fields("学号") 
    If Not IsNull(rs.Fields("姓名")) Then Text2.Text = rs.Fields("姓名") 
    If Not IsNull(rs.Fields("班级")) Then Combo1.Text = rs.Fields("班级") 
    If Not IsNull(rs.Fields("性别")) Then Combo2.Text = rs.Fields("性别") 
    If Not IsNull(rs.Fields("民族")) Then Combo4.Text = rs.Fields("民族") 
    If Not IsNull(rs.Fields("出生日期")) Then DTPicker1.Value = rs.Fields("出生日期") 
    If Not IsNull(rs.Fields("入学时间")) Then DTPicker2.Value = rs.Fields("入学时间") 
    If Not IsNull(rs.Fields("家庭住址")) Then Text4.Text = rs.Fields("家庭住址") 
    If Not IsNull(rs.Fields("联系电话")) Then Text5.Text = rs.Fields("联系电话") 
    If Not IsNull(rs.Fields("父姓名")) Then Text6.Text = rs.Fields("父姓名") 
    If Not IsNull(rs.Fields("母姓名")) Then Text8.Text = rs.Fields("母姓名") 
    If Not IsNull(rs.Fields("父单位")) Then Text7.Text = rs.Fields("父单位") 
    If Not IsNull(rs.Fields("母单位")) Then Text9.Text = rs.Fields("母单位") 
    If Not IsNull(rs.Fields("备注")) Then Text10.Text = rs.Fields("备注") 
End Sub 
 
Private Sub clearinfo() 
'清空界面显示 
    Text3.Text = "" 
    Text2.Text = "" 
    Combo1.Text = "" 
    Combo2.Text = "" 
    Combo4.Text = "" 
    Text4.Text = "" 
    Text5.Text = "" 
    Text6.Text = "" 
    Text8.Text = "" 
    Text7.Text = "" 
    Text9.Text = "" 
    Text10.Text = "" 
End Sub 
 
Private Sub Form_Load() 
If rs.State = 1 Then rs.Close 
rs.Open "select 班级 from 班级表", cnn, adOpenKeyset, adLockPessimistic 
If rs.RecordCount <> 0 Then 
  rs.MoveFirst 
  Do While Not rs.EOF 
    Combo3.additem rs.Fields("班级") 
    rs.MoveNext 
  Loop 
End If 
End Sub