JSJ06-289@vb电表管理系统(源代码+论文)
收藏
资源目录
压缩包内文档预览:(预览前20页/共42页)
编号:507611
类型:共享资源
大小:5.69MB
格式:ZIP
上传时间:2015-11-11
上传人:QQ2****711
认证信息
个人认证
孙**(实名认证)
辽宁
IP属地:辽宁
12
积分
- 关 键 词:
-
毕业设计论文
- 资源描述:
-
JSJ06-289@vb电表管理系统(源代码+论文),毕业设计论文
- 内容简介:
-
optionnts 毕业设计 电表管理系统 班级 _ 姓名 _ 学号 _ nts 摘 要 1 Abstract2 第一章 引言 4 1 1 课题背景 4 1 2 系统简介 5 第二章 系统的分析 6 2 1 系统开发的目标和思想 6 2 2 系统的可行性分析 8 第三章 系统的设计 1 8 3 1 系统的功能结构设计 18 3 2 系统的数据库设计 3 3 界面设计与代码设计 23 24 结束语 4 6 致谢 4 7 参考文献 4 8 nts 摘 要 传统的电费管理都是由工作人员手工查表 ,抄表完成的 ,其中要完成用户电费的收取 ,每月抄度 ,用户购电情况查询 ,以及列出欠费用户的信息名单 ,之类的信息 .其工作强度大 ,工作流程繁琐 ,由于工作人员的不细心 ,将会造成电费收支的出错也是经常发生的 .鉴于以上原因我们有必要开发一种帮作电费管理人员的软件系统 ,可以完成检查用户用电情况 ,每月抄度 ,信息录入以及基本数据维护的各项功能 .本系统采用 visual basic 6.0 与微软 Access 数据库方式 .界面尽量做到人性化 ,数据维护方面做到可靠安全 . 关键字 : 电费管理 ,visual basic, Access,数据库 Abstract Electricity from the traditional management staff are artisanal Chabiao, meter reading completed, which should be completed by the users of electricity per month penalty for users to buy electricity enquiries, and a list of user information channels list such information. Its work-intensive, cumbersome workflow, because staff are not careful. would result in the tariff revenue is recurring mistakes. Given the above reasons we need to develop a management software to help make electricity system, the user can complete the inspection of electricity monthly copied degrees, Information includes basic data and the maintenance function. with the system using visual basic Microsoft Access 6.0 database. as far as possible humanization interface, data maintenance to reliable security. keyword : tariff management, visual basic, Access, the database nts 第一章 引言 1 1 课题背景 传统的电费管理都是由工作人员手工查表 ,抄表完成的 ,其中要完成用户电费的收取 ,每月抄度 ,用户购电情况查询 ,以及列出欠费用户的信息名单 ,之类的信息 .其工作强度大 ,工作流程繁琐 ,由于工作人员的不细心 ,将会造成电费收支的出错也是经常发生的 .鉴于以上原因我们有必要开发一种帮作电费管理人员的软件系统 ,可以完成检查用户用电情况 ,每月抄度 ,信息录入以及基本数据维护的各项功能 .本系统采用 visual basic 6.0 与微软 Access 数据库方式 .界面尽量做到人性化 ,数据维护方面做到可靠安全 . 1 2 系统简介 本系统主要由以下几大功能模块组成 : 一 . 用户交费 :(交纳电费 ,本日小节 ) 二 . 本月抄度 :(单户抄度 多户抄度 ) 三 . 资料导出 (全部清单 ,欠费清单 ) 四 . 数据查询 (电费查询与统计 ,用户欠费查询 ) 五 . 信息录入 (资料录入 ,资料修改 , 资料删除 ) 六 . 系统数据维护 (数据备份 ,数据恢复 ) 七 . 基本数据维护 (用户类型维护 , 操作员维护 ) 八 . 帮助 九 . 退出 nts第二章 系统的分析 2 1 系统开发的目标和思想 本系统主要服务于 电费管理人员的日常工作 .设计思路主要参照工作人员抄表 ,记录资料 ,资料管理 ,信息录入等方面的工作流程展开的 . 2 2 系统的可 行性分析 本系统采用 visual basic6.0 与微软的 access 作为数据库结合 .在系统编写上具有可行性 . 经济方面 :本系统可以服务电厂 ,电费管理单位 ,为企业节省人力开支 . 社会方面 :服务于大众 ,方便抄表人员工作 ,可靠方便 . 第三章 系统的设计 3 1 系统的功能结构设计 nts 3 2 系统的数据库设计 1. 用户类型表 : 字段名称 数据类型 说明 ATypeID 自动编号 AType 文本 电费类型 UNITPRICE 货币 Adate 日期 /时 间 电费设置日期 2. 密码表 : 字段名称 数据类型 姓名 文本 操作权限 文本 密码 文本 程序登陆 主界面 用户交费 本月抄费 资料导出 数据查询 信息录入 系统数据维护 基本数据维护 帮助 退出 nts3. MaxID 表 : 字段名称 数据说明 TableName 文本 MaxID 数字 3 3 界面设计与代码设计 1.用户登陆界面设计 : 3 4 界面设计与代码设计 用户登陆界面代码分析 : Private Sub Command1_Click() Dim rstpchard As New ADODB.Recordset Dim reHard As String Dim getid As String reHard = GetpcHard(getid) rstpchard.Open select * from getpchard , gCnn, adOpenKeyset, adLockBatchOptimistic If rstpchard.RecordCount = 0 Then rstpchard.AddNew rstpchard.Fields(0) = reHard rstpchard.UpdateBatch adAffectCurrent Else nts If Trim(reHard) Then rec(姓名 ) = Combo2.Text Else rec(姓名 ) = End If If Combo1.Text Then rec(密码 ) = Text2.Text Else rec(密码 ) = End If rec.Update rec.Close Else Set rec = New ADODB.Recordset rec.Open select * from 记住密码 , gCnn, 3, 3 rec(标记 ) = 0 rec.Update rec.Close End If Dim rec1 As ADODB.Recordset Set rec1 = New ADODB.Recordset rec1.Open select * from 登录人员 , gCnn, 3, 3 Set rec = New ADODB.Recordset rec.Open select * from 密码表 where 姓名 = & Combo2.Text & and 操作权限= & Combo1.Text & and 密码 = & Text2.Text & , gCnn, 3, 3 If rec.EOF = False Then If rec(操作权限 ) true , gCnn, adOpenStatic, adLockBatchOptimistic If rst.RecordCount true , gCnn, adOpenKeyset, adLockBatchOptimistic If Not rst.EOF Then 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(8), #0.00) txtUserName(5) = Format(txtUserName(1) * txtUserName(3) * (rst.Fields!lightScale / 100) + txtUserName(1) * txtUserName(4) * (1 - rst.Fields!lightScale / 100), #0.00) txtUserName(8) = rst.Fields(9) txtUserName(7) = Format(Val(txtUserName(5) + Val(txtUserName(6), #0.00) End If rst.Close End Sub Private Sub dcvalue_Click(Area As Integer) Dim rst As New ADODB.Recordset rst.Open select * from panelinfo where holderid= & dcvalue.BoundText & and delflagtrue , gCnn, adOpenKeyset, adLockBatchOptimistic If rst.RecordCount Then rst.Open select * from panelinfo where holderid= & Hid & and delflagtrue , 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) nts 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 ntsPrivate Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Trim(Button.Key) Case a frmFee.Show 1 Case b frmCopyP.Show Case c 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 Case j X = MsgBox(真的要退出吗? , vbYesNo + vbQuestion, 警告 ) If X = vbYes Then End Else End If End Select End Sub Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu) Select Case ButtonMenu.Key Case dhcb1 frmCopyP.Show Case dhcb2 usrcopyP.Show End Select End Sub Private Sub weihu_Click() FRMYHSD.Show End Sub ntsPrivate Sub yihu_Click() frmCuifei.muser1 = 1 frmCuifei.Show End Sub 4. 备份界面设计 : : 备份代码设计 : Private Sub Command1_Click() Dim a As String a = App.Path a = a & b = Text1.Text On Error GoTo errhandle: Dim filename As String filename = & Text1.Text & dbdb.mdb If a = Text1.Text Then MsgBox 备份目录与原文件目录相同 ,请重新选择 ! Exit Sub End If If Dir( & b & dbdb.mdb) Then Text1.Text = Dir1.Path + Else Text1.Text = Dir1.Path End If Command1.Enabled = True End Sub Private Sub Dir1_Click() If Right(Dir1.Path, 1) true rst.Open sqlEdit, gCnn, adOpenStatic, adLockBatchOptimistic If Not rst.EOF Then txtUserName(0) = rst.Fields(1) txtUserName(1) = rst.Fields(2) txtUserName(2) = rst.Fields!cendcode dtpwdate(0).Value = rst.Fields(4) End If ntsbuttontime = False End Sub Private Sub Form_Unload(Cancel As Integer) MDIme.loadData (txtUserName(0) Cancel = 0 End Sub Private Sub nextuser_Click() Dim rst As New ADODB.Recordset Dim sqlEdit As String sqlEdit = select * from panelinfo sqlEdit = sqlEdit & where holderidtrue rst.Open sqlEdit, gCnn, adOpenStatic, adLockBatchOptimistic If buttontime = False Then If Not rst.EOF Then txtUserName(0) = rst.Fields(1) txtUserName(1) = rst.Fields(2) txtUserName(2) = rst.Fields!cendcode dtpwdate(0).Value = rst.Fields(4) buttontime = True End If Else rst.MoveNext If Not rst.EOF Then txtUserName(0) = rst.Fields(1) txtUserName(1) = rst.Fields(2) txtUserName(2) = rst.Fields!cendcode dtpwdate(0).Value = rst.Fields(4) buttontime = True End If End If End Sub Private Sub txtUserName_KeyPress(Index As Integer, KeyAscii As Integer) If Index = 9 Then nts If KeyAscii 46 And KeyAscii 57 Then KeyAscii = 0 End If End Sub 6. 数据导入界面设计 : 数据导入代码设计 : Private Sub Command1_Click() On Error GoTo errhandle: Dim a As String a = App.Path a = a & b = Text1.Text Dim filename As String If Dir( & a & 计费系统数据库 .mdb) Then Text1.Text = Dir1.Path + Else Text1.Text = Dir1.Path End If File1.Path = Dir1.Path End Sub Private Sub Drive1_Change() If Drive1.Drive = a: Then MsgBox 不能从 A 盘导入 Exit Sub End If Dir1.Path = Drive1.Drive End Sub Private Sub File1_Click() Text1.Text = Text1.Text + File1.filename Command1.Enabled = True End Sub Private Sub Form_Activate() gCnn.Close Command1.Enabled = False Text1.Text = c: Text1.Text = CurDir() ntsText1.Enabled = 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 gCnn.State = 0 Then gCnn.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= & DbPassword & ;Data Source= & _ App.Path & datadbdb.mdb;Persist Security Info=False gCnn.CursorLocation = adUseClient gCnn.Open End If MDIme.loadAdd End Sub 7. 数据删除界面设计 : nts 数据删除代码设计 : Private Sub cmdAsure_Click() If MsgBox( 你确定要删除该数据吗 ? , vbInformation + vbYesNo) 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 & datadbdb.mdb;Persist Security Info=False cnn.CursorLocation = adUseClient cnn.Open sqlAdd = update panelinfo set delflag=true sqlAdd = sqlAdd & where holderid= & Trim(MDIme.dcvalue.BoundText) & nts cnn.Execute sqlAdd cnn.Close MsgBox 数据删除完成! , vbInformation End If End Sub Private Sub Command1_Click() For i = 0 To 10 If i 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) = rst.Fields(5) txtUserName(4) = Format(rst.Fields(6), #0.00) txtUserName(5) = Format(rst.Fields(7), #0.00) txtUserName(6) = rst.Fields(8) txtUserName(7) = rst.Fields(9) txtUserName(8) = rst.Fields(10) txtUserName(9) = rst.Fields!cendcode changeE = rst.Fields!cendcode cEcount = rst.Fields!nowecount If rst.Fields(14) Then Dim cnn As New ADODB.Connection nts Dim sqlAdd As String cnn.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= & DbPassword & ;Data Source= & _ App.Path & datadbdb.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 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) 0 Then dcob 用途 .Text = rstJB.Fields(1) Me.txtUserName(5) = Format(rstJB.Fields(2), #0.00) End If ntsrst.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) = 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 0 Then rusrType.Open select * from 用户类型 where AtypeID= & rstFeeEnd.Fields!AtypeID, gCnn, adOpenStatic, adLockBatchOptimistic If rusrType.RecordCount 8 And KeyAscii 57 Then KeyAscii = 0 End Sub Private Sub txtM_KeyPress(KeyAscii As Integer) If KeyAscii 46 And KeyAscii 57 Then KeyAscii = 0 End Sub Private Sub txtznj_KeyPress(KeyAscii As Integer) If KeyAscii 46 And KeyAscii 57 Then KeyAscii = 0 End Sub 10:数据查询界面设计 : nts 数据查询代码设计 : Private Sub cmdExport_Click() 导出网格数据到 EXCEL 中 Export rsdg, Me.dgexp, 数据查询 , 日期 : & Format(Now, yyyy-mm-dd), 总电量 : & txtCountA & 度 总金额: & txtCount & 元 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 ADODB.Recordset 拼 Where 语句 whrStr = getWhrStr() 取得网格的数据 Sqlstr = select * from feels & whrStr & MsgBox Sqlstr If rsdg.State = 1 Then rsdg.Close End If rsdg.Open Sqlstr, gCnn, adOpenStatic, adLockOptimistic Debug.Print Sqlstr Set rsdg = getQueryData(Sqlstr) ntsSet dgexp.DataSource = rsdg Sqlstr = select sum(feeMoney),sum(Ecount) from feels & whrStr & If rstRg.State = 1 Then rstRg.Close End If rstRg.Open Sqlstr, gCnn, adOpenStatic, adLockBatchOptimistic txtCount = Format(rstRg.Fields(0), #0.00) & txtCountA = rstRg.Fields(1) & rstRg.Close MsgBox 数据查询完成 ,共 & rsdg.RecordCount & 条纪录! , vbInformation End Sub Private Function getWhrStr() As String 功能描述:拼凑 Where 语句 返回串值 Dim whrStr As String 拼 Where 语句 whrStr = where 1 = 1 If Trim(Me.txtID) Then whrStr = whrStr + and holder like % & txtUser & % End If If Trim(Me.txtMoney) = & Me.txtMoney & End If whrStr = whrStr + and Feedate= # & Me.dtpS & # and Feedate Then whrStr = whrStr & and holderid = & Trim(Me.txtID) & End If If Trim(Me.txtUser) Then whrStr = whrStr + and cFe
- 温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。