VB.NET企业网上订货系统(8)

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

计算机毕业设计主界面介绍:

(一)系统主界面
在IE里运行本系统,出现系统的主界面,包括登陆信息、产品类别、产品信息显示列表、新闻信息列表模块。如图:
计算机毕业论文

以下是引用片段:

相关代码如下:
 Public strTslb As String = ""
    Public strTsxx As String = ""
    Dim tmpData As New DataControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim tmpda As DataTable
            Dim i As Long
            tmpda = tmpData.Get_Table("select * from 产品类别")
            If tmpda.Rows.Count > 0 Then
                If tmpda.Rows.Count Mod 2 = 0 Then
                    '如果记录数%2等于0将产品类别循环拼合到字符串变量中
                    strTslb = ""
                    For i = 0 To tmpda.Rows.Count / 2 - 1
                        strTslb = strTslb & >"
                        Dim strTmpLx As String = ""
                        strTmpLx =" & tmpda.Rows(2 * i)("类别编号").ToString() + ">" & tmpda.Rows(2 * i)("类别名称").ToString() & "
                        strTmpLx = strTmpLx + >" & lbid=" & tmpda.Rows(2 * i + 1)("类别编号").ToString() & ">" & tmpda.Rows(2 * i + 1)("类别名称").ToString() & ";
                        strTslb = strTslb & strTmpLx ;
                    Next
                Else
                    strTslb = ""
                    '否则 循环显示全部记录-1 在后面补足最后一条记录
                    For i = 0 To Fix(tmpda.Rows.Count / 2) - 1
                        strTslb = strTslb;
                        Dim strTmpLx As String = ""
                        strTmpLx = "<=" & tmpda.Rows(2 * i)("类别编号").ToString() + ">" & tmpda.Rows(2 * i)("类别名称").ToString() & >"
                        strTmpLx = strTmpLx + >" & ?lbid=" & tmpda.Rows(2 * i + 1)("类别编号").ToString() & ">" & tmpda.Rows(2 * i + 1)("类别名称").ToString() & >"
                        strTslb = strTslb & strTmpLx;
                    Next
                    '拼接最后一条记录
                    Dim strTmpLx1 As String = ""
                    strTslb = strTslb + 
                    strTmpLx1 = lbid=" & tmpda.Rows(tmpda.Rows.Count - 1)("类别编号").ToString() & ">" & tmpda.Rows(tmpda.Rows.Count - 1)("类别名称").ToString() & >"
                    strTslb = strTslb & strTmpLx1 & "
                End If
            End If

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

第9页为计算机毕业论文后台功能介绍......

下一篇:VB.NET博客系统

【联系方式】

【本站信誉】

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