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

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

更新时间:2010-4-5:  来源:毕业论文
VB电表管理信息系统 第10页
8. 数据修改界面设计:
数据修改代码设计:
Dim changeE As Double
 Dim cEcount As Double

Private Sub cmdAsure_Click()
    If Trim(MDIme.dcvalue.BoundText) <> "" Then
        Dim cnn As New ADODB.Connection
        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
        sqlAdd = "update  panelinfo  set holderid='" & txtUserName(0) & "',holder='" & txtUserName(1) & "',LEndPCode='" & txtUserName(2) & "',CopyDate=# " & dtpWdate.Value & "# ,lightscale=" & txtUserName(3) & ",lsfee=" & txtUserName(4) & ",lmoney=" & txtUserName(5) & ",bmoney=" & txtUserName(6) & ",cname='" & txtUserName(7) & "',memotext='" & txtUserName(8) & "',cEndCode=" & txtUserName(9) & ",cFeeMoney=" & Val(txtUserName(10)) & " ,nowecount=" & changeE & ",atimes=" & Me.Text1 & ""
        sqlAdd = sqlAdd & " where holderid='" & Trim(MDIme.dcvalue.BoundText) & "'"
      
        cnn.Execute sqlAdd
        sqlAdd = "update 用户类型 set  UNITPRICE=" & Me.txtUserName(5) & " where ATypeID=" & dcob用途.BoundText
        cnn.Close
        MsgBox " 数据修改完成! ", vbInformation
    End If
   
End Sub

Private Sub Command1_Click()
Unload Me
 
End Sub

Private Sub dcob用途_Click(Area As Integer)
Dim rst As New ADODB.Recordset
If dcob用途.BoundText <> "" Then
rst.Open "select * from 用户类型 where ATypeID=" & dcob用途.BoundText & "", gCnn, adOpenStatic, adLockBatchOptimistic
Me.txtUserName(5) = Format(rst.Fields(2), "###0.00")
rst.Close
Else
  MsgBox " 请先添加用户电表类型信息! ", vbInformation
  Exit Sub
End If
End Sub

Private Sub Form_Load()
Dim rst As New ADODB.Recordset
Dim sqlEdit As String
sqlEdit = "select * from panelinfo "
sqlEdit = sqlEdit & " where holderid='" & Trim(MDIme.txtUserName(0)) & "' and delflag<>true "
rst.Open sqlEdit, gCnn, adOpenKeyset, adLockBatchOptimistic
If Not rst.EOF Then

    txtUserName(0) = rst.Fields(1)
    txtUserName(1) = rst.Fields(2)
    txtUserName(2) = rst.Fields(3)
    dtpWdate.Value = rst.Fields(4)
    txtUserName(3) = Format(rst.Fields(5), "####0.00")
    txtUserName(4) = Format(rst.Fields(6), "####0.00")
    txtUserName(5) = Format(rst.Fields(7), "####0.00")
    txtUserName(6) = Format(rst.Fields(8), "####0.00")
    txtUserName(7) = rst.Fields(9)
    txtUserName(8) = rst.Fields(10)
    txtUserName(9) = rst.Fields!cendcode
    Text1.Text = rst.Fields!Atimes
    changeE = rst.Fields!cendcode
    cEcount = rst.Fields!nowecount
   
    If rst.Fields(14) <> Null Then
        DTPicker1.Value = rst.Fields(14)
    End If
    txtUserName(10) = rst.Fields!cFeeMoney   
End If
Dim rstJB As New ADODB.Recordset
Set rstJB.ActiveConnection = gCnn
rstJB.CursorLocation = adUseClient
rstJB.LockType = adLockBatchOptimistic
rstJB.CursorType = adOpenKeyset
rstJB.Open "select * from  用户类型 where atypeid=" & rst.Fields!AtypeID
Set dcob用途.DataSource = rstJB
Set dcob用途.RowSource = rstJB
dcob用途.BoundColumn = "ATYPEID"
dcob用途.ListField = "ATYPE"
If rstJB.RecordCount <> 0 Then
    dcob用途.Text = rstJB.Fields(1)
    Me.txtUserName(5) = Format(rstJB.Fields(2), "###0.00")
End If
rst.Close
End Sub
Private Sub Form_Unload(Cancel As Integer)
MDIme.loadData (txtUserName(0))
End Sub
Private Sub txtUserName_Change(Index As Integer)
If Index = 9 Then
   changeE = cEcount + (Val(txtUserName(9)) - changeE)
End If
End Sub
Private Sub UpDown1_Change()
Me.Text1 = UpDown1.Value
End Sub
9. 开始收费界面设计:
开始收费代码设计:
Private Sub CmdPrint_Click()
On Error GoTo l
Dim LongColor As Long
If MsgBox("打印机准备好了吗?", vbYesNo + vbInformation) <> vbYes Then
  Exit Sub
End If
Me.CmdPrint.Visible = False
LongColor = Me.BackColor

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

VB电表管理信息系统 第10页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

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