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

物流运输管理系统 第5页

更新时间:2010-2-12:  来源:毕业论文
物流运输管理系统 第5页
4.5 更改运单表单
新建立FRMTRAFFICUPDATE表单,用来更改物流系统的业务表单,通过该表单可以修改业务单据中的各个项目信息。
 
更改运单窗体的控件及属性取值如下:
控件 属性 属性取值
Label Name lblTitle
 Caption 更改运单
Frame Name Frame1
 Caption 运输费用(单位:元)
Commandbutton Name cmdmodify
 Caption 修改
 Name cmdExit
 Caption 取消
代码如下:
Private Sub Form_Load()
    '调整位置
    Me.Top = 0
    Me.Left = 0
    Me.Width = MainForm.Width * 0.8
    Me.Height = MainForm.Height * 0.7
    Dim inum As Integer
    Dim strsql As String
    Dim DB As New clsDataBase
    Dim rs As New ADODB.Recordset
    '初始化车类型
    cmbTrainType.AddItem ("高边")
    cmbTrainType.ItemData(0) = 0
    cmbTrainType.AddItem ("蓬车")
    cmbTrainType.ItemData(1) = 1
    '初始化货物类型
    cmbProductType.AddItem ("包装")
    cmbProductType.ItemData(0) = 0
    cmbProductType.AddItem ("散装")
    cmbProductType.ItemData(1) = 1
    '初始化品名
    strsql = "SELECT * FROM PRODUCT"
    Set rs = sys.DB.OpenRecordSet(strsql)
    If Not (rs.BOF) Or (rs.EOF) Then
        inum = 0
        Do While Not rs.EOF
            cmbProductName.AddItem (rs("NAME"))
            cmbProductName.ItemData(inum) = rs("ID")
            rs.MoveNext
            inum = inum + 1
        Loop
    End If
    '初始化发站
    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
            cmbSendStation.AddItem (rs("NAME"))
            cmbSendStation.ItemData(inum) = rs("ID")
            rs.MoveNext
            inum = inum + 1
        Loop
    End If
    '初始化到站
    strsql = "SELECT * FROM STATION  ORDER BY NAME DESC"
    Set rs = sys.DB.OpenRecordSet(strsql)
    If Not (rs.BOF) Or (rs.EOF) Then
        inum = 0
        Do While Not rs.EOF
            cmbReceiveStation.AddItem (rs("NAME"))
            cmbReceiveStation.ItemData(inum) = rs("ID")
            rs.MoveNext
            inum = inum + 1
        Loop
    End If
    '初始化发货人
    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
            cmbSender.AddItem (rs("NAME"))
            cmbSender.ItemData(inum) = rs("ID")
            rs.MoveNext
            inum = inum + 1
        Loop
    End If
   '初始化收货人
    strsql = "SELECT * FROM CLIENT  ORDER BY NAME DESC"
    Set rs = sys.DB.OpenRecordSet(strsql)
    If Not (rs.BOF) Or (rs.EOF) Then
        inum = 0
        Do While Not rs.EOF
            cmbReceiver.AddItem (rs("NAME"))
            cmbReceiver.ItemData(inum) = rs("ID")
            rs.MoveNext
            inum = inum + 1
        Loop
    End If
    '赋值
    strsql = "SELECT * FROM TRAFFIC WHERE ID = " & updateid
    Set rs = sys.DB.OpenRecordSet(strsql)
    If Not rs.EOF Then
        txtId.Text = sys.TextTolong(rs("ID"))
        txtCarNum.Text = sys.StrToText(rs("CarNum"))
        For inum = 0 To cmbTrainType.ListCount - 1
            If cmbTrainType.ItemData(inum) = sys.TextTolong(rs("TrainType")) Then
                cmbTrainType.ListIndex = inum
            End If
        Next
        For inum = 0 To cmbProductName.ListCount - 1
            If cmbProductName.ItemData(inum) = sys.TextTolong(rs("ProductName")) Then
                cmbProductName.ListIndex = inum
            End If
        Next
        If Not IsNull(rs("DateNum")) Then
            dtpDateNum.Value = CDate(rs("DateNum"))
        Else
            dtpDateNum.Value = Date
        End If
        For inum = 0 To cmbSendStation.ListCount - 1
            If cmbSendStation.ItemData(inum) = sys.TextTolong(rs("SendStation")) Then
                cmbSendStation.ListIndex = inum
            End If
        Next
        For inum = 0 To cmbReceiveStation.ListCount - 1
            If cmbReceiveStation.ItemData(inum) = sys.TextTolong(rs("ReceiveStation")) Then
                cmbReceiveStation.ListIndex = inum
            End If
        Next
        For inum = 0 To cmbSender.ListCount - 1
            If cmbSender.ItemData(inum) = sys.TextTolong(rs("Sender")) Then
                cmbSender.ListIndex = inum
            End If
        Next
        For inum = 0 To cmbReceiver.ListCount - 1
            If cmbReceiver.ItemData(inum) = sys.TextTolong(rs("Receiver")) Then
                cmbReceiver.ListIndex = inum
            End If
        Next
        For inum = 0 To cmbProductType.ListCount - 1
            If cmbProductType.ItemData(inum) = sys.TextTolong(rs("ProductType")) Then
                cmbProductType.ListIndex = inum
            End If

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

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

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