毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

VB学生信息管理系统 第9页

更新时间:2008-1-15:  来源:毕业论文

VB学生信息管理系统 第9页

Private Sub cmdfind_Click()

Formclass3.Show

End Sub

 

Private Sub cmdmodi_Click()

If Trim(Me.MSF1.TextMatrix(MSF1.Row, 1)) = "" Then

                  sssss = MsgBox("你还没有选择记录!", vbOKOnly + vbExclamation, "警告")

                Exit Sub

               Else

               qxstr = Executeqx(2)

              If qxstr = "readonly" Then

              ss = MsgBox("对不起,你是只读用户不能修改记录,请与管理员联系!", vbInformation + vbOKOnly, " 警告")

              Exit Sub

              End If

               classmodi = True

               Formclass1.Show

                 Formclass1.classload

                Formclass1.ZOrder 0

                Call Form_Activate

           End If

End Sub

 

Private Sub cmdprint_Click()

 If Trim(printstr) = "" Then

    sssss = MsgBox("没有当前记录!", vbOKOnly + vbExclamation, "警告")

    Exit Sub

  End If

    If DataEnv1.rsCommand2.State = adStateOpen Then

     DataEnv1.rsCommand2.Close

    End If

     DataEnv1.rsCommand2.Open printstr

     If DataEnv1.rsCommand2.EOF = True Then

            sssss = MsgBox("没有当前记录!", vbOKOnly + vbExclamation, "警告")

      Exit Sub

    End If

    DataReportclass2.Show 1

End Sub

 

Private Sub cmdprintall_Click()

If DataEnv1.rsCommand2.State = adStateOpen Then

     DataEnv1.rsCommand2.Close

    End If

     DataEnv1.rsCommand2.Open ("select * from class")

     If DataEnv1.rsCommand2.EOF = True Then

            sssss = MsgBox("没有当前记录!", vbOKOnly + vbExclamation, "警告")

      Exit Sub

    End If

    DataReportclass2.Show 1

End Sub

 

 

 

Private Sub Form_Activate()

If classfind = True Then

  Formclass3.ZOrder 0

End If

If classfind = True Then

  Exit Sub

ElseIf classmodi = True Then

   classshowdata

 ' TreeView1_DblClick

' classmodi = False

Else

  classtree

End If

'If classfind = True Then

'  Exit Sub

'Else

'  MDIForm1.clabrowse

'End If

End Sub

 

 

 

Public Sub classtree()

TreeView1.Nodes.Clear

Dim nodex As Node

Dim mrc As ADODB.Recordset

Dim mrc1 As ADODB.Recordset

Dim str As String

Dim a As String

a = "年级"

TreeView1.LineStyle = tvwRootLines

str = "select distinct 年级 from class order by 年级"

Set mrc = ExecuteSQL(str)

str = "select distinct 年级,班级 from class order by 年级,班级"

Set mrc1 = ExecuteSQL(str)

'mrc.MoveFirst

Do Until mrc.EOF

  mrc1.MoveFirst

   Set nodex = TreeView1.Nodes.add(, , a, mrc.Fields(0), 1, 1)

  Do While Not mrc1.EOF

   If mrc1.Fields(0) = mrc.Fields(0) Then

     Set nodex = TreeView1.Nodes.add(a, tvwChild, , mrc1.Fields(1), 2, 2)

   End If

   mrc1.MoveNext

  Loop

  a = a & "1"

  mrc.MoveNext

Loop

 mrc1.Close

 mrc.Close

 Set mrc = Nothing

  Set mrc1 = Nothing

End Sub

 

 

Private Sub TreeView1_DblClick()

On Error GoTo ss

If TreeView1.SelectedItem.Index = 0 Then

MSF1.Clear

Exit Sub

End If

txtsql = TreeView1.Nodes.Item(TreeView1.SelectedItem.Index)

   txtsql = " select * from class where 年级='" & Trim(txtsql) & "' or 班级='" & Trim(txtsql) & "' order by 年级 ,班级 "

   printstr = txtsql

Me.Caption = "浏览班级"

Me.classshowtitle

Me.classshowdata

Exit Sub

ss:

MSF1.Clear

End Sub

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页

VB学生信息管理系统 第9页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。