VB电表管理信息系统 第17页

VB电表管理信息系统 第17页
 If rst.RecordCount <> 0 Then
    Set dcvalue.RowSource = rst
    dcvalue.BoundColumn = "holderID"
    dcvalue.ListField = "holder"
    Set dcNum.DataSource = rst
    Set dcNum.RowSource = rst
    dcNum.ListField = "holderid"
   
    If Not rst.EOF Then
        dcNum.Text = rst.Fields!holderid
        dcvalue.Text = rst.Fields(2)
        txtUserName(0) = rst.Fields(1)
        txtUserName(1) = rst.Fields!nowecount
        txtUserName(2) = rst.Fields!cendcode
        dtpwdate.Value = rst.Fields(4)
        txtUserName(3) = Format(rst.Fields!lMoney, "##0.00")
        txtUserName(4) = Format(rst.Fields!bmoney, "###.0.00")
        txtUserName(6) = rst.Fields!lsFee
        txtUserName(5) = Val(txtUserName(1)) * Val(txtUserName(3)) * (Val(rst.Fields!lightScale) / 100) + Val(txtUserName(1)) * Val(txtUserName(4)) * (1 - rst.Fields!lightScale / 100)
        txtUserName(8) = rst.Fields(9)
        txtUserName(7) = Val(txtUserName(5)) + Val(txtUserName(6))
        rst.Fields!cFeeMoney = txtUserName(7)
        rst.UpdateBatch adAffectCurrent
  End If
  End If
End Sub
Public Sub loadData(Hid As String)
  Dim rst As New ADODB.Recordset
   Dim cnn As New ADODB.Connection
   Dim Atimes As Integer
        Dim sqlAdd As String
        cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= " & DbPassword & " ;Data Source= " & _
        App.Path & "\data\dbdb.mdb;Persist Security Info=False"
        cnn.CursorLocation = adUseClient
        cnn.Open
        If Trim(Hid) <> "" Then
            rst.Open " select * from panelinfo  where holderid='" & Hid & "' and delflag<>true  ", cnn, adOpenStatic, adLockBatchOptimistic
        Else
           rst.Open " select * from panelinfo  where  delflag<>true  ", cnn, adOpenStatic, adLockBatchOptimistic
        End If
   
      If Not rst.EOF Then
        dcNum.Text = rst.Fields!holderid
        dcvalue.Text = rst.Fields(2)
        txtUserName(0) = rst.Fields(1)
        txtUserName(1) = rst.Fields!nowecount
        txtUserName(2) = rst.Fields!cendcode
        dtpwdate.Value = rst.Fields(4)
        txtUserName(3) = Format(rst.Fields!lMoney, "####0.00")
        txtUserName(4) = Format(rst.Fields!bmoney, "####0.00")
        txtUserName(6) = Format(rst.Fields!lsFee, "####0.00")
        'txtUserName(5) = Format(txtUserName(1) * txtUserName(3) * (rst.Fields!lightScale / 100) + txtUserName(1) * txtUserName(4) * (1 - rst.Fields!lightScale / 100), "####0.00")
        If rst.Fields!Atimes = 0 Then
            Atimes = 1
        Else
            Atimes = rst.Fields!Atimes
        End If
        txtUserName(5) = Format(Val(txtUserName(1)) * txtUserName(3) * Atimes, "####0.00")
        txtUserName(8) = rst.Fields(9)
        txtUserName(7) = Format(Val(txtUserName(5)) + Val(txtUserName(6)), "####0.00")
        rst.Fields!cFeeMoney = txtUserName(7)
        rst.UpdateBatch adAffectCurrent
    End If
    rst.Close
    cnn.Close   
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
gCnn.Close
Set gcon = Nothing
End Sub
Private Sub mgcf_Click()
frmFeefind.Show
End Sub
Private Sub mhf_Click()
frmdaoru.Show
End Sub
Private Sub msf_Click()
frmFind1.Show
End Sub
Private Sub qianfeilm_Click()
frmList.qfFlg = True
frmList.Show
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Trim(Button.Key)
Case "a"
frmFee.Show 1
Case "b"
 frmCopyP.Sh
frmFee.Show 1
Case "d"
frmbeifen.Show 1
Case "e"
frmdaoru.Show 1
Case "f"
frmFeefind.Show 1
Case "g"
frmFind1.Show 1
Case "dhcb1"
Case "dbcb2"

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有