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


VERSION 5.00 
Begin VB.Form Form11  
   Caption         =   "毕业班处理" 
   ClientHeight    =   5085 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   5355 
   Icon            =   "graduate.frx":0000 
   LinkTopic       =   "Form11" 
   ScaleHeight     =   5085 
   ScaleWidth      =   5355 
   StartUpPosition =   2  '屏幕中心 
   Begin VB.CommandButton Command4  
      Caption         =   "退出" 
      Height          =   435 
      Left            =   4020 
      TabIndex        =   3 
      Top             =   4410 
      Width           =   1065 
   End 
   Begin VB.CommandButton Command3  
      Caption         =   "确定" 
      Height          =   435 
      Left            =   2880 
      TabIndex        =   2 
      Top             =   4410 
      Width           =   1155 
   End 
   Begin VB.ListBox List2  
      Height          =   3480 
      ItemData        =   "graduate.frx":08CA 
      Left            =   2850 
      List            =   "graduate.frx":08CC 
      TabIndex        =   1 
      Top             =   630 
      Width           =   2175 
   End 
   Begin VB.ListBox List1  
      Height          =   3480 
      ItemData        =   "graduate.frx":08CE 
      Left            =   240 
      List            =   "graduate.frx":08D0 
      TabIndex        =   0 
      Top             =   660 
      Width           =   2175 
   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            =   300 
      TabIndex        =   5 
      Top             =   330 
      Width           =   1020 
   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            =   2880 
      TabIndex        =   4 
      Top             =   360 
      Width           =   1470 
   End 
End 
Attribute VB_Name = "Form11" 
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() 
   
End Sub 
 
Private Sub Command3_Click() 
Dim i As Integer 
Dim str As String 
  For i = 0 To List2.ListCount 
     str = List2.List(i) 
     If rs.State = 1 Then rs.Close 
     rs.Open "delete from 基本表 where 班级='" & str & "'", cnn, adOpenKeyset, adLockPessimistic 
     If rs.State = 1 Then rs.Close 
     rs.Open "delete from 班级表 where 班级='" & str & "'", cnn, adOpenKeyset, adLockPessimistic 
  Next i 
End Sub 
 
Private Sub Command4_Click() 
 Unload Me 
End Sub 
 
Private Sub Form_Initialize() 
 If rs.State = 1 Then rs.Close 
  rs.Open "select 班级 from 班级表", cnn, adOpenStatic, adLockPessimistic 
  If rs.RecordCount <> 0 Then 
     rs.MoveFirst 
    Do While Not rs.EOF() 
      List1.additem rs.Fields("班级") 
      rs.MoveNext 
    Loop 
  End If 
End Sub 
 
Private Sub List1_DblClick() 
  List2.additem List1.Text 
    
End Sub 
 
Private Sub List2_DblClick() 
  List2.RemoveItem List2.ListIndex 
End Sub