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

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

更新时间:2010-4-5:  来源:毕业论文
VB电表管理信息系统 第11页
Me.BackColor = vbWhite
txtPrint.BackColor = vbWhite
Me.PrintForm
Me.BackColor = LongColor
Me.CmdPrint.Visible = True
Exit Sub
l: MsgBox Err.Description
End Sub
Private Sub Command1_Click()
Dim rstFeeEnd As New ADODB.Recordset
Dim cmdExe As New ADODB.Command
 Dim reMoney As String
 Dim sqlString As String
 If Trim(txtFee) = "" Or Trim(txtM) = "" Then
    MsgBox "  请先输入数据!  ", vbInformation
    Exit Sub
 End If
 reMoney = ConvertMe(Trim(txtFee))
 Dim Change As String
 Change = Val(txtM) - Val(txtFee)
 If Change < 0 Then
    If MsgBox(" 实收电费比应收现金大,您确定要这样收取? ", vbYesNo + vbInformation) = vbNo Then
        Exit Sub
    End If
 End If
 Me.txtHoldernum = MDIme.txtUserName(0)
 Me.holderName = MDIme.dcvalue.Text
 Me.lblEAmount = MDIme.txtUserName(1) & "度"
 Me.endA = MDIme.txtUserName(2) & "度"
 Me.lblHandInMoney = "¥" & Format(txtFee, "####0.00")
 Me.lblSum = "¥" & Format(txtM.Text, "####0.00")
 Me.lblfinaldate = Date
 If Change >= 0 Then
    Me.lblMoneyOfCard = "¥" & Format(Change, "####0.00")
 Else
    Me.lblMoneyOfCard = 0
 End If
 rstFeeEnd.Open "select * from panelinfo where  holderid='" & MDIme.txtUserName(0) & "' and delflag<>true ", gCnn, adOpenStatic, adLockBatchOptimistic
 Dim rusrType As New ADODB.Recordset
 If rstFeeEnd.RecordCount <> 0 Then
     rusrType.Open "select * from  用户类型 where AtypeID=" & rstFeeEnd.Fields!AtypeID, gCnn, adOpenStatic, adLockBatchOptimistic
     If rusrType.RecordCount <> 0 Then
         Me.lblusrYype = rusrType.Fields!AType
         rusrType.Close
     Else
         MsgBox "  用户类型不能为空! ", vbCritical
         rusrType.Close
         Unload Me
     End If
 End If
 Me.Label11 = rstFeeEnd.Fields!Atimes
 Me.Label11 = Me.Label11 & "/" & Format(rstFeeEnd.Fields!lMoney, "##0.00")
 rstFeeEnd.Fields!nowecount = 0
 Me.startA = rstFeeEnd.Fields!LEndPCode & "度"
 rstFeeEnd.Fields!lecount = rstFeeEnd.Fields!lecount + rstFeeEnd.Fields!nowecount
 'MsgBox MDIme.txtUserName(7)
 rstFeeEnd.Fields!lsFee = Val(MDIme.txtUserName(7)) - Val(txtM)
 rstFeeEnd.UpdateBatch adAffectCurrent
 rstFeeEnd.Close
 sqlString = "insert into feels (holderid,holder,feemoney,qianfee,feedate,zhinajin,memols,cname,Ecount) values('" & MDIme.txtUserName(0) & "','" & MDIme.dcvalue.Text & "'," & Val(txtFee.Text) & "," & Val(txtM.Text) & ",#" & Format(Now, "yyyy-mm-dd") & "#," & Val(txtznj) & ",'" & txtPrint & "','" & Guser & "'," & MDIme.txtUserName(1) & ")"
 cmdExe.ActiveConnection = gCnn
 cmdExe.CommandText = sqlString
 cmdExe.Execute
 txtPrint.Visible = True
 Me.CmdPrint.Visible = True
 Frame2.Visible = False
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Caption = MDIme.dcvalue.Text & "用户(住户编号:" & MDIme.txtUserName(0) & " ) 开始交费"
txtFee.Text = MDIme.txtUserName(7)
End Sub
Private Sub Form_Unload(Cancel As Integer)
MDIme.loadData (MDIme.txtUserName(0))
End Sub
Private Sub txtFee_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And KeyAscii <> 46 And KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End Sub
Private Sub txtM_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And KeyAscii <> 46 And KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End Sub
Private Sub txtznj_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And KeyAscii <> 46 And KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End Sub
10:数据查询界面设计:

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

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

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