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

物流运输管理系统 第3页

更新时间:2010-2-12:  来源:毕业论文
物流运输管理系统 第3页
  End If
End Sub
Private Sub txtBasicCarriage_Change()
    Call MakeTotal     //调用本模块中的函数MakeTotal
End Sub
Private Sub txtClearCharge_Change()
    Call MakeTotal
End Sub
Private Sub txtFavourabile_Change()
    Call MakeTotal
End Sub
Private Sub txtLoadCharge_Change()
    Call MakeTotal
End Sub
Private Sub txtLocalCarriage_Change()
    Call MakeTotal
End Sub
Private Sub txtServeCharge_Change()
    Call MakeTotal
End Sub
Private Sub txtShortCarriage_Change()
    Call MakeTotal
End Sub
Private Sub txtStorageCharge_Change()
    Call MakeTotal
End Sub
Private Sub txtWeight_Change()
    Call MakeTotal
End Sub
4.4 查看运单表单
新建FRMTRAFFIC表单,查看运单表单,用来查询、浏览、修改和删除所接受的物流业务。选择表单可以浏览、修改和删除运单单据。
 
查看运单窗体的控件及属性取值如下:
控件 属性 属性取值
Label Name lblTitle
 Caption 查看运单
Commandbutton Name cmdmodify
 Caption 修改
Commandbutton Name cmddelete
 Caption 删除
Commandbutton Name Command4
 Caption 查询
代码如下:
Private Sub Form_Load()
    Me.Top = 0
    Me.Left = 0
    Me.Width = MainForm.Width * 0.8
    Me.Height = MainForm.Height * 0.7
    Call query
End Sub
Public Sub query(Optional ByVal strsql As String = "SELECT * FROM TRAFFIC ORDER BY ID DESC")
    '查询运单
    Dim inum As Integer
    Dim rs As New ADODB.Recordset
    ReDim arrTraffic(8, 0)
    '禁止向前,向后翻页
    cmdForWard.Enabled = False
    cmdNext.Enabled = False
    Set rs = sys.DB.OpenRecordSet(strsql)
    rs.PageSize = 50
    If Not (rs.BOF) Or (rs.EOF) Then
        '计算翻页
        MaxPage = rs.PageCount - 1
        total = rs.RecordCount
        NowPage = 0
        '取出记录集
        inum = 0
        Do While Not rs.EOF
            ReDim Preserve arrTraffic(8, inum)// 重新定义arrTraffic为//8行inum列

            arrTraffic(0, inum) = rs.Fields("ID") //取ID的值赋给第//1行,第inum列,下面的以此类推
            arrTraffic(1, inum) = rs.Fields("CARNUM")
            arrTraffic(2, inum) = rs.Fields("DATENUM")
            arrTraffic(3, inum) = rs.Fields("PRODUCTNAME")
            arrTraffic(4, inum) = rs.Fields("SENDSTATION")
            arrTraffic(5, inum) = rs.Fields("RECEIVESTATION")
            arrTraffic(6, inum) = rs.Fields("SENDER")
            arrTraffic(7, inum) = rs.Fields("WEIGHT")
            arrTraffic(8, inum) = rs.Fields("TOTAL")
            inum = inum + 1
            rs.MoveNext  //指向下一列
        Loop
         '初始化品名
         ReDim arrProduct(1, 0)             //初始化一个二位数组
         strsql = "SELECT * FROM PRODUCT"  // strsql为PRODUCT表
         Set rs = sys.DB.OpenRecordSet(strsql)//数据库中查询这个表,结果返回rs
         If Not (rs.BOF) Or (rs.EOF) Then
             inum = 0
             Do While Not rs.EOF
                 ReDim Preserve arrProduct(1, inum)
                 arrProduct(0, inum) = rs("ID")
                 arrProduct(1, inum) = rs("NAME")
                 rs.MoveNext
                 inum = inum + 1
             Loop
         End If
         '初始化车站
         ReDim arrstation(1, 0)
         strsql = "SELECT * FROM STATION ORDER BY NAME"
         Set rs = sys.DB.OpenRecordSet(strsql)
         If Not (rs.BOF) Or (rs.EOF) Then
             inum = 0
             Do While Not rs.EOF
                 ReDim Preserve arrstation(1, inum)
                 arrstation(0, inum) = rs("ID")
                 arrstation(1, inum) = rs("NAME")
                 rs.MoveNext
                 inum = inum + 1
             Loop
         End If
         '初始化客户
         ReDim arrclient(1, 0)
         strsql = "SELECT * FROM CLIENT  ORDER BY NAME"
         Set rs = sys.DB.OpenRecordSet(strsql)
         If Not (rs.BOF) Or (rs.EOF) Then
             inum = 0
             Do While Not rs.EOF
                 ReDim Preserve arrclient(1, inum)
                 arrclient(0, inum) = rs("ID")

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

物流运输管理系统 第3页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

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