【正文】
通過這幾個月的畢業(yè)設(shè)計,我學到很多以前沒有學到的 visual basic 開發(fā)技術(shù),在軟件工程學上更是取得了很大的進步。 amp。 %39。% amp。 39。 amp。拼 Where 語句 whrStr = where 1 = 1 If Trim() Then whrStr = whrStr amp。功能描述:拼湊 Where 語句 39。 amp。 39。2957387 Sqlstr = select * from panelInfo amp。拼 Where 語句 whrStr = getWhrStr() 39。 getWhrStr = whrStr End Function Private Sub cmdReturn_Click() Unload Me End Sub Private Sub Form_Load() = Format(Now, yyyymmdd) End Sub Private Sub Form_Unload(Cancel As Integer) If = 1 Then End If End Sub 11:費用查詢界面設(shè)計 : 費用查詢代碼設(shè)計 : Private Sub cmdExport_Click() 39。 and Feedate= amp。 End If whrStr = whrStr + and Feedate= amp。 End If If Trim() Then whrStr = whrStr + and qianFee= amp。 txtUser amp。 End If If Trim() Then whrStr = whrStr + and holder like 39。 Trim() amp。 and holderid =39。返回串值 Dim whrStr As String 39。 條紀錄! , vbInformation End Sub Private Function getWhrStr() As String 39。 MsgBox 數(shù)據(jù)查詢完成 ,共 amp。 If = 1 Then End If Sqlstr, gCnn, adOpenStatic, adLockBatchOptimistic txtCount = Format((0), ) amp。 Sqlstr Set rsdg = getQueryData(Sqlstr) Set = rsdg Sqlstr = select sum(feeMoney),sum(Ecount) from feels amp。 39。取得網(wǎng)格的數(shù)據(jù) Sqlstr = select * from feels amp。 元 End Sub Private Sub cmdQuery_Click() Dim Sqlstr As String Dim whrStr As String Dim feeC As Double Dim znjC As Double Dim rstRg As New 39。 度 總金額: amp。 Format(Now, yyyymmdd), 總電量 : amp。 ) 開始交費 = (7) End Sub Private Sub Form_Unload(Cancel As Integer) ((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:數(shù)據(jù)查詢界面設(shè)計 : 數(shù)據(jù)查詢代碼設(shè)計 : Private Sub cmdExport_Click() 39。 用戶 (住戶 編號 : amp。 (1) amp。 39。 amp。 39。 amp。 Val(txtznj) amp。 Format(Now, yyyymmdd) amp。 Val() amp。 Val() amp。 39。 amp。 39。 amp。 度 !lecount = !lecount + !nowecount 39。 / amp。 and delflagtrue , gCnn, adOpenStatic, adLockBatchOptimistic Dim rusrType As New If 0 Then select * from 用戶類型 where AtypeID= amp。 (0) amp。 Format(Change, ) Else = 0 End If select * from panelinfo where holderid=39。 Format(txtFee, ) = ¥ amp。 度 = (2) amp。 and delflagtrue sqlEdit, gCnn, adOpenKeyset, adLockBatchOptimistic If Not Then txtUserName(0) = (1) txtUserName(1) = (2) txtUserName(2) = (3) = (4) txtUserName(3) = Format((5), ) txtUserName(4) = Format((6), ) txtUserName(5) = Format((7), ) txtUserName(6) = Format((8), ) txtUserName(7) = (9) txtUserName(8) = (10) txtUserName(9) = !cendcode = !Atimes changeE = !cendcode cEcount = !nowecount If (14) Null Then = (14) End If txtUserName(10) = !cFeeMoney End If Dim rstJB As New Set = gCnn = adUseClient = adLockBatchOptimistic = adOpenKeyset select * from 用戶類型 where atypeid= amp。 Trim((0)) amp。 where holderid=39。 dcob 用途 .BoundText amp。 where ATypeID= amp。 sqlAdd sqlAdd = update 用戶類型 set UNITPRICE= amp。 Trim() amp。 where holderid=39。 amp。 changeE amp。 Val(txtUserName(10)) amp。 txtUserName(9) amp。 39。 amp。 39。 amp。 txtUserName(6) amp。 txtUserName(5) amp。 txtUserName(4) amp。 txtUserName(3) amp。 amp。 39。 amp。 39。 amp。 39。 amp。 \data\。Data Source= amp。 DbPassword amp。 and delflagtrue sqlEdit, gCnn, adOpenKeyset, adLockBatchOptimistic If Not Then txtUserName(0) = (1) txtUserName(1) = (2) txtUserName(2) = (3) = (4) txtUserName(3) = (5) txtUserName(4) = Format((6), ) txtUserName(5) = Format((7), ) txtUserName(6) = (8) txtUserName(7) = (9) txtUserName(8) = (10) txtUserName(9) = !cendcode changeE = !cendcode cEcount = !nowecount If (14) Null Then = (14) End If txtUserName(10) = !cFeeMoney End If End Sub Private Sub Form_Unload(Cancel As Integer) End Sub 8. 數(shù)據(jù)修改界面設(shè)計 : 數(shù)據(jù)修改代碼設(shè)計 : Dim changeE As Double Dim cEcount As Double Private Sub cmdAsure_Click() If Trim() Then Dim n As New Dim sqlAdd As String = Provider=。 Trim((0)) amp。 where holderid=39。 39。 amp。Persist Security Info=False = adUseClient sqlAdd = update panelinfo set delflag=true sqlAdd = sqlAdd amp。 _ amp。 。Jet OLEDB:database password= amp。 \data\。Data Source= amp。 DbPassword amp。 = c:\ = CurDir() = False End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) dy Unload Me End Sub Private Sub Form_Unload(Cancel As Integer) If = 0 Then = Provider=。 a amp。 amp。 a amp。 amp。 a amp。 a amp。and delflagtrue sqlEdit, gCnn, adOpenStatic, adLockBatchOptimistic If buttontime = False Then If Not Then txtUserName(0) = (1) txtUserName(1) = (2) txtUserName(2) = !cendcode dtpwdate(0).Value = (4) buttontime = True End If Else If Not Then txtUserName(0) = (1) txtUserName(1) = (2) txtUserName(2) = !cendcode dtpwdate(0).Value = (4) buttontime = True End If End If End Sub Private Sub txtUserName_KeyPress(Index As Integer, KeyAscii As Integer) If Index = 9 Then