VB.NET实验室管理系统(8)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-10-26 点击数:29444

计算机毕业设计实验室列表介绍:

5.2 SysList(实验室列表)
此页面显示实验室列表,包括实验室名称、实验室介绍、实验室位置、实验室负责人、联系电话和备注以及添加、编辑和删除按钮。如图5-2所示:

计算机毕业论文

以下是引用片段:

其主要代码实现过程如下:
Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.ItemCommand
        Select Case e.CommandName
            Case "Old"
                '传递 编号 跳转页面
                Response.Redirect("SysEdit.aspx?Tag=Old&bh=" + e.Item.Cells(0).Text)
            Case "Delete"
                '判断信息是否允许删除
                Dim tmpcnn As New Sql2000DB
                If tmpcnn.GetData("select * from 教师预约课程 where 实验室编号=" & e.Item.Cells(0).Text).Rows.Count > 0 Then
                    Response.Write("alert('当前的数据已经使用')")
                    Exit Sub
                End If
                If tmpcnn.GetData("select * from 实验课程 where 实验室编号=" & e.Item.Cells(0).Text).Rows.Count > 0 Then
                    Response.Write("alert('当前的数据已经使用')")
                    Exit Sub
                End If
                If tmpcnn.GetData("select * from 实验室设备管理 where 实验室编号=" & e.Item.Cells(0).Text).Rows.Count > 0 Then
                    Response.Write("alert('当前的数据已经使用')")
                    Exit Sub
                End If
                If tmpcnn.GetData("select * from 教学计划 where 实验室编号=" & e.Item.Cells(0).Text).Rows.Count > 0 Then
                    Response.Write("alert('当前的数据已经使用')")
                    Exit Sub
                End If
                If tmpcnn.GetData("select * from 规章制度 where 实验室编号=" & e.Item.Cells(0).Text).Rows.Count > 0 Then
                    Response.Write("alert('当前的数据已经使用')")
                    Exit Sub
                End If
                If tmpcnn.GetData("select * from 操作规程 where 实验室编号=" & e.Item.Cells(0).Text).Rows.Count > 0 Then
                    Response.Write("alert('当前的数据已经使用')")
                    Exit Sub
                End If
                '删除当前的实验室信息 刷新列表
                tmpcnn.SetData("delete from 实验室 where 实验室编号=" & e.Item.Cells(0).Text)
                Me.DataGrid1.DataSource = tmpcnn.GetData("select * from 实验室")
                Me.DataGrid1.DataBind()
        End Select
    End Sub

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第9页为计算机毕业论文编辑实验室功能介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网