您好,欢迎来到小侦探旅游网。
搜索
您的当前位置:首页电费管理系统—毕业设计论文

电费管理系统—毕业设计论文

来源:小侦探旅游网
电费管理系统

学校:___________________

姓名:___________________

学号:___________________

同组人员:_______________

指导老师:_______________

二○○ 年五月

目录

摘 要 ..................................................... 3 引 言 ................................................. 3 第一章、系统简介 .................................................. 4 第二章、管理信息系统概述 .......................................... 4 、管理信息系统现状 ................................................ 4 管理信息系统开发方法 .............................................. 5 第三章、开发平台和工具 ............................................ 7 开发平台的选择 .................................................... 7 开发工具的选择 .................................................... 7 开发语言介绍 ...................................................... 8 第四章、需求分析 ................................................. 11 需求分析 ......................................................... 11 、可行性分析 ..................................................... 11 第五章、系统总体设计 ............................................. 12 系统功能描述 ..................................................... 12 功能模块划分 ..................................................... 13 第六章、数据库设计 ............................................... 13 第七章、系统详细设计 ............................................. 15 设计登录窗体 ..................................................... 15 、设计主界面 ..................................................... 18 7.3 电费管理窗口设计 ............................................. 27 用户抄表窗口的设计 ............................................... 30 用户信息窗体的设计 ............................................... 33 、数据查询窗体设计 ............................................... 37 致 谢 ........................................................... 40 参考文献 ......................................................... 40

摘 要

用电收费管理系统是单机版的应用系统,主要用于记录家庭用电情况并在此基础上进行超支电费收取。本系统包括档案管理、通知发布、抄表系统、查询系统、报表系统、交费系统、维护系统和辅助功能共八个分系统。

本系统有一定安全性和完整性,界面美观,操作方便;可提高工作效率;能及时、准确地反映用电情况;信息收集、处理、存储、打印方便;收费程序更加规范;系统可维护性强、管理集中。并提供在线帮助信息。 本系统的研究开发成功,可使居民用电收费摆脱每次手工书写统计的问题,实现管理计算机化;使用者通过鼠标、键盘的简单操作就能实现完整的功能;提高工作效率,节省人力资源。 传统的电费管理都是由工作人员手工查表,抄表完成的,其中要完成用户电费的收取,每月抄度,用户购电情况查询,以及列出欠费用户的信息名单,之类的信息.其工作强度大,工作流程繁琐,由于工作人员的不细心,将会造成电费收支的出错也是经常发生的.鉴于以上原因我们有必要开发一种帮作电费管理人员的软件系统,可以完成检查用户用电情况,每月抄度,信息录入以及基本数据维护的各项功能.本系统采用visual basic 6.0与微软Access数据库方式.界面尽量做到人性化,数据维护方面做到可靠安全.

关 键 词: 用电收费管理系统 管理信息系统 ACCESS数据库管理系统

引 言

居民的用电管理问题,一直是摆在管理者面前的一道难题,传统的以手工操作为主的用电管理方式,信息反馈慢,工作效率低,管理质量差。在计算机信息技术飞速发展与广泛应用的今天,这种落后的管理方式与时代的步伐已显得格格不入,对学生宿舍用电实行智能化、信息化管理,是信息时代对居民公寓管理工作提出的客观要求。

我国目前的居民区,是按房间安装了电度表,对房屋用电实行定额管理。供电局按照规定给每居民拨用电定额。由于没有安装“用电收费管理系统”等类似的相关系统软件,在用电管理过程中,每抄一次表就需要花很长的时间,同时还有大量的数据和信息需要处理,既费工又费力,还容易出错。如何使数据与信息在用电管理系统的相关模块间流动起来,为居民用电管理提供科学的管理方法,使管理更严谨,同时更具有操作性,节省操作人员的劳动,成为我们学校用电收费管理人员的当务之急。

居民用电收费管理系统设计内容:本系统是单机版的应用系统。本系统设计具有以下功能:(1)用户管理(2)电费抄表登记(3)电费收缴(正常、超支、停电)(4)报表统计打印(5)用户用电查询(6)系统维护等。

传统的电费管理都是由工作人员手工查表,抄表完成的,其中要完成用户电费的收取,每月抄度,用户购电情况查询,以及列出欠费用户的信息名单,之类的信息.其工作强度大,工作流程繁琐,由于工作人员的不细心,将会造成电费收支的出错也是经常发生的.鉴于以上原因我们有必要开发一种帮作电费管理人员的软件系统,可以完成检查用户用电情况,每月抄度,信息录入以及基本数据维护的各项功能.本系统采用visual basic 6.0与微软Access数据库方式.界面尽量做到人性化,数据维护方面做到可靠安全.

第一章、系统简介

本系统主要由以下几大功能模块组成: 一.用户交费:(交纳电费,本日小节) 二.本月抄度:(单户抄度 多户抄度) 三.资料导出 (全部清单,欠费清单)

四.数据查询 (电费查询与统计,用户欠费查询) 五.信息录入 (资料录入,资料修改, 资料删除) 六.系统数据维护 (数据备份,数据恢复)

七.基本数据维护 (用户类型维护, 操作员维护)

第二章、管理信息系统概述

2.1、管理信息系统现状

管理信息系统(MIS)是一门边缘学科,集管理科学、信息科学、系统科学、现代通信技术和电子计算机技术于一体。1985年,管理信息系统创始人,明尼苏达大学卡尔森管理学院的著名教授戴维斯(Gordon.B.Davis)给出了一个具有代表性的定义:“管理信息系统是一个利用计算机硬件和软件,手工作业、分析、计划、控制和决策模型以及数据库的用户-机器系统。它能提供信息支持企业或组织的运行、管理和决策功能。”

随着网络技术的出现,管理信息系统又有了新的含义,基于网络的管理信息系统不断出现,管理信息系统的概念模型也发生了相应的变化,许多学者对管理信息系统给出了新的定义。例如劳顿认为:“管理信息系统是一个基于计算机的信息系统,它通过收集、处理、存储和扩散信息,来支持组织的管理、决策、合作、控制、分析活动,并使之可视化。”

因此,我们可以看出,管理信息系统具有几个基本含义:

(1)管理信息系统不是一个单纯的软件系统,而是一个人-机系统,由人和机器协同工作。管理信息系统在支持企业或组织的各项管理活动中,管理人员负责将基础数据及时地输入到计算机中,计算机则根据企业或组织中的各层管理人员的要求对基础数据进行加工处理,并将所得到的信息输出。计算机不断地与最终用户进行着信息的交换,但在对数据的加工处理过程中又需要人的适当干预。

(2)管理信息系统的管理过程就是对数据进行惧、存储、加工处理、传递,并产生信息的过程,因此数据是管理信息系统的灵魂。管理信息系统运用了数据库的技术,对基础数

据进行统一规划、存储,供各层管理人员使用,从而实现了数据的一致和共享。

(3)管理信息系统可以解决企业或组织所面临的问题。例如,管理信息系统可以处理企业生产经营活动的全过程,可以解决组织中数据处理效率问题,也可以解决财务管理决策过程等。

管理信息系统应具有如下几个功能。 (1)数据处理功能:

数据处理是管理信息系统最基本的功能,它包括对各种类型数据的收集、加工处理、传递、存储等工作。

(2)实测功能:

通过对数据的加工处理,可以随时了解各部门的实际运行情况,如各生产车间今天生产的产品数量、销售部接受的订单等。

(3)预测功能:

通过运用一定的数学方法和预测模型,对过去的数据进行分析,就可能对未来可能发生的情况进行预测,为高级管理人员进行管理决策提供依据。

(4)控制功能:

通过信息的反馈可以对整个企业生产经营的各个部门、各个环节的运行情况进行监测、协调、控制,保证系统的正常运行。

(5)辅助决策功能:

通过对数据的加工处理,可以快速地获取对决策有影响的信息,从而为合理的配置企业的各项资源,做出最佳的决策提供科学的依据。

目前,管理信息系统的应用已经非常广泛,随着计算机技术、网络技术和通信技术的发展,管理信息系统的功能也日趋完善,并朝着智能化、网络化、集成化等方向发展。如办公自动化(OA)、电子商务(EC)、专家系统(ES)、计算机集成制造系统(CIMS)。

目前,常用的管理信息系统的开发方法有生命周期法、原型法和面向对象的开发方法。 下面仅对原型法和面向对象的开发方法进行简单的描述。 (1)原型法:

原型法(Prototyping Method)是20世纪80年代发展起来的,旨在改变生命周期法的缺点的一种系统开发方法。

①原型法的基本思想

首选根据用户的要求,由用户和开发者共同确定系统的基本要求和主要功能,利用系统快速生成工具,建立一个系统模型。再在此基础上与用户交流,将模型不断补充,修改完善,如此反复,最终直至用户和开发者都比较满意为止,就形成了一个相对稳定、较为理想的管理信息系统。

②原型法的开发过程

采用原型法开发管理信息系统可以分为如下几个阶段:

A、确定用户的基本需求。由用户提出对新系统的基本要求,如功能、基本界面形式、所需的数据、应用范围、运行环境等,开发者根据这些信息估算出开发该系统所需的费用,并建立简明的系统模型。

B、开发初步的原型系统。系统开发人员根据用户的要求建立原型系统,但该系统只是一个初步的、不成熟的系统,从系统的工作效率上看也是不完善的。其主要目的是为了描述开发者所理解的用户的基本需求。

C、修改、评价原型系统。将建造好的原型系统交给用户,并投入试运行,用户将使用过程中发现的问题一一记录下来,并与开发人员进行交流。开发人员针对这些问题不断地对系统进行修改、扩充与完善,直至用户满意为止。

D、形成最终的管理信息。对用户满意的原型系统进行进一步的开发,不断补充、完善,最终形成一个适用的管理信息系统。

③原型法的优缺点

原型法的优点是开发周期短,费用较少,同时可以较有效地避免因开发者和用户的认识隔阂所产生的失败,其缺点是系统的开发缺乏统一的规划和开发标准,难以对系统的开发过程加以控制。

原型法一般适用于开发规模不大、不太复杂或需求经常发生变化的系统。 (2)面向对象的开发方法

面向对象(Object Oriented)的技术于20世纪80年兴起,随后广泛地应用于计算机技术的几乎所有领域。面向对象的技术中最重要的概念是对象。

面向对象是基于问题对象的自底向上的一种系统开发方法。在开发过程中,分析和设计阶段独立于程序设计语言,信息系统模型设计好后,最终用具体的程序设计语言、数据库或

硬件来实现。面向对象法最主要的特点是对对象为基础,对象是分析问题和解决问题的核心。

①面向对象法的开发过程

面向对象法的开发过程一般分为四个阶段:

A、认识客观世界(如一个企业)中的对象以及行为,分别独立设计各个对象的实体。 B、分析对象之间的联系和相互之间所传递的信息,由此构造客观世界(企业)所对应的信息管理系统的模型。

C、由信息系统的模型转换成计算机软件系统的模型。 D、由计算机软件系统的模型再转化成一个现实系统。 ②面向对象法的优缺点:

面向对象法的优点是便于帮助分析者、设计者和用户清楚地表达抽象概念,互相进行交流;交流特定的软件工具模块,直接地完成了从对象的描述到软件体系结构之间的转换,避免了其它的方法在开发过程的客观世界描述和软件结构不一致性和复杂性问题,便于系统开发简单、统一,开发周期短,费用低。

面向对象法的主要缺点与原型法一样,因此这种方法也不适用于开发大的、复杂的系统。 本系统在开发过程中具体是采用了原型法和面向对象两种方法相结合的开发思路,力求在开发过程中尽量吸收这两种方法的长处,而克服它们的短处。

第三章、开发平台和工具

考虑到本系统的性能要求,和现有的条件,我们选择了WINDOWS2000中文版作为开发、测试和运行的平台。因为WINDOWS操作系统是目前应用最广的操作系统,它以全新的图形界面,简单快捷的操作方式,支持多媒体功能等特点而成为软件发展的流行趋势,选用它作为开发平台,易于功能的扩展和软件升级。

针对目前世界上流行的大量软件和开发工具,经过认真分析其优缺点,结合计量器具管理系统的需要和目前的硬件环境,我们选用微软WINDOWS平台下的Visual B asic (简写

为VB)作为软件开发工具。

开发语言介绍

现在,市场上可以选购的应用开发产品很多,流行的也有数十种。目前在我国市场上最为流行、使用最多、最为先进的可用作做作企业级开发工具的产品有:

Microsoft公司的Visual Basic Microsoft公司的Visual C Borland公司的Delphi Powersoft公司的PowerBulider Java等等

在目前市场上这些众多的程序开发工具中,有些强调程语言的弹性与执行效率;有些则偏重于可视化程序开发工具所带来的便利性与效率的得高,各有各的优点和特色,也满足了不同用户的需求。然而,语言的弹性和工具的便利性是密不可分的,只有便利的工具,却没有弹性的语言作支持,许多特殊化的处理动作必需要耗费数倍的工夫来处理,使得原来所标榜的效率提高的优点失去了作用;相反,如果只强调程语言的弹性,却没有便利的工具作配合,会使一些即使非常简单的界面处理动作,也会严重地浪费程序设计师的宝贵时间。

作为数据库系统的开发,Visual Basic是一个非常理想选择。数据库是MIS中的重要支持技术,在MIS开发过程中,如何选择数据库管理是一个重要的问题,目前,数据库产品较多,每种产品都具有各自的特点和适用范围,因此,在选择数据库时,应考虑数据库应用的特点及适用范围,本系统选用的数据库语言Visual Basic语言,该开发工具具有很多长处:

Visual Basic是一种可视化的、面对对象和条用事件驱动方式的结构化高级程序设计,可用于开发Windows环境下的种类应用程序。它简单易学、效率高,且功能强大,可以与Windows的专业开发工具SDK相媲美,而且程序开发人员不必具有C/C++编程基础。在Visual Basic环境下,利用事件驱动的编程机制、新颖易用的可视化设计工具,使用Windows内部的应用程序接口(API)函数,以及动态链接库(DLL)、动态数据交换(DDE)、对象的链接与嵌入(OLE)、开放式数据访问(ODBC)等技术,可以高效、快速地开发出Windows环境下功能强大、图形界面丰富的应用软件系统。

总的来说,Visual Basic具有以下特点:

可视化编程:

用传统程序设计语言设计程序时,都是通过编写程序代码来设计用户界面,在设计过程中看不到界面的实际显示效果,必须编译后运行程序才能观察。如果对界面的效果不满意,还要回到程序中修改。有时候,这种编程-编译-修改的操作可能要反复多次,大大影响了软件开发效率。Visual Basic提供了可视化设计工具,把Windows界面设计的复杂性“封装”起来,开发人员不必为界面设计而编写大量程序代码。只需要按设计要求的屏幕布局,用系统提供的工具,在屏幕上画出各种“部件”,即图形对象,并设置这些图形对象的属性。Visual Basic自动产生界面设计代码,程序设计人员只需要编写实现程序功能的那部分代码,从而可以大大提高程序设计的效率。

面向对象的程序设计

4.0版以后的Visual Basic支持面向对象的程序设计,但它与一般的面向对象的程序设计语言(C++)不完全相同。在一般的面向对象程序设计语言中,对象由程序代码和数据组成,是抽象的概念;而Visual Basic则是应用面向对象的程序设计方法(OOP),把程序和数据封装起来作为一个对象,并为每个对象赋予应有的属性,使对象成为实在的东西。在设计对象时,不必编写建立和描述每个对象的程序代码,而是用工具画在界面上,Visual Basic自动生成对象的程序代码并封装起来。每个对象以图形方式显示在界面上,都是可视的。

结构化程序设计语言

Visual Basic是在BASIC语言的基础上发展起来的,具有高级程序设计语言的语句结构,接近于自然语言和人类的逻辑思维方式。Visual Basic语句简单易懂,其编辑器支持彩色代码,可自动进行语法错误检查,同时具有功能强大且使用灵活的调试器和编译器。

Visual Basic是解释型语言,在输入代码的同时,解释系统将高级语言分解翻译成计算机可以识别的机器指令,并判断每个语句的语法错误。在设计Visual Basic程序的过程中,随时可以运行程序,而在整个程序设计好之后,可以编译生成可执行文件(.EXE),脱离Visual Basic环境,直接在Windows环境下运行。

事件驱动编程机制

Visual Basic通过事件来执行对象的操作。一个对象可能会产生多个事件,每个事件都可以通过一段程序来响应。例如,命令按钮是一个对象,当用户单击该按钮时,将产生一个“单击”(CLICK)事件,而在产生该事件时将执行一段程序,用来实现指定的操作。

在用Visual Basic设计大型应用软件时,不必建立具有明显开始和结束的程序,而是编写若干个微小的子程序,即过程。这些过程分别面向不同的对象,由用户操作引发某个事

件来驱动完成某种特定的功能,或者由事件驱动程序调用通用过程来执行指定的操作,这样可以方便编程人员,提高效率。

访问数据库

Visual Basic具有强大的数据库管理功能,利用数据控件和数据库管理窗口,可以直接建立或处理Microsoft Access格式的数据库,并提供了强大的数据存储和检索功能。同时,Visual Basic还能直接编辑和访问其他外部数据库,如dBASE,FoxPro,Paradox等,这些数据库格式都可以用Visual Basic编辑和处理。

Visual Basic提供开放式数据连接,即ODBC功能,可通过直接访问或建立连接的方式使用并操作后台大型网络数据库,如SQL Server,Oracle等。在应用程序中,可以使用结构化查询语言SQL数据标准,直接访问服务器上的数据库,并提供了简单的面向对象的库操作指令和多用户数据库访问的加锁机制和网络数据库的SQL的编程技术,为单机上运行的数据库提供了SQL网络接口,以便在分布式环境中快速而有效地实现客户/服务器(client/server)方案。

动态数据交换(DDE)

利用动态数据交换(Dynamic Data Exchange)技术,可以把一种应用程序中的数据动态地链接到另一种应用程序中,使两种完全不同的应用程序建立起一条动态数据链路。当原始数据变化时,可以自动更新链接的数据。Visual Basic提供了动态数据交换的编程技术,可以在应用程序中与其他Windows应用程序建立动态数据交换,在不同的应用程序之间进行通信。

对象的链接与嵌入(OLE)

对象的链接与嵌入(OLE)将每个应用程序都看作是一个对象(object),将不同的对象链接(link)起来,再嵌入(embed)某个应用程序中,从而可以得到具有声音、影像、图像、动画、文字等各种信息的集合式的文件。OLE技术是Microsoft公司对象技术的战略,它把多个应用程序合为一体,将每个应用程序看作是一个对象进行链接和嵌入,是一种应用程序一体化的技术。利用OLE技术,可以方便地建立复合式文档(compound document),这种文档由来自多个不同应用程序的对象组成,文档中的每个对象都与原来的应用程序相联系,并可执行与原来应用程序完全相同的操作。

动态链接库(DLL)

Visual Basic是一种高级程序设计语言,不具备低级语言的功能,对访问机器硬件的操作不太容易实现。但它可以通过动态链接库技术将C/C++或汇编语言编写的程序加入到

Visual Basic应用程序中,可以像调用内部函数一样调用其他语言编写的函数。此外,通过动态链接库,还可以调用Windows应用程序接口(API)函数,实现SDK所具有的功能

第四章、需求分析

系统规划,应根据组织的目标和发展战略以及管理信息系统建设的客观规律,并考虑到组织面临的内外部环境,科学地制定管理信息系统的发展战略和总体方案,合理安排系统建设的进程;它是管理信息系统(MIS)生命周期的第一个阶段,是MIS的概念形成时期,这一阶段的主要目标,就是制定出MIS的长期发展方案,决定MIS在整个生命周期内的发展方向、规模和发展进程。它的主要任务是:制定MIS的发展战略、确定组织的主要信息需求,形成MIS的总体方案、制定系统建设的资源分配计划。

以计算机为主要手段的管理信息系统是企业的管理系统的一个组成部分。它的建立应该服从企业的整体目标和管理决策活动的需要。为此,这个阶段的主要任务是了解企业的战略目标和内外部环境,确定系统的总目标和主要功能,拟定总体方案,并从技术、经济、社会条件等方面论证技术方案的可行性,制定投资规划和开发计划,编写可行性报告。

系统分析,就是在管理信息系统开发的生命周期中系统分析阶段的各项活动和方法。它的主要目标是在系统规划所定的某个开发项目范围内明确系统开发的目标和用户的信息需求,提出系统的逻辑方案。系统分析在整个系统开发过程中,是要解决“做什么”的问题,把要解决哪些问题、要满足用户哪些具体的信息需求调查、分析清楚,从逻辑上或从功能需求上提出系统的方案,即“逻辑模型”。本系统主要服务于电费管理人员的日常工作.设计思路主要参照工作人员抄表,记录资料,资料管理,信息录入等方面的工作流程展开的.

、可行性分析

可行性分析是系统分析阶段的第二项活动,可行性分析能使新系统达到,以最小的开发成本取得最佳的经济效益。可行性分析的目的,是根据开发管理信息系统的请求,通过初步调查,对要开发的管理信息系统从技术上、经济上、资源上和管理上进行是否可行的研究分析。这是一项保证资源合理使用、避免失误和浪费的重要工作。经济方面:本系统可以服务电厂,电费管理单位,为企业节省人力开支.

社会方面:服务于大众,方便抄表人员工作,可靠方便. 1、经济上的可行性。

2、技术上的可行性。 3、资源上的可行性。 4、管理上的可行性。

通过调查当前电费管理现况是采用人工登记的方式来进行企业设备事务的管理,所有的用户档案资料都是以纸张为介质进行存储的,这种管理方式存在着许多缺点,如:效率低、保密性差,另外时间一长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。因此有必要对电费管理方式进行改造,采用高科技的计算机自动化管理技术来进行企业设备事务的管理.而从以上四点进行分析,是可行的.

今天我们使用计算机对电费信息进行管理,具有手工管理所无法比拟的优点。例如:检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。这些优点能够极大地提高企业管理的效率。面对目前的实际状况,迫切需要开发一个新系统来适应这一些工作。

第五章、系统总体设计

本章将对电费管理系统进行总体设计,介绍系统的总体功能、模块划分和工作流程,形成系统认识,为进一步开发系统奠定基础。

电费管理系统的基本功能是对企事业单位的电费管理,本实列的主要功能如下: 1. 用户交费

 交纳电费  本日小结 2. 本月抄表

 单户抄表  多户抄表 3. 资料导出

 全部清单  欠费清单 4. 数据查询

 电费查询与统计  用户欠费查询 5. 信息录入

 资料录入  资料修改  资料删除 6. 系统数据维护

 数据备份  数据恢复

7. 基本数据维护

 用户类型维护  操作员维护

电费管理系统 用户交费 本月抄表 资料导出 数据查询 信信息息录录入入 系统数据维护 基本数据维护 第六章、数据库设计

创建数据库

在设计数据库表结构之前,首先要创建一个数据库。本系统使用的数据库为“dbdb.mdb” 保存在程序文件里

设计表结构

数据库包含以下9张表:Feels getpchard holder MaxID panelInfo 登录人员 记住密码 密码表 用户类型 Feels id FeeDate FeeMoney qianFee zhinajin holderid holder cname memols Ecount 1 2005-4-19 2 2005-4-19 3 2005-4-19 4 2005-4-19 5 2005-4-19 6 2005-4-19 7 2005-4-19 0 0001 0001 0001 0001 0001 0001 0001 dlj dlj dlj dlj dlj dlj dlj 1 1 1 1 1 1 1 100 -90 90 100 100 100 0 Feels id FeeDate FeeMoney qianFee zhinajin holderid holder cname memols Ecount 8 2005-4-19 9 2005-4-19 10 2006-9-25 11 2006-11-1 12 2006-11-1 0001 0001 0005 0005 0005 dlj dlj sss sss sss 1 1 1 1 1 0 0 200 0 0

getpchard pcid pccode

MaxID TableName MaxID panelid 5

panelInfo iholhoLEndCopylighlslMbMcnmemcEncFeenowEwritdelbenLeCBeCinopAtAtyderldPCodtScaFeononamotedCoMonecouneDatFlaqiFounounriimpeId Date iID er e le e ey ey e xt de y t e g ee t t d es D A 1 000dl1 j 200 2005-4-19 2 000ww2 w 0 2005-4-19 3 000dl3 j 0 2005-4-19 4 000ww 4 0 2005-4-1100 1 0 100 ¥ 1 0 100 1 0 0 100 1 300 0 2005Yes -4-19 0 0 0 0 6 0 Yes 0 0 0 0 6 0 Yes 0 0 0 0 6 0 Yes 0 0 0 0 6 panelInfo iholhoLEndCopylighlslMbMcnmemcEncFeenowEwritdelbenLeCBeCinopAtAtyderldPCodtScaFeononamotedCoMonecouneDatFlaqiFounounriimpeId Date iID er e le e ey ey e xt de y t e g ee t t d es D A 9 5 000ss5 s 100 2005-4-19 100 1 0 200 0 2005-4-19 No 0 0 0 0 6

密码表 姓名 操作权限 密码 1 2 管理员 ql 操作员 2 001 管理员 ql 密码表用来保存用户密码和操作权限

用户类型 ATypeID AType UNITPRICE Adate 6 民用 7 新名称 用户信息表用来保存系统用户信息

第七章、系统详细设计

用户要使用本系统,首先必须通过系统的身份认证,这个过程叫做登录。登录过程需要完成以下任务:

 根据用户名和密码来判断是否可能进入系统  根据用户类型决定用户拥有的权限 成功登录的用户将进入系统是主界面

登录窗体的名称为frmlogin,它的界面布局如图

登录窗体程序的运行过程如下:

 判断是否输入了用户名和密码,如果没有输入,则返回,要求用户输入  将输入的用户名和密码赋值到变量namekey和passwordkey中,便于处理

 调用myuser.in_db()函数,判断当前用户名是否存在。如果不在,则返回,要求用户

重新输入,同时将计数变量Try_times加1

 如果用户名存在,则调用myuser.getinfo()函数,读取此用户的数据,并将用户密码

与输入的密码进行比较。如果密码不同,则返回,要求用户重新输入,同时将计数变量Try_times加1

 如果try_times大于或等于3,则退出系统

 如果通过密码验证,则将当前用户的信息保存到curuser对象中,以便后面使用  关闭登录窗体 实现部分代码如下:

Private Sub Command1_Click()

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.Fields(0) = reHard

rstpchard.UpdateBatch adAffectCurrent Else

If Trim(reHard) <> Trim(rstpchard.Fields(0)) Then

MsgBox \" 对不起,使用不合法请与开发者联系! \ End End If End If

If Check1.Value = 1 Then

rec.Open \"select * from 记住密码\rec(\"标记\") = \"1\"

If Combo2.Text <> \"\" Then

Else

rec(\"姓名\") = \"\" End If

If Combo1.Text <> \"\" Then rec(\"权限\" Else

rec(\"权限\") = \"\" End If

If Text2.Text <> \"\" Then Else

rec(\"密码\") = \"\" End If Else

rec.Open \"select * from 记住密码\rec(\"标记\") = \"0\"

End If

rec1.Open \"select * from 登录人员\

rec.Open \"select * from 密码表 where 姓名='\" & Combo2.Text & \"'and 操作权限='\" & Combo1.Text & \"'and 密码='\" & Text2.Text & \"'\If rec.EOF = False Then

If rec(\"操作权限\") <> \"管理员\" Then ' FRMMAIN.XZCK.Enabled = False MDIme.mczy.Enabled = False MDIme.xtwh.Enabled = False MDIme.del.Enabled = False

' FRMMAIN.DJGL.Enabled = False ' FRMMAIN.delte.Enabled = False Else

' Me.XZCK.Enabled = True

MDIme.mczy.Enabled = True MDIme.xtwh.Enabled = True

CreateNewKey HKEY_CURRENT_USER, \"ZhiYuanTechnologe\"

SetKeyValue HKEY_CURRENT_USER, \"ZhiYuanTechnologe\REG_SZ

SetKeyValue HKEY_CURRENT_USER, \"ZhiYuanTechnologe\REG_SZ

' FRMMAIN.DJGL.Enabled = True ' FRMMAIN.delte.Enabled = True End If Else

MsgBox \"权限或密码不正确,请重试!\End If

End Sub

Private Sub Command11_Click()

End Sub

Private Sub Command2_Click() Combo2.Text = \"\" Text2.Text = \"\" Combo1.Text = \"\" End Sub

7.2、设计主界面

主窗体是工程的启动对象,可以在系统菜单中选择“工具/属性“,打开属性窗口设置启动对象。

打开主窗体的设计窗口,选择“工具“菜单项中的”菜单编辑器“,对菜单内容进行编辑,菜单设计器如图

本系统的主界面如图:

在主窗体MDIMain中添加如下代码:

Private Sub alllm_Click()

frmList.qfFlg = False

End Sub

Private Sub backup_Click()

End Sub

Private Sub benrixiaojie_Click()

End Sub

Private Sub Command1_Click() frameFee.Visible = False End Sub

Private Sub cmdQuery_Click()

rst.Open \" select * from panelinfo where holder='\" & Me.txtUser & \"' and delflag<>true \

If rst.RecordCount <> 0 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!lsFee, \"###0.00\") 'txtUserName(5) = txtUserName(1) * rst.Fields!lMoney * (rst.Fields!lightScale / 100) + txtUserName(1) * txtUserName(4) * (1 - rst.Fields!lightScale / 100)

txtUserName(5) = Format(txtUserName(1) * rst.Fields!lMoney * (rst.Fields!lightScale / 100) + rst.Fields!nowecount * rst.Fields!bmoney * (1 - rst.Fields!lightScale / 100), \"###0.00\")

txtUserName(8) = rst.Fields(9)

txtUserName(7) = Format(Val(txtUserName(5)) + Val(txtUserName(6)), \"####0.00\")

dcNum.Text = rst.Fields(1) Else

MsgBox \" 没有查询到数据! \

End If

Set rst = Nothing End Sub

Private Sub dcNum_Click(Area As Integer)

rst.Open \" select * from panelinfo where holderid='\" & dcNum.Text & \"'and delflag<>true \

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

End Sub

Private Sub dcvalue_Click(Area As Integer)

rst.Open \" select * from panelinfo where holderid='\" & dcvalue.BoundText & \"' and delflag<>true \

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!lsFee, \"###0.00\") 'txtUserName(5) = txtUserName(1) * rst.Fields!lMoney * (rst.Fields!lightScale / 100) + txtUserName(1) * txtUserName(4) * (1 - rst.Fields!lightScale / 100)

txtUserName(5) = Format(txtUserName(1) * rst.Fields!lMoney * (rst.Fields!lightScale / 100) + rst.Fields!nowecount * rst.Fields!bmoney * (1 - rst.Fields!lightScale / 100), \"###0.00\")

txtUserName(8) = rst.Fields(9)

txtUserName(7) = Format(Val(txtUserName(5)) \"####0.00\")

dcNum.Text = rst.Fields(1) End If

Set rst = Nothing End Sub

Private Sub dcvalue_KeyPress(KeyAscii As Integer) KeyAscii = 0 End Sub

Private Sub del_Click()

End Sub

Private Sub dhcb_Click()

End Sub

Private Sub dhcp_Click()

End Sub

Private Sub duohu_Click() frmCuifei.muser1 = 2

End Sub

Private Sub edit_Click()

End Sub

Private Sub exit_Click() End

+ Val(txtUserName(6)), End Sub

Private Sub insert_Click() frmInsert.Show 1 End Sub

Private Sub jiaonadianfei_Click()

End Sub

Private Sub M_USERYTPE_Click() FRMUSERTYPE.Show 1 End Sub

Private Sub MDIForm_Load()

loadAdd End Sub

Public Sub loadAdd() If rst.State = 1 Then

End If

rst.Open \" select * from panelinfo where delflag<>true \adLockBatchOptimistic

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 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

If Trim(Hid) <> \"\" Then

rst.Open \" select * from panelinfo where holderid='\" & Hid & \"' and delflag<>true \ 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 End Sub

Private Sub MDIForm_Unload(Cancel As Integer)

Set gcon = Nothing End Sub

Private Sub mgcf_Click()

End Sub

Private Sub mhf_Click()

End Sub

Private Sub msf_Click()

End Sub

Private Sub qianfeilm_Click() frmList.qfFlg = True

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Trim(Button.Key)

Case \"a\"

frmFee.Show 1 Case \"b\"

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(\"真的要退出吗?\警告\") If X = vbYes Then End Else End If End Select End Sub

Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)

Case \"dhcb1\"

Case \"dhcb2\"

End Select End Sub

Private Sub weihu_Click()

End Sub

Private Sub yihu_Click() frmCuifei.muser1 = 1

End Sub

7.3 电费管理窗口设计

在这个功能中可以对应收电费,实收现金,滞纳金,等进行填写,然后保存到程序中 实现部分代码如下:

Private Sub CmdPrint_Click() On Error GoTo l

Dim LongColor As Long

If MsgBox(\"打印机准备好了吗?\ Exit Sub End If

Me.CmdPrint.Visible = False LongColor = M

Me.BackColor = vbWhite

txtPrint.BackColor = vbWhite

Me.BackColor = LongColor Me.CmdPrint.Visible = True Exit Sub

End Sub

Private Sub Command1_Click()

Dim reMoney As String Dim sqlString As String

If Trim(txtFee) = \"\" Or Trim(txtM) = \"\" Then

MsgBox \" 请先输入数据! \ 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.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

(0) & \"' and delflag<>true \

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

Else

MsgBox \" 用户类型不能为空! \

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

sqlString = \"insert into feels (holderid,holder,feemoney,qianfee,feedate,zhinajin,memols,cname,Ecount)

values('\" & MDIme.txtUserName(0) & \"','\" & MDIme.dcvalue.Text & \"',\" & Val(txtFee.Text) & \& Val(txtznj) & \& txtPrint & \"','\" & Guser & \"',\" & MDIme.txtUserName(1) & \")\" onnection = gCnn

cmdExe.CommandText = sqlString

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

用户抄表窗口的设计

用户抄表窗体名称为frmcopyp,窗体界面如下:

用户抄表功能可以对用户编号,用户姓名,上次至码,抄表日期,当前至码,抄录日期等进行编辑修改,用户抄表是比较重要的功能之一 实现代码:

Dim buttontime As Boolean Private Sub Command1_Click()

Unload Me

End Sub

Private Sub Command2_Click()

Dim

Dim nowEv As Double Dim sqlAdd As String

If Trim(txtUserName(0).Text) = \"\" Then

MsgBox \" 没有要抄表用户,请先添加用户! \ Exit Sub End If

If Trim(txtUserName(9).Text) = \"\" Then

MsgBox \" 请先输入数据! \ Exit Sub End If

If Trim(txtUserName(9).Text) < Trim(txtUserName(2).Text) Then MsgBox \" 输入数据错误,当前止码太小! \ Exit Sub End If

nString = \"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

cmdExe.ActiveConnection = cnn

rstE.Open \"select nowecount from panelinfo where holderID= '\" & Trim(txtUserName(0)) & \"'\

nowEv = Val(rstE.Fields(0).Value) + (Val(txtUserName(9)) - Val(txtUserName(2)))

sqlAdd = \"update panelinfo set LEndPCode=\" & Val(txtUserName(2).Text) & \& dtpwdate(1) & \"# where holderID= '\" & Trim(txtUserName(0)) & \"'\" cmdExe.CommandText = sqlAdd cmdExe.Execute sqlAdd ' cnn.Execute sqlAdd

txtUserName(2).Text = txtUserName(9) txtUserName(9) = \"\"

MsgBox \" 数据保存完成! \ Unload Me End Sub

Private Sub Form_Load()

Dim sqlEdit As String

dtpwdate(1).Value = Format(Now, \"yyyy-mm-dd\") sqlEdit = \"select * from panelinfo \"

sqlEdit = sqlEdit & \" where holderid='\" & Trim(MDIme.txtUserName(0)) & \"'and delflag<>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

buttontime = False End Sub

Private Sub Form_Unload(Cancel As Integer)

MDIme.loadData (txtUserName(0)) Cancel = 0 End Sub

Private Sub nextuser_Click()

Dim sqlEdit As String

sqlEdit = \"select * from panelinfo \"

sqlEdit = sqlEdit & \" where holderid<>'\" & Trim(txtUserName(0)) & \"'and delflag<>true \"

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

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

If KeyAscii <> 8 And KeyAscii <> 46 And KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 End If End Sub

用户信息窗体的设计

添加用户信息窗体名称为frminsert,界面如下

添加用户信息的功能是对用户编号,姓名,类型,抄表日期,上次交费,电价,抄表人员,备注,电表倍数等等进行添加 实现代码:

Private Sub cmdAsure_Click()

Dim reD As Double Dim sqlAdd As String Dim reStr As String Dim rstR As New AD

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

reStr = dataCheck If reStr <> \"OK\" Then

MsgBox reStr, vbInformation Exit Sub End If

rstR.Open \"select * from panelinfo where holder='\" & Trim(txtUserName(1).Text) & \"'\ If rstR.RecordCount <> 0 Then

txtUserName(1).Text = txtUserName(1).Text & \" \" End If

reD = gGetMaxKey(\"panelid\")

sqlAdd = \"insert into panelinfo(holderid,holder,LEndPCode,CopyDate,lightscale,lsfee,lmoney,bmoney,cname,memotext,inia,Atimes,AtypeID) values ('\" & txtUserName(0) & \"','\" &

txtUserName(1) & \"',\" & Val(txtUserName(2)) & \Val(txtUserName(3)) & \& Val(txtUserName(6)) & \Val(txtUserName(2)) & \用途.BoundText) & \")\"

cnn.Execute sqlAdd

MsgBox \" 数据添加完成! \ disMax

txtUserName(3).Text = 100

For i = 1 To 8

If i <> 5 And i <> 6 And i <> 3 And i <> 7 Then txtUserName(i) = \"\" End If Next End Sub

Public Function dataCheck() As String If Trim(txtUserName(1)) = \"\" Then

dataCheck = \" 对不起,用户名称不允许为空! \" Exit Function End If

dataCheck = \"OK\" End Function

Private Sub Command1_Click() Unload Me

End Sub

Private Sub dcob用途_Click(Area As Integer) On Error GoTo l

If dcob用途.BoundText <> \"\" Then

rst.Open \"select * from 用户类型 where ATypeID=\" & dcob用途.BoundText & \"\gCnn, adOpenStatic, adLockBatchOptimistic

Me.txtUserName(5) = Format(rst.Fields(2), \"###0.00\") Else

MsgBox \" 请先添加用户电表类型信息! \ Exit Sub End If Exit Sub

End Sub

Private Sub Form_Load() txtUserName(3).Text = 100 txtUserName(7).Text = Guser

dtpwdate.Value = Format(Now, \"yyyy-MM-dd\")

Set rstJB.ActiveConnection = gCnn rstJB.CursorLocation = adUseClient rstJB.LockType = adLockBatchOptimistic rstJB.CursorType = adOpenKeyset

rstJB.Open \"select * from 用户类型\" Set dcob用途.DataSource = rstJB Set dcob用途.RowSource = rstJB dcob用途.BoundColumn = \"ATYPEID\" dcob用途.ListField = \"ATYPE\" If rstJB.RecordCount <> 0 Then

dcob用途.Text = rstJB.Fields(1) & \"\" ds(2), \"###0.00\") End If disMax End Sub

Private Sub disMax()

rst.Open \" select * from maxid where tablename ='panelid'\adLockBatchOptimistic If Not rst.EOF Then

txtUserName(0) = rst.Fields!maxid + 1 ' gGetMaxKey(\"panelid\") txtUserName(0) = PadCharL(txtUserName(0), 4, \"0\") Else

txtUserName(0) = \"0001\" End If

End Sub

Private Sub Form_Unload(Cancel As Integer)

End Sub

Private Sub txtUserName_KeyPress(Index As Integer, KeyAscii As Integer) If KeyAscii = 13 Then If Index <= 7 Then

If Index <> 2 Then

If Index <> 4 Then

txtUserName(Index + 1).SetFocus Else

txtUserName(Index + 3).SetFocus End If Else

txtUserName(Index + 2).SetFocus End If Else

End If End If

If Index <> 1 And Index <> 7 And Index <> 8 Then

If KeyAscii <> 8 And KeyAscii <> 46 And KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 End If End Sub

Public Sub init用途选择(xDataCob As DataCombo) '为用途选择下拉框准备数据

Call initAdo(rst)

rst.Open \"select * from 用户类型 \" Set xDataCob.DataSource = rst Set xDataCob.RowSource = rst xDataCob.ListField = \"ATYPE\" umn = \"ATYPEID\"

Set rst.ActiveConnection = Nothing End Sub

Private Sub UpDown1_Change()

End Sub

7.6、数据查询窗体设计

数据查询窗体名称为frmFeefind,界面如下

数据查询可以对总电量,金额,开始日期,结束日期,用户名称,用户编号,等进行具体的查询,还可以将数据导出到Excel表格中 实现代码: dset

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

'拼Where 语句

whrStr = getWhrStr() '取得网格的数据

Sqlstr = \"select * from feels \" & whrStr & \" \" 'MsgBox Sqlstr

If rsdg.State = 1 Then

End If

rsdg.Open Sqlstr, gCnn, adOpenStatic, adLockOptimistic 'Debug.Print Sqlstr

Set rsdg = getQueryData(Sqlstr) Set dgExp.DataSource = rsdg

Sqlstr = \" select sum(feeMoney),sum(Ecount) from feels \" & whrStr & \" \" If rstRg.State = 1 Then

End If

rstRg.Open Sqlstr, gCnn, adOpenStatic, adLockBatchOptimistic txtCount = Format(rstRg.Fields(0), \"####0.00\") & \" \" txtCountA = rstRg.Fields(1) & \" \"

MsgBox \" 数据查询完成,共\" & rsdg.RecordCount & \" 条纪录!\

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 holderid ='\" & Trim(Me.txtID) & \"' \" End If

If Trim(Me.txtUser) <> \"\" Then

whrStr = whrStr + \" and holder like '%\" & txtUser & \"%'\" End If

If Trim(Me.txtMoney) <> \"\" Then

whrStr = whrStr + \" and qianFee>= \" & Me.txtMoney & \"\" End If

whrStr = whrStr + \" and Feedate>= #\" & Me.dtpS & \"# and Feedate<= #\" & Me.dtpE & \"# \"

getWhrStr = whrStr

End Function

Private Sub cmdReturn_Click() Unload Me End Sub

Private Sub Form_Load()

dtpE.Value = Format(Now, \"yyyy-mm-dd\")

End Sub

Private Sub Form_Unload(Cancel As Integer)

If rsdg.State = 1 Then

End If End Sub

致 谢

在这次的毕业设计中,让我深深地体现到进行软件开发不是一件简单的事情,它需要设计者具有全面的专业知识、缜密的思维、严谨的工作态度以及较高的分析问题、解决问题的能力,而我在很多方面还有欠缺。最初,由于自己对开发工具的学艺不精,所以一开始感觉摸不着头绪,根本不知道从何下手。所以只有匆匆忙忙地从图书馆借来大量关于VB和Access方面的书籍,希望通过参阅各种关于运用VB和Access开发系统的书籍充分了解系统建设的基本流程、总体布局设计以及系统开发前所需的一些准备工作,做到心中有数。然而,由于实在是经验有限,虽然书本上介绍了许多这方面的知识和操作方法,但是毕竟还是限于理论方面的,所以理解起来比较困难。幸好有老师和同学的热情帮助,尤其是我的指导老师刘丽老师的精心指导,她在我的整个设计过程中给于了很大的帮助,在此,对她无私的奉献表示衷心的感谢!

同时我们小组的其他同学也给与了我很大的帮助,在此,一并表示感谢!在大家的共同努力下,我的系统设计才能够顺利地完成。由于本人的水平有限,程序设计简单,有许多不足之处,请众审考老师给予批评指正。再次不胜感谢.

参考文献

[1] C.J.Date , 《Database system implementation》,机械工业出版社, 2000

[2] Hector Garcial-Molina ,, Jennifer Widom,《An introduction to Database Systems(Seventh Edition), 机械工业出版社,2001

[3] 林陈雷, 郭安源, 葛晓东, 《教育信息化系统开发实例导航》 , 人民邮电出版社,2003 [4] 张立科,《数据库开发技术与工程实践》,人民邮电出版社,2004

[5] 张红军, 王虹 等 《Visual basic 6.0 中文版高级应用与开发指南》, 人民邮电出版

社, 2002

[6] 伍俊良 主编 等 《VB课程设计与系统开发案例》清华大学出版社, 2002 [7] 姚巍,《Visual Basic数据库开发及工程实例》,人民邮电出版社

[8] 求是科技,《Visual Basic 6.0 数据库开发技术与工程实践》,人民邮电出版社,2004 [9] 刘瑞新,汪远征,《Visual Basic程序设计教程》,机械工业出版社,2001

[10]刘萌,周学明,郭安源,《Visual Basic企业办公系统开发实例导航》,人民邮电出版

社,2003

[11]孟小峰,王珊,《数据库系统导论》,机械工业出版社,2000

sounds that were a lot like laughter. 'You think it's funny, huh?' Weary inquired. He walked around to Billy's back. Billy's jacket and shirt and undershirt had been hauled up around his shoulders by the violence, so his back was naked. There, inches from the tips of Weary's combat boots, were the pitiful buttons of Billy's spine.

Weary drew back his right boot, aimed a kick at the spine, at the tube which had so many of Billy's important wires in it. Weary was going to break that tube.

But then Weary saw that he had an audience. Five German soldiers and a police dog on a leash were looking down into the bed of the creek. The soldiers' blue eyes were filled with bleary civilian curiosity as to why one American would try to murder another one so far from home, and why the victim should laugh. Three

The Germans and the dog were engaged in a military operation which had an amusingly self-explanatory name, a human enterprise which is seldom described in detail, whose name alone, when reported as news or history, gives many war enthusiasts a sort of post-coital satisfaction. It is, in the imagination of combat's fans, the divinely listless loveplay that follows the orgasm of victory. It is called 'mopping up.' The dog, who had sounded so ferocious in the winter distances, was a female German shepherd. She was shivering. Her tail was between her legs. She had been borrowed that morning from a farmer. She had never been to war before. She had no idea what game was being played. Her mine was Princess.

Two of the Germans were boys in their early teens. Two were ramshackle old me droolers as toothless as carp. They were irregulars, armed and clothed fragmentarily with junk taken from real soldiers who were newly dead. So it goes. They were farmers from just across the German border, not far away.

Their commanander was a middle-aged corporal-red-eyed., scrawny, tough as dried beef, sick of war. He had been wounded four times-and patched up, and sent back to war. He was a very good soldier-about to quit, about to find somebody to surrender to. His bandy legs were thrust into golden cavalry boots which he had taken from a dead Hungarian colonel on the Russian front. So it goes. Those boots were almost all he owned in this world. They were his home. An anecdote: One time a recruit was watching him bone and wax those golden boots, and he held one up to the recruit and said, 'If you look in there deeply enough, you'll see Adam and Eve.'

Billy Pilgrim had not heard this anecdote. But, lying on the black ice there, Billy stared into the patina of the corporal's boots, saw Adam and Eve in the golden depths. They were naked. They were so innocent, so vulnerable, so eager to behave decently. Billy Pilgrim loved them.

Next to the golden boots were a pair of feet which were swaddled in rags. They were crisscrossed by canvas straps, were shod with hinged wooden clogs. Billy looked up at the face that went with the clogs. It was the face of a blond angel of fifteen-year-old boy. The boy was as beautiful as Eve.

Billy was helped to his feet by the lovely boy, by the heavenly androgyne. And the others came forward to dust the snow off Billy., and then they searched him for weapons. He didn't have any. The most dangerous thing they found on his person was a two-inch pencil stub.

Three inoffensive bangs came from far away. They came from German rifles. The two scouts who had ditched Billy and Weary had just been shot. They had been lying in ambush for Germans. They had been discovered and shot from behind. Now they were dying in the snow, feeling nothing, turning the snow to the color of raspberry sherbet. So it goes. So Roland Weary was the last of the Three Musketeers.

And Weary, bug-eyed with terror, was being disarmed. The corporal gave Weary's pistol to the pretty boy. He marveled at Weary's cruel trench knife, said in German that Weary would no doubt like to use the knife on him, to tear his face off with the spiked knuckles, to stick the blade into his belly or throat. He spoke no English, and Billy and Weary understood no German. 'Nice playthings you have, the corporal told Weary, and he handed the knife to an old man. 'Isn't that a pretty thing? Hmmm?

He tore open Weary's overcoat and blouse. Brass buttons flew like popcorn. The corporal reached into Weary's gaping bosom as though he meant to tear out his pounding heart, but he brought out Weary's bulletproof Bible instead.

A bullet-proof Bible is a Bible small enough to be slipped into a soldier's breast pocket, over his heart. It is sheathed in steel.

The corporal found the dirty picture of the woman and the pony in Weary's hip pocket. 'What a lucky pony, eh?' he said. \"Hmmmm? Hmmmm? Don't you wish you were that pony?' He handed the picture to the other old man. 'Spoils of war! It's all yours, you lucky lad.'

Then he made Weary sit down in the snow and take off his combat boots, which he gave to the beautiful boy. He gave Weary, the boy's clogs. So Weary and Billy were both without decent military footwear now' and they had to walk for miles and miles, with Weary's clogs clacking, with Billy bobbing up-and-down, up-and-down, crashing into Weary from time to time. 'Excuse me,' Billy would say, or 'I beg your pardon.'

They were brought at last to a stone cottage at a fork in the road. It was a collecting point for prisoners of war. Billy and Weary were taken inside, where it was warm and smoky. There vas a fire sizzling and popping in the fireplace. The fuel was furniture. There were about twenty other Americans in there, sitting on the floor with their backs to the wall, staring into the flames-thinking whatever there was to think, which was zero.

Nobody talked. Nobody had any good war stories to tell.

Billy and Weary found places for themselves, and Billy went to sleep with his head on the shoulder of an unprotesting captain. The captain was a chaplain. He was a rabbi. He had been shot through the hand.

Billy traveled in time, opened his eyes, found himself staring into the glass eyes of a jade green mechanical owl. The owl was hanging upside down from a rod of stainless steel. The owl was Billy's optometer in his office in Ilium. An optometer is an instrument for measuring refractive errors in eyes-in order that corrective lenses may be prescribed.

Billy had fallen asleep while examining a female patient who was m a chair on the other side of the owl. He had fallen asleep at work before. It had been funny at first. Now Billy was starting to get worried about it, about his mind in general. He tried to remember how old he was, couldn't. He tried to remember what year it was. He couldn't remember that, either. 'Doctor,' said the patient tentatively. 'Hm?' he said. 'You're so quiet.' 'Sorry.'

'You were talking away there-and then you got so quiet' 'Um.'

'You see something terrible?' 'Terrible?'

'Some disease in my anslated by David Lewis

The elderly man stroked the dogpillar's head. \"This fellow here, I wonder what he was called before he became a dogpillar.\" \"No calling a dogpillar by its original name,\" I said. \"Isn't that a strange law?\"

The man gave me a quick glance, then replied casually. \"Didn't they just extend the laws concerning people to dogs? That's why they lose their names when they become dogpillars.\"

He nodded while scratching the dogpillar's jaw. \"Not only the old names, but you can't give them new names, either. That's because there are no proper nouns for plants.\" Why, of course, I thought.

He Looked at my envelope with MANUSCRIPT ENCLOSED written on it. \"Excuse me,\" he said. \"Are you a writer?\" I was a little embarrassed. \"Well. yes. Just trivial little things.\"

\"So that's it.\" After looking at me closely, the man returned to stroking the dogpillar's head. \"I also used to write things.\" He managed to suppress a smile.

\"How many years is it now since I stopped writing? It feels like a long time.\"

I stared at the man's profile. Now that he said so, it was a face I seemed to have seen somewhere before. I started to ask his name, hesitated, and fell silent. The elderly man said abruptly, \"It's become a hard world to write in.\"

I lowered my eyes, ashamed of myself, who still continued to write in such a world. \"It certainly has...\" The man apologized in a bit of a flurry discerning my sudden depression. \"That was rude. I'm not criticizing you. I'm the one who should feel ashamed.\"

\"No,\" I told him, after looking quickly around us, \"I can't give up writing because I haven't the courage. Giving up writing! Why, after all, that would be a gesture against society.\" The elderly man continued stroking the dogpillar. After a long while he spoke.

\"It's painful, suddenly giving up writing. Now that it's come to this, I would have been better off if I'd gone on boldly writing social criticism and had been arrested. There are even times when I think that.

But I was just a dilettante, never knowing poverty, craving peaceful dreams. I wanted to live a comfortable life. As a person strong in self- respect, I couldn't endure being exposed to the eyes of the world, ridiculed. So I quit writing, A sorry tale.\"

He smiled and shook his head. \"No no, let's not talk about it. You never know where someone might be listening.\" \"You're right.\" I changed the subject. \"Do you live near here?\"

\"Do you know the beauty parlor on the main street? You turn in there. My name is Hiyama.\" He nodded at me. \"Come on over sometime. There's no one home but my wife.\" \"Thank you

very much.\" I gave him my own name. I didn't remember any writer named Hiyama. No doubt he wrote under a pen name. I had no intention of visiting his house. This is a world where even two or three writers getting together is considered illegal assembly. \"It's time for the mail truck to come.\" Talking pains to look at my watch, I stood up. \"I'm afraid I'd better go,\" I said.

He turned a sadly smiling face toward me and bowed slightly. After stroking the dogpillar's head a little, I left the park.

Standing Woman(2)---

I came out on the main street, there were a lot of cars on the road but few pedestrians. A cattree about thirty to forty centimeters high was planted next to the sidewalk. Sometimes I come across a catpillar that has just been planted and still hasn't become a cattree.

New catpillars look at my face and meow or cry, but the ones where all four limbs planted in the ground have vegetized, with their greenish faces stiffly set and their eyes shut tight, only move their ears now and then.

Then there are catpillars that grow branches from their bodies and put out handfuls of leaves.

The mental condition of there seems to be completely vegetized •| they don't even move their ears. Even if you can still make out a cat's face, it may be better to call these cattrees.

Maybe. I thought, it's better to make dogs into dogpillars. When their food runs out, they get vicious and even turn on people. But why did they have to turn cats into catpillars? Too many strays? To improve the food situation even a little? Or perhaps for the greening of the city ...

Next to the big hospital on the corner where the roads cross are two mantrees, and ranged alongside these trees is a manpillar. This manpillar wears a postman's uniform, and you can't tell how far its legs have vegetized because of its trousers. It is male, thirty-five or thirty-six years old, tall, with a bit of a stoop. I approached him and held out my envelope as always. \"Registered mail, special delivery, please.\"

The manpillar, nodding silently, accepted the envelope and took stamps and a registered mail slip from his pocket.

I looked around quickly after paying the postage. There was no one else there. I decided to try speaking to him. I had been giving him mail every three days, but I still hadn't had an opportunity chance for a leisurely talk.

\"What did you do?\" I asked in a low voice.

The manpillar looked at me in surprise. Then, after running his eyes around the area, he answered with a sour look, \"Won't do to go saying unnecessary things to me. Even me, I'm not supposed to answer.\" ways been, the wonted way of things.

Spitz was a practiced fighter. From Spitzbergen through the Arctic, and across Canada and the Barrens, he had held his own with all manner of dogs and achieved to mastery over them. Bitter rage was his, but never blind rage. In passion to rend and destroy, he never forgot that his enemy was in like passion to rend and destroy. He never rushed till he was prepared to receive a rush; never attacked till he had first defended that attack.

In vain Buck strove to sink his teeth in the neck of the big white dog. Wherever his fangs struck for the softer flesh, they were countered by the fangs of Spitz. Fang clashed fang, and lips were cut and bleeding, but Buck could not penetrate his enemy's guard. Then he warmed up and enveloped Spitz in a whirlwind of rushes. Time and time again he tried for the snow-white throat, where life bubbled near to the surface, and each time and every time Spitz slashed him and got away. Then Buck took to rushing, as though for the throat, when, suddenly drawing back his head and curving in from the side, he would drive his shoulder at the shoulder of Spitz, as a ram by which to overthrow him. But instead, Buck's shoulder was slashed down each time as Spitz leaped lightly away.

Spitz was untouched, while Buck was streaming with blood and panting hard. The fight was growing desperate. And all the while the silent and wolfish circle waited to finish off whichever dog went down. As Buck grew winded, Spitz took to rushing, and he kept him staggering for footing. Once Buck went over, and the whole circle of sixty dogs started up; but he recovered himself, almost in mid air, and the circle sank down again and waited.

But Buck possessed a quality that made for greatness--imagination. He fought by instinct, but he could fight by head as well he rushed, as though attempting the old shoulder trick, but at the last instant swept low to the snow and in. His teeth closed on Spitz's left fore leg. There was a crunch of breaking bone, and the white dog faced him on three legs. Thrice he tried to knock him over, then repeated the trick and broke the right fore leg. Despite the pain and helplessness, Spitz struggled madly to keep up. He saw the silent circle, with gleaming eyes, lolling tongues, and silvery breaths drifting upward, closing in upon him as he had seen similar circles close in upon beaten antagonists in the past. Only this time he was the one who was beaten.

There was no hope for him. Buck was inexorable. Mercy was a thing reserved for gentler climes. He maneuvered for the final rush. The circle had tightened till he could feel the breaths of the huskies on his flanks. He could see them, beyond Spitz and to either side, half-crouching for the spring, their eyes fixed upon him. A pause seemed to fall. Every animal was motionless as though turned to stone. Only Spitz quivered and bristled as he staggered back and forth, snarling with horrible menace, as though to frighten off impending death. Then Buck sprang in and out; but while he was in, shoulder had at last squarely met shoulder. The dark circle became a dot on the moon flooded snow as Spitz disappeared from view. Buck stood and looked on, the successful champion, the dominant primordial beast who had made his

kill and found it good. away.

At the Pelly one morning, as they were harnessing up, dolly, who had never been conspicuous for anything, went suddenly mad. She announced her condition by a long, heart-breaking wolf howl that sent every dog bristling with fear, then sprang straight for Buck. He had never seen a dog go mad, nor did he have any reason to fear madness; yet he knew that here was horror, and fled away from it in a panic. Straight away he raced, with Dolly, panting and frothing, one leap behind; nor could she gain on him, so great was his terror, nor could he leave her, so great was her madness. He plunged through the wooded breast of the island, flew down to the lower end, crossed a back channel filled with rough ice to another island, gained a third island, curved back to the main river, and in desperation started to cross it. And all the time, though he did not look, he could hear her snarling just one leap behind. Francois called to him a quarter of a mile away and he doubled back, still one leap ahead, gasping painfully for air and putting all his faith in that Francois would save him. the dog-driver held the axe poised in his hand, and as Buck shot past him the axe crashed down upon mad Dolly's head.

Buck staggered over against the sled, exhausted, sobbing for breath, helpless. This was Spitz's opportunity. He sprang upon Buck, and twice his teeth sank into his unresisting foe and ripped and tore the flesh to the bone. Then Francois' lash descended, and Buck had the satisfaction of watching Spitz receive the worst whipping as yet administered to any of the team. \"One devil, dat Spitz,\" remarked Perrault. \"Some dam day him kill dat Buck.\"

\"Dat Buck two devils,\" was Francois's rejoinder. \"All de time I watch dat Buck I know for sure. Lissen: some dam fine day him get mad like hell and den him chew dat Spitz all up and spit him out on de snow. Sure, I know.\"

From then on it was war between them. Spitz, as lead-dog and acknowledged master of the team, felt his supremacy threatened by this strange Southland dog.F And strange Buck was to him, for of the many Southland dogs he had known, not one had shown up worthily in camp and on trail. They were all too soft, dying under the toil, the frost, and starvation. Buck was the exception. He alone endured and prospered, matching the husky in strength, savagery, and cunning.E Then he was a masterful dog, and what made him dangerous was the fact that the club of the man in the red sweater had knocked all blind pluck and rashness out of his desire for mastery. He was preeminently cunning, and could bide his time with a patience that was nothing less than primitive. PART 3

Mulan: Okay, okay, how 'bout this? Ahem, [in her manly voice] excuandanother man picking out dirt from between his toes with chopsticks] Beautifulisn't it? Mulan [making a face of disgust and continuing to walk]: They're disgusting.

Mushu: No, they're men. And you're going to have to act just like them, sopay attention. [Mulan stops and watches Yao, Ling, Chien-Po and Tattoo Soldier]

Tattoo Soldier [showing the dragon tattoo on his chest and belly]: Look, thistattoo will protect me from harm. [Yao thi

Shang: What's your name?

Mulan [stumbling]: Ahh, I, uhhh, I, uh--

Chi Fu [stepping into Mulan's face]: Your commanding officer just asked you a question. Mulan: Uhh, I've got a name. Huh. And it's a boys name too. Mushu [from the back of Mulan]: Ling, How 'bout Ling?

Mulan [to Mushu motioning with her head to Ling]: His name's Ling. Shang: I didn't ask for his name. I asked for yours. Mushu: Try, uh, ahh, Chu! Mulan: Ah Chu. Shang: Ah Chu?

Mushu: Gesundheit. He He, I kill myself. Mulan [whispering over her shoulder]: Mushu. Shang: Mushu? Mulan: No.

Shang: Then what is it!

Mushu: Ping! Ping was my best friend growing up!

Mulan: It's Ping. Shang: Ping.

Mushu: Of course Ping DID steal my gir-[Mulan reaches back and grabs holds Mushu's mouth together] Mulan: Yes, my name is Ping.

Shang: Let me see your conscription notice. [Takes the notice from Mulan] Fa Zhou, *the* Fa Zhou? Chi Fu: I didn't know Fa Zhou had a son.

Mulan: Um, he...doesn't talk about me much. [Mulan tries to hawk up a loogie and spit but the saliva just runs from her mouth. Therecruits laugh] Chi Fu: I can see why, the boy's an absolute lunatic.

Shang [to the recruits]: Okay gentlemen, thanks to your new friend Ping, you'll spend tonight picking up every single grain of rice. Andtomorrow, the real work begins. [All recruits growl at Mulan]

Mushu [Popping out the front of Mulan's armor]: You know, we have to work on your people skills. [Cut to Mulan sleeping in her tent. Mushu winds up Cri-Kee's wings. Cri-Kee rings like an alarm clock] S - GLAUCON

AND thus, Glaucon, after the argument has gone a weary way, the true and the false philosophers have at length appeared in view. I do not think, he said, that the way could have been shortened.

I suppose not, I said; and yet I believe that we might have had a better view of both of them if the discussion could have been confined to this one subject and if there were not many other questions awaiting us, which he who desires to see in what respect the life of the just differs from that of the unjust must consider. And what is the next question? he asked.

Surely, I said, the one which follows next in order. Inasmuch as philosophers only are able to grasp the eternal and unchangeable, and those who wander in the region of the many and variable are not philosophers, I must ask you which of the two classes should be the rulers of our State? And how can we rightly answer that question?

Whichever of the two are best able to guard the laws and institutions of our State --let them be our guardians. Very good.

Neither, I said, can there be any question that the guardian who is to keep anything should have eyes rather than no eyes? There can be no question of that.

And are not those who are verily and indeed wanting in the knowledge of the true being of each thing, and who have in their souls no clear pattern, and are unable as with a painter's eye to look at the absolute truth and to that original to repair, and having perfect vision of the other world to order the laws about beauty, goodness, justice in this, if not already ordered, and to guard and preserve the order of them --are not such persons, I ask, simply blind?

Truly, he replied, they are much in that condition.

And shall they be our guardians when there are others who, besides being their equals in experience and falling short of them in no particular of virtue, also know the very truth of each thing? There can be no reason, he said, for rejecting those who have this greatest of all great qualities; they must always have the first place unless they fail in some other respect. Suppose then, I said, that we determine how far they can unite this and the other excellences. By all means.

In the first place, as we began by observing, the nature of the philosopher has to be ascertained. We must come to an understanding about him, and, when we have done so, then, if I am not mistaken, we shall also acknowledge that such an union of qualities is possible, and that those in whom they are united, and those only, should be rulers in the State. What do you mean?

Let us suppose that philosophical minds always love knowledge of a sort which shows them the eternal nature not varying from generation and corruption. Agreed.

And further, I said, let us agree that they are lovers of all true being; there is no part whether greater or less, or more or less honourable, which they are willing to renounce; as we said before of the lover and the man of ambition. True.

And if they are to be what we were describing, is there not another quality which they should also possess? What quality?

Truthfulness: they will never intentionally receive into their mind falsehood, which is their detestation, and they will love the truth. Yes, that may be safely affirmed of them.

'May be,' my friend, I replied, is not the word; say rather 'must be affirmed:' for he whose nature is amorous of anything cannot help loving all that belongs or is akin to the object of his affections. Right, he said.

And is there anything more akin to wisdom than truth? How can there be?

Can the same nature be a lover of wisdom and a lover of falsehood? Never.

The true lover of learning then must from his earliest youth, as far as in him lies, desire all truth? Assuredly.

But then again, as we know by experience, he whose desires are strong in one direction will have them weaker in others; they will be like a stream which has been drawn off into another channel. True.

He whose desires are drawn towards knowledge in every form will be absorbed in the pleasures of the soul, and will hardly feel bodily pleasure --I mean, if he be a true philosopher and not a sham one. That is most certain.

Such an one is sure to be temperate and the reverse of covetous; for the motives which make another man desirous of having and spending, have no place in his character. Very true.

Another criterion of the philosophical nature has also to be considered. What is that?

There should be no secret corner of illiberality; nothing can more antagonistic than meanness to a soul which is ever longing after the whole of things both divine and human. Most true, he replied.

Then how can he who has magnificence of mind and is the spectator of all time and all existence, think much of human life? He cannot.

Or can such an one account death fearful?

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- xiaozhentang.com 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务