首页 企业档案管理系统

企业档案管理系统

举报
开通vip

企业档案管理系统企业档案管理系统 摘要 企业员工的档案管理是企业员工管理的一个重要内容。当今社会人员流动越来越频繁,使得档案管理工作也变得越来越复杂。如何管理好企业员工的信息,成为企业管理中一个大的问题。如果能实现档案管理的自动化,无疑将给公司管理部门带来很大的方便。 本档案管理系统为企业单位和个人提供信息咨询、档案检索、档案存取、工资调整、依据档案出具各类证明材料等服务,能够满足现代企业对员工档案管理的需要。 本系统以VB6.0为开发工具,后台数据库选择ACCESS2003,操作系统为WINDOWS2000。 关键词:...

企业档案管理系统
企业档案管理系统 摘要 企业员工的档案管理是企业员工管理的一个重要内容。当今社会人员流动越来越频繁,使得档案管理工作也变得越来越复杂。如何管理好企业员工的信息,成为企业管理中一个大的问题。如果能实现档案管理的自动化,无疑将给公司管理部门带来很大的方便。 本档案管理系统为企业单位和个人提供信息咨询、档案检索、档案存取、工资调整、依据档案出具各类证明材料等服务,能够满足现代企业对员工档案管理的需要。 本系统以VB6.0为开发工具,后台数据库选择ACCESS2003,操作系统为WINDOWS2000。 关键词:档案管理,VB6.0,ADO Abstract The file management of the business enterprise employee is an important content for business enterprise management. Today the increment of floating population makes the file management become more and more complex, How to manage staff’s information is becoming a big problem for business enterprise management. If the automation of file management can be realized, it is helpful for the manage department of enterprise. The file management can provide the service of information consulting, file inquiring, file access, and provide the service of giving evidence for employee. It can meet the file management’s demands of modern enterprise management. This system is designed for windows 98, and the develop language is Visual basic 6.0, the database management system is Access2003. Key words: File management, Visual Basic, ADO 第一章 应用背景 1.1 引言 企业员工的档案管理是企业员工管理的一个重要内容。随着时代的进步,企业也逐渐变得庞大起来;当今社会人员流动越来越频繁,使得档案管理工作也变的越来越复杂。如何管理好企业员工的信息,成为企业管理中一个大的问题。如果能实现档案管理的自动化,无疑将给公司管理部门带来很大的方便。 由于档案管理的极端重要性,在不同的历史时期产生了不同的、相对于那个时代最完备的档案管理技术与 管理制度 档案管理制度下载食品安全管理制度下载三类维修管理制度下载财务管理制度免费下载安全设施管理制度下载 。近代档案学已经是一门完善的、体系严密的科学。虽然档案学面临信息化的冲击与挑战,但是我们必须清醒地看到,新一代档案学尚未产生,档案管理信息化还存在大量未解决的难题。因此,处理好档案管理信息化中的管理创新和原有档案管理 制度 关于办公室下班关闭电源制度矿山事故隐患举报和奖励制度制度下载人事管理制度doc盘点制度下载 之间的矛盾是我们面临的首要挑战。原有档案管理制度的核心一是为了快速查询、应用,二是为了确保档案安全。同时,对历史档案管理现状难于改变的特点,必然使档案管理不可避免地走向管理方式的多元化。 档案管理系统向深层应用发展时,会出现与其它应用系统整合的情况,如文档管理一体化。对于这类整合,重要的是处理好整合应用项目与档案管理特有的、独立性要求的矛盾。例如,档案管理中对文件标题有权改动,这必然使公文、档案一体化管理系统的设计复杂化。采取管理创新和合理技术是档案管理与其它信息系统整合的可行的解决 方案 气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载 。 企业职工档案管理是随着人事制度改革应运而生的一项新的工作。近年来,随着人事制度的改革及企事业单位实行劳动 合同 劳动合同范本免费下载装修合同范本免费下载租赁合同免费下载房屋买卖合同下载劳务合同范本下载 制,用人单位拥有了用人自主权。但由于一些企业的改制,人事的更迭,以及人事档案的多头管理,造成了部分档案的流失,也造成了效率低,办事难的情况。最初的档案管理,都是靠人力来完成的。当企业规模比较小的时候,人力可以完成,随着企业的规模越来越大,企业员工的数目越来越多,依然维持着人力进行档案管理,必然会造成工作效率低,工作错误增高的问题。 企业档案管理就是把分散在企事业单位的职工档案实行统一、集中、规范的收集管理,建立分类编号管理、电脑存储查询等现代化、专业化的管理系统。档案管理为企业单位和个人提供信息咨询、档案检索、档案存取、工资调整、依据档案出具各类证明材料等服务;为企业单位和个人提供档案的收集、整理、保管服务。 企业档案管理的对象是企业、企业化管理的人事单位及职工本人。 企业档案管理的自动化是当今社会的发展趋势。档案信息录入项目齐全、完整、系统, 这些无疑是现代企业档案管理系统的要求。现代化的企业档案管理系统中灵活使用了表格对档案分门别类,组成企业档案管理系统,可以方便地查询、阅读、修改、交流和重复使用。 1.2 主要功能 开发企业档案管理系统的总体任务是实现企业员工档案管理的系统化和自动化。 档案管理为企业单位和个人提供信息咨询、档案检索、档案存取、工资调整、依据档案出具各类证明材料等服务;为企业单位和个人提供档案的收集、整理、保管服务。 本系统的主要功能如下: 职工档案管理部分:有关企业员工各种信息的输入,包括员工基本档案、家庭成员、工作记录、奖惩情况、职称评定、培训记录、调动记录等。这一部分要完成的主要功能是员工信息的添加、修改、删除、查询。 部门管理部分:职工所在部门的信息输入,包括部门名称、部门负责人以及部门联系电话等。这一部分完成的主要功能是部门信息的添加、修改、删除、查询等。 系统维护部门:操作员设置、操作员权限设置、修改密码等。 第二章 ADO 技术介绍 2.1 ADO的介绍 ADO是 ActiveX Data Object的缩写,它是Microsoft数据库应用程序开发的新接口,是Microsoft新的数据访问技术,是建立在OLE DB之上的高层数据库访问技术。ADO被设计用来同新的数据库访问层OLE DB Provider一起协同工作,以提供通用数据库访问(Universal Data Access)。OLE DB是一个低层的数据库访问接口,用它可以访问各种数据库,包括传统的关系型数据库,以及电子邮件系统及自定义的商业对象。 即使对OLE DB、COM不了解也能轻松使用ADO,因为它非常简单易用,甚至比DAO都要容易使用,并不失灵活性。ADO提供了一个熟悉的,高层的对OLE DB的自动封装接口。如同RDO对象是ODBC驱动程序一样,不同的数据库要求它们自己的OLE DB提供者(OLE DB Provider)。虽然目前OLE DB提供者比较少,但微软正积极推广该技术,并打算用OLE DB取代ODBC。 ADO向Visual Basic程序员提供了很多好处,包括易于使用、熟悉的界面、高速度以及较低的内存占用(已实现ADO2.0的Msado1.5.dll需要占用342KB内存,大约是DAO3.5的Dap350.dll所占内存的60%)。同传统的数据对象层次(DAO和RDO)不同,ADO可以独立创建。因此可以创建一个“Connection”对象,但是可以有多个,独立的“Recordset”对象来使用它,另外ADO针对客户/服务器以及Web应用程序作了优化。 ADO最基本的操作流程:初始化COM库,引入ADO库定义文件;用Connection对象连接数据库;利用建立好的连接,通过Connection、Command对象执行SQL命令,或利用Recordset对象取得结果记录集进行查询、处理;使用完毕后关闭连接释放对象。 2.2 ADO的对象 2.2.1数据库连接对象——Connection 这是ADO最大的特点,也是DAO对象所没有的。每一次引用数据库可以建立一个连接对象,然后在其之上建立多个RecordSet,方便远程连接操作。 建立一个Connection的方法很简单,下面例子主要介绍了Connection对象的创建、连接数据库以及关闭连接的方法: Sub ConnectionExample1() Dim cnn As ADODB. Connection Set cnn=New ADODB. Connection ,通过ODBC DSN打开数据库 cnn.Open:Push:,:sa:,:: ,检查是否成功建立连接对象 If cnn.State=adStateOpen Then Welcome to Pushs~: MsgBox: Else MsgBox:Sorry.No Pubs today.: End If ,关闭连接对象( nn.Close C End Sub 表2-1 Connection对象属性列表 属性 功能 打开Connection的参数设置。主要有以下几项:Provider、File ConnectionString Name、Remote Provider、Remote Server、URL DefaultDatabase 定义Connection对象的缺省数据库 Provider 定义对象的数据库OLE DB的提供者,如SQL Server之类 State 当前状态,只读。主要返回值为adStateOpen或adStateExecuting 表2-2 Connection对象方法列表 方法 功能 BeginTrans 开始一个新的处理事物 RollbackTrans 放弃当前所有的处理事物并开启一个新的事物 Cancel 终止当前的数据库操作 Close 关闭释放Connection对象 Execute 执行SQL语句,或者查询 Open 打开Connection对象 2.2.2 命令对象——Command Command对象也是ADO的特色之一。一般用于大量数据的操作或者是对数据库表单结构 的操作。Command的重要属性如表2-3所示,重要方法如表2-4所示。 表2-3 Command对象的属性列表 属性 功能 ActiveCinnection 指定当前命令对象属于哪个Command CommandStream 指定提供命令参数的流 CommandText 指定参数 Dialect 指定参数的语法规范 State Command对象运行状态 表2-4 Command对象方法列表 方法 功能 Cancel 放弃操作 CreateParameter 创建参数 Execute 执行参数 2.2.3 数据集对象——Recordset Recordset对象表示的是来自基本表或者命令执行结果的记录全集,任何时候,Recordset对象所指的当前记录均为集合内的单个记录。 可使用Recordset对象操作来自提供者的数据,使用ADO时,通过Recordset对象可对几乎所有数据进行操作。所以Recordset对象均使用记录(行)和字段(列)进行结构。由于提供者所支持的功能不同,某些Recordset方法或属性有可能无效。 打开Recordset时,当前记录位于第一个记录(如果有),并且BOF和EOF属性被设置成False。如果没有记录,BOF和EOF属性设置是True。 假设提供者支持相关的功能,可以使用MoveFirst、MoveLast、MoveNext和MovePrevious方法以及Move方法,和AbsolutePosition、AbsolutePage和Filter属性来重新确定当前记录的位置。仅向前Recordset对象只支持MoveNext方法。当使用Move方法访问每个记录(或枚举Recordset)时,可用BOF和EOF属性查看移动是否超过Recordset的开始或者结尾。 Recordset对象可支持两类更新:立即更新和批更新。使用立即更新,一旦调用Update方法,对数据的所有更改将被立即写入基本数据源。也可以使用AddNew和Update方法将值的数组作为参数传递,同时更新记录的若干字段。 如果提供者支持批更新,可以使提供者将多个记录的更改寸入缓存,然后使用UpdateBatch方法在单个调用中将它们传给数据库。这种情况应用于使用AddNew、Update和Delete方法所做的更改。调用UpdateBatch方法后,可以使用Status属性检查任何数据冲突并加以解决。 2.2.4 字段对象——Field Field对象代表使用普通数据类型的数据的列。Recordset对象含有由Field对象组成的Field集合。每个Field对象对应与Recordset中的一列,其重要属性如表2-5所示,重 6所示。 要方法如表2- 表2-5 Field对象属性列表 属性 功能 Name 返回字段名 DefinedSize 返回已声明的字段大小 Value 查看或更改字段中的数据 Actualsize 返回给定字段中数据的实际大小 NativeError 指示给定Error对象的、特定提供者的错误代码 表2-6 Field对象方法列表 方法 功能 AppendChunk 将数据追加到大型文本、二进制数据中 GetGhunk 返回大型文本或二进制数据Field对象的全部或部分内容 2.2.5 错误集合——Errors Errors对象包含与单个操作(涉及提供者)有关的数据访问错误的详细信息。 任何涉及ADO对象的操作都会生成一个或多个提供者错误。每个错误出现时,一个或多个Errors对象将被放到Connection对象的Errors集合中。当另一个ADO操作产生错误时。Errors集合将被清空,并在其中放入新的Errors对象集。 每个Errors对象集都代表特定的提供者错误而不是ADO错误,ADO错误被记载到运行时的例外处理机制中。例如,在Microsoft Visual Basic中,产生特定ADO的错误将触发On Errors事件并出现在Err对象中。Errors的主要属性如表2-7所示。 表2-7 Errors对象属性列表 属性 功能 Description 包含错误的文本 Number 包含错误常量的长整型整数值 标识产生错误的对象。在向数据源发出请求后,如果Errors集合Source 有多个Errors对象,则会用到该属性 SQLSate 指示给定Errors对象的SQL状态 NativeErrors 指示给定Errors对象的、特定提供者的错误代码 出现提供者错误时,Errors对象被放在Connection对象的Errors集合中。ADO支持由单个ADO操作返回多少错误,以便显示在特定提供者的错误信息。要在错误处理程序中获得丰富的错误信息,可使用相应的语言或所在工作环境下的错误捕获功能,然后使用嵌套循环枚举出Errors集合的每个Errors对象的属性。 Errors集合的重要方法如图2-8所示 表2-8 Errors集合的方法列表 方法 功能 Clear 删除集合内的所有对象 Item 根据名称或序号返回集合的特定成员 2.3 用ADO操作数据库概述 在使用ADO操作数据库时,主要采取如下的步骤和方法: , 打开数据库,首先需要创建数据库连接对象(Connection),然后调用该对象的Open 方法即可打开数据库。 , 操作数据库数据。在数据库打开之后,通过Connection、Command对象执行SQL 命令,或者创建记录集(RecordSet)对象,使用该对象的各种方法就可以进行数 据库数据的查询、定位以及增加、删除和修改。 , 关闭数据库。使用上面创建的数据库连接对象的close方法就可以进行数据库的关 闭。 下面就分别详细介绍以上所说的各个步骤和方法。 2.4 ADO连接Access数据库 可以使用指定OLE DB提供者和连接数据字符串来连接Access数据文件。例如: Set Con=New ADODB.Connection Dim srtcon As String Srtcon=:Provider=Microsoft.Jet.OLEDB.4.0;Date Source=C:\gongcheng.mdb;:_ &:Persist Security Info=False;: Con.Open strcon 其中C:\gongcheng.mdb为数据库的路径和名称。 如果数据库有密码,则: Provider=Microsoft.Jet.OLEDB.4.0;Password=sa;UserId=rose;DataSource=C:\gong cheng.mdb; Persist Security Info=True 其中rose为用户名;sa为密码 如果数据库是局域网其他计算机上的,那么这个数据库所在的至少上一层目录为共享,采用以下方法: Provider=Microsoft.Jet.OLEDB.4.0;UserId=rose;DataSource=C:\\Chybing\chybing \gongcheng.mdb; Persist Security Info=False 这里“\\Chybing\chybing\gongcheng.mdb“为在网络邻居中名chybing的机器上(IP也可以)上的data文件夹下面名为gongcheng的Access数据。 2.5 ADO对数据库基本操作 2.5.1 用记录集(Recordset)对象操纵数据 记录集(Recordset)对象是ADO操作数据最常用的对象,在此对Recordset的基本操作做一个说明 1)创建并打开Recordset对象 Dim rstADO As ADODB. Recordset 如果在缺省情况下,Visual Basic将按照引用数据库的先后顺序判断一个Recordset是ADO对象还是DAO对象。 以Microsoft Jet引擎的数据库为例子,ADO打开记录集的方式如下: Sub ADOOpenJetDatabase() Dim cnn As New ADODB.Connection Cnn.Open:Provider= Microsoft. Jet.OLEDB.4.0;: &:Data Source=.\NorthWind.mdb: Cnn.Close End Sub 据库记录(定位当前记录) ,)浏览数 关键在于ADO需要先建立Connection(下面来举一个例子: Sub ADOOpenJetDatabase() Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset Dim fld As ADODB.Field ,打开连接 Cnn.Open:Provider=Microsoft.Jet.OLEDB.4.0;:&:Data Source=.\NorthWind.mdb;: ,打开方式:forward-only,,read-only Rst.Open:SELECT *FROM Customers:,_ :WHERE Region=,WA,:,cnn,adOpenForwardOnly,adLockReadOnly ,输出第一个记录的所有字段值 For Each fld In rst.Fields Debug.Print fld.Value&:;:; Next Debug.print ,关闭数据记录集对象 Rst.Close Cnn.Close End Sub 至于Move,MoveNext,FindFirst之类的方法,两者用法相同。 3)查询数据记录 ADO的查询数据库记录的方法和DAO有所不同,DAO可以利用RecordSet对象的FindFirst、FindNext、Findlast、FindPrevious方法,依次用Move浏览查询到的记录,并显示出来。而ADO只有Find方法,该方法允许使用一个查找字符串,它由单引号(‘)或数码符号(#)加以封闭。双引号(“)不能使用,数码符号必须封闭数值。 如果使用Like操作符,就可以用星号(*)作为字符串值中的通配符号。然而,星号必 须的值中的最后一个字符或值中的唯一字符。否则会发生运行时的错误。 除了搜寻条件外,Find方法还有几个参数。应指明开始搜索时要跳过的记录数;否则,搜索当从当前记录开始。当要开始搜索下一个值时,应当指明一个起始值。 在记录集中也可以指明是否向回搜索(相开头)或者向前(向尾部),可以通过指明书签作为搜索的开始位子。 Find方法的调用语法是: RstName.Find strCriteria[,IngSkipRecords,IngSe archDirection[,varStart]] 其中strCriteria是查找条件,比较符仅限于“=”、“>”、“<”、“>=”、“<=”、和“LIKE”,比较只是针对表中的单个字段。 4)增、删、改数据记录 ADO可以用与DAO完全相同的方法进行添加、删除的操作。唯一不同的是要先建立一个Connection对象。 ADO还提供了一个快捷的添加方式: Rst.AddNew Array(:CompanyName:,:Phone:),Array(:ABCD CD:,:(010)123-4567:) 修改现有记录时,ADO不需要调用Edit方法,直接对当前记录某字段属性赋值之后调用Update方法就可以实现。 2.5.2 用Connection对性运行查询语句 使用Connection对象的Execute方法,可执行任何在指定连接的参数中传送给方法的查询。如果参数指定按行返回的查询,执行产生的任何结果将存储在新的Connection对象中。如果命令不是按返回的查询,则提供返回者关闭的Connection对象,应首先创建具有所需要属性的设置的Connection对象,然后用Connection对象的Open方法执行查询并返回所需要游标的类型。具体的语法如下: 对于非按行返回的命令字符串: connection.Execute CommandText,RecordsAffected,Options 对于按行返回的命令字符串: Set recordset=connection.Execute(CommandText,RecordsAffected,Options) 2.6 ADO和DAO/RDO的比较 ADO是DAO/RDO的后继产物。ADO 2.0在功能上与RDO更相似,而且一般来说,在 这两 种模型之间有一种相似的映射关系。ADO扩展了DAO和RDO所使用的对象模型,这意味 着它包含较少的对象、更多的属性、方法(和参数),以及事件。例如,ADO没有与rdoEngine和rdoEnvironment对象相等同的对象,可以显露ODBC驱动程序管理器和hEnv接口。尽管 事实上接口可能是通过ODBC OLE DB服务提供程序实现的,但当前也不能从ADO 中创建ODBC数据源。 ADO并不是自动和现存的数据访问应用程序代码兼容的。当ADO封装DAO和RDO的 功能性的时候,必须将许多语言要素转换为ADO语法。在某些情况下,这将意味着现存代 码的某些功能的一个简单转换。在其他情况下,最佳的做法可能是用ADO的新功能重写该 应用程序。 包含在DAO和RDO模型中的许多功能被合并为单个对象,这样就生成了一个简单得 多的对象模型。与DAO和RDO不同的是,尽管ADO对象是分层结构的,但在分层结构范围之外也是可以创建的。不过,应当注意,ADO当前并不支持DAO的所有功能。ADO主要包括RDO风格的功能性,以便和OLE DB数据源交互,另外还包括远程和DHTML技术。 2.7 ADO新内容 ADO除了具备RDO在远程数据库访问的优越性,如异步查询、批处理更新、服务器侧的游 标、存储过程的调用及事务处理等,还有以下新内容: Recordset持久性通过记录集持久性,可将Recordset数据和数据元作为文件保存。随后使用持久文件重创建Recordset对象。持久文件可保存于本地驱动器、网络服务器或使用URL 的Web站点上。索引支持以及查找、排序和筛选对字段的索引可极大增强新Recordset对象 的Find方法以及Sort和Filter属性的性能。在ADO 2.0中,可通过设置Field对象的动态Optimize属性来为它创建内部索引。将CursorLocation设置为adUseClient时,该动态属性被添加到Field对象的Properties集合中。请注意该索引内置于ADO 2.0,因此无法对它进行 访问或用于其他方面。Sort属性决定移动Recordset行的顺序;Filter属性决定移动行时哪些 行是可用的;Find方法可在Recordset已索引的列(字段)中快速找出数值。这是对DAO方法的扩展,RDO不支持上述方法和属性。而且它也不是对任何的数据库都适用。 ADO事件ADO 2.0支持事件,事件是对某些操作将要或已经发生的通知。 有两类事件:ConnectionEvent和RecordsetEvent。Connection对象产生ConnectionEvent事件,而Recordset对象则产生RecordsetEvent事件。事件由事件处理程序例程处理,该例程在某个操作开始之前或结束之后被调用。 某些事件是成对出现的。开始操作前调用的事件名格式为WillEvent(Will事件),而操作结束后调用的事件名格式为EventComplete(Complete事件)。其余的不成对事件只在操作结束后发生(其名称没有任何固定模式)。事件处理程序由状态参数控制。附加信息由错误和对象参数提供。可以请求事件处理程序不接受第一次通知以后的任何通知。例如,可以 选择只接收Will事件或Complete事件。 在某种编程语言中,来自多个ADO对象的事件可以由一个事件处理程序处理。一个事件 也可以用多个事件处理程序处理,但不太常见。 分级游标和数据构形概述ADO 2.0推出了分级游标功能,通过该功能可将子Recordset对象定义为父Recordset中某个字段的值。 可以这样理解分级游标:假设有一个可视控件,如文件打开对话框,它可依分级方式显示文件和子目录。可将每一个目录都看作Recordset对象,并将该目录中的每个文件看作Field 对象;同样,将该目录中的每个子目录也看作Field对象,这样该对象的值就成为另一个Recordset。 ADO 2.0还推出了新的形状数据操作语言语法,它可以使查询结果表示为分级Recordset。 发出形状语言命令的方式与发出任何其他ADO命令字符串没有什么区别。形状语言内置于ADO客户端游标引擎中。将它的创建过程称为数据构形。使用形状语言,可通过两种途径创建分级Recordset对象。其一是将子Recordset追加到父Recordset,其二则是对子Recordset 进行合计操作并由此产生父Recordset。可将分级Recordset对象放置在所需的任何深度(即 创建子Recordset对象的子Recordset对象,如此继续)。通过程序或相应的可视控件访问已得出结果的分级Recordset。 2.8 ADO的发展趋势 所有的数据源都可以通过ADO来访问,在今天已逐渐成为现实。 VB访问数据库技术的历史综观过去的几年,使用Visual Basic的客户曾设计出数不胜数的程序和组件来建立商务解决方案。大约80%以上的应用程序是用来访问以下这些数据的:ASCII文本文件、SQL数据库以及大型机数据库。早期的Visual Basic数据访问工具只是简单的ASCII文件的访问工具,极少数SQL Server的前端应用程序是使用鲜为人知的数据接口VBSQL编写的。然而,在Visual Basic 3.0时代许多用户强调需转移访问包含远程数据源的ISAM数据,为此Microsoft设计了Microsoft Jet Database Engine(或简称为Jet)和Data Access Object(DAO),使得Visual Basic Access开发人员很容易地同Jet接口。直至前两 年,对Visual Basic和其使用者的需求又包含了更快的访问远程数据和对ODBC数据源访问的优化。 当选择在此讨论的哪种技术是最佳技术时,需要注意两点:代码的重用和开发者实现选择的数据库访问方案的能力。设计者常常为实现或追求一种更特别的性能而使用有更多控件的奇异方案,这样设计出来的应用程序只会支持起来更复杂或维护时更困难。开发人员和他们的管理人员需要在Visual Basic的开发小组和各种数据库接口开发小组中注意避免这种趋势。这些小组协调努力简化VB5中的数据访问接口会使程序的安全性和速度更好。VB6也包含了全新的查询连接生成器,即User Connection设计器,它使用Visual Basic新的ActiveX设计器体系结构,对要编程的数据访问提供设计时的支持。允许在设计时创建连接并查询对象(基于RDO rdoConnection和rdoQuery对象)。并把这些连接和查询对象当作工程级对象。可预先设置属性、定义新属性和方法并给对象编写代码来捕捉事件。 这不仅为响应由连接和查询而引起的事件,而且为在运行时调用已有存储过程和用户定义的查询提供了简单的方法。使用User Connection设计器这种技术,代码可减少10倍,性能却没有任何损失。 现在用VB6来建服务器端组件或前端应用程序,可以使用的数据库接口方案至少有九种。每一种方案都可满足用户特定的需要,比如特殊的数据源和用户开发的技能等。 Visual Basic访问数据库的现状下面的表格列出了目前在VB6中有效的数据访问接口方法,一部分是简单的应用程序接口界面(APIs),但大部分是组件对象模型界面(COM)。这两类数据库接口界面事实上在任何一种开发语言中都包括。 许多开发人员也使用一些数据库绑定的控件来实现一些简单重复的功能如:用户数据的输入、显示、筛选等接口界面。VB也支持对多种数据源访问的控件,这些控件在VB和COM界面接口之间起着媒介作用。这些控件提供了一种减少代码实现数据访问的途径,该方法简化了代码并使程序员不必亲自处理检索和更新数据的底层结构和机制。它赋予程序员很大的灵活性,因为可以使用同样的对象、属性和方法来处理各种不同的数据库格式。同时,如果从一种数据库格式变到另一种格式(例如,将本地的Microsoft Access数据库转换为网络上的SQL Server数据库),只需变动少量的代码就可以适应这种改变。甚至可以创建这样的应用程序,在单一的查询或报表中连接来自多个不同数据库的表。 Visual Basic访问数据库的前景近来随着Web应用软件的迅速发展和现有数据存储形式的多种多样,Visual Basic访问数据库的解决方案面临诸如快速提取分布于企业内部和外部有用商业信息等的多种挑战。为此Microsoft提出一种新的数据库访问策略,即“统一数据访问” (Universal Data Access)的策略。“统一数据访问”提供了高性能的存取包括关系型和非关系型在内的多种数据源,提供独立于开发工具和开发语言的简单的编程接口,这些技术使得企业集成多种数据源、选择更好的开发工具、应用软件、操作平台、建立容易维护的解决方案成为可能。 第三章 系统设计和功能介绍 3.1 系统的主要功能 3.1.1 功能模块 1)职工档案管理功能 职工档案管理部分包括基本档案、家庭成员、工作记录、奖惩记录、职称评定、培训记录和调动记录等七个方面组成。这一部分要完成的主要功能是员工信息的添加、修改、删除、查询。各管理部门的明细如下: (1)基本档案:职工编号、姓名、隶属部门、身份证号、性别、生日、年龄、民族、政治面貌、婚姻状况、文化程度、联系电话、家庭住址、E-mail、职工类型、工龄、开始工作时间、进入本单位时间、职称、职务、工资类型、银行帐号、医疗帐号、合同期 (2)家庭成员:成员姓名、与本人关系、出生日期、工作单位、职务、政治面貌、联系电话。 (3)工作记录:工作起始时间、结束时间、职务、工作单位、部门 (4)奖惩记录:奖惩类型、奖惩日期、奖惩原因、奖惩单位、撤消奖惩日期、撤消奖惩原因 (5)职称评定:职称名称、获取方式、获取日期、职务、聘用专业技术职务、聘用起始时间、聘用结束时间、聘用单位 (6)培训记录:培训方式、培训开始时间、培训结束时间、培训时间、培训专业、培训单位、培训内容、培训费、培训结果、 7)变动记录:工作调动日期、调动前部门、调动后部门、工资调动日期、调整前工 ( 资、调整后工资 2)管理部门 部门信息管理部分包括部门名称、部门负责人、负责人联系电话以及详细信息等。详细信息中罗列出每个部门中的员工的基本信息。在这个模块中,对部门信息可以做添加、修改、删除等操作,而对员工的信息只能浏览,不能修改。 3)查询统计 查询统计模块包括相关统计和职工基本信息查询两个内容 1)相关统计:可以统计出企业中符合某些条件的人数并且可以显示这些人员的基本 ( 档案。 (2)职员档案查询:可以通过职工名称,职工编号以及所在部门对职工的信息进行查询。 4)系统管理 设置操作人员。系统初始设置一个超级用户名和密码,操作人员可以利用这个超级用户登陆,之后,可以设置其他的超级用户,也可以设置权限用户,可以对权限用户进行添加或者删除。 此外,在系统程序设置登陆的界面中,输入密码与用户名不符3次将自动退出。 3.1.2 系统功能模块图 档案管理系统 职部查系 工门询统 档信统管 案息计理 管管管 理 理 理 职职职部部部部相职添删更 工工工门门门门关工加除改 档档档信信信详统档管管密 案案案息息息细计 案理理码 添修删添修删信查员 员 加 改 除 加 改 除 息 询 图,-, 系统功能模块图 3.2 运行主要界面 ,.,., 系统管理界面 运行本系统程序,首先出现登陆界面(图,-,),输入正确的用户名和密码后进入主窗体(图3-7)。 图3-2 登陆界面 “系统管理”菜单包含三个子菜单,分别是“设定用户(添加管理员)”、“删除管理员”和“更改密码”。 图3-3 添加用户界面 图3-4 删除用户界面 图3-5 更改密码界面 ,.,., 统计查询界面 统计查询菜单包括“ 资料 新概念英语资料下载李居明饿命改运学pdf成本会计期末资料社会工作导论资料工程结算所需资料清单 统计”和“职工档案查询”,“职工档案查询”又可以分成“按 姓名查询”、“按编号查询”和“按部门查询” 图3-6 统计界面 图3-7 查询界面 ,.,., 档案管理界面 主窗体的菜单栏中有档案管理、部门管理、查询统计、系统管理、系统信息5个菜单,主窗体左侧的表格控件用来显示当前员工,包括职工编号、职工姓名、所在部门。单击某条员工信息,则在主窗体右侧显示员工的基本信息。单击“更新”按钮,表格窗体刷新以获得更新后的数据。 图3-8 系统主窗体 要查看当前员工的详细资料,则蛋击主窗体中的“查看详细资料”按钮,打开详细资料窗体(图3-8)。职工档案详细资料包括个人资料、家庭成员、工作记录、奖惩记录、职称评定、培训记录、变动记录几个部分。这几个部分为于一个“选项卡”控件中,只是定位在不同的“选项标签”上。 图3-9 档案管理菜单 ,.,., 部门管理界面 图3-10 部门管理信息窗体 图3-11 部门详细信息窗体 3.3 系统设计部分代码 3.3.1 MSFlexgrid控件代码 MSFlexgrid控件用来显示所有员工的编号、姓名以及所属部门。这一部分功能应该在Form_load事件中实现: 首先应该打开数据表: Private Sub Form_load() „„ rs1.CursorLocation=adUseClient sq1=:select基本档案.employee_NO, 基本档案. employee_Name, 基本档案. employee_unit:&_:from order by . employee_NO:,选择基本档案中的职工 编号、姓名、部门 ,用于在表格中的显示 rs1.Open sq1,conn,adOpenKeyset,adLockPessimistic „„ End Sub 以上程序段用来打开基本档案表,其中rs1为用来在MSFlexgrid中显示数据所对应的Recordset对象,rs1.Open语句中的第一个参数为SQL语句,用一个字符串型的变量来表示,使用前要对其进行定义;第二个参数conn为Connection类别的对象变量,用来打开数据库。这两个变量在公共模块中定义。添加Module1,并填写如下语句即可: Option Explicit „„ Public conn As New ADODB.Connection Public rs1 As New ADODB.Recordset „„ 3.3.2 建立详细资料窗体 单击窗体中的“显示详细信息”按钮,进入详细资料窗体,当用户要添加新档案时,也通过这个窗体实现。由于此窗体有两种用途,一来是显示员工档案,二来是添加新的员工档案。因此窗体加载的时候也应该分两钟情况。为了区分这两种情况,可定义两个布尔型的全局变量show_arch和addinfo。当以“查看详细资料”按钮进入时,show_arch的 值为True,addinfo的值为False。当通过“添加职工档案”命令进入时,show_arch的值为false,addinfo的值为True。 首先在公共模块中添加这两个变量: Option Explicit Public selsct_row As String „„ Public show_arch As Boolean Public addinfo As Boolean ,标记是否处于“添加档案”状态 „„ 当单击“查看详细资料”按钮后,加载详细资料窗体,并设置标记值。代码如下: Private Sub Command1_Clock() show_arch=True addinfo=False „„ Form1.Show End Sub 当单击主窗体中的“档案管理”——>“添加职工档案”菜单进入窗体时,添加的代码如下: Private Sub archive_managent_Clock() Selsct_row=:: addinfo=True show_arch=False „„ Form1.Show End Sub 窗体加载后,控制按钮的部分也应该有两个状态。如果是做显示资料用,则“修改员工信息”、“删除员工档案”和“返回”按钮可以用,“保存”、“取消”按钮不可用。如果是处于添加状态则相反。因此,在窗体加载时还要设置按钮状态。在公共模块中定义一个布尔型的变量cmd_states来标记: Option Explicit „„ Public addinfo As Boolean ,标记是否处于“添加档案”状态 Public cmd_states As Boolean ,标记form1按钮的状态 在单击“查看详细资料”时设置cmd_states,代码如下: Private Sub Command1_Clock() „„ cmd_states=True Form1.Show End Sub 单击菜单“档案管理”——>“添加职工档案”时,代码如下: Private Sub archive_managent_Clock() „„ cmd_states=False Form1.Show End Sub 第四章 系统小结 本系统的开发打破了传统企业档案管理系统,节省了大量的工作量,减少了重复操作,减少了出现错误的几率,加强了档案记录的安全性和完整性,提高工作效率,实现企业档案管理的系统化、规范化和自动化。 本系统方便了企业对于职工的档案的管理,浏览、添加、删除、修改等操作简单直观,能基本符合企业档案管理的需求,在一定的时期内具有教好的发展前景。 本系统设置了超级用户和普通用户两种权限,普通用户只可以对系统进行浏览,查询以及少量的添加删除工作;超级用户除了拥有普通用户的功能以外还能对普通用户进行添加删除,还能对系统中的全部内容进行修改,删除和添加。 本系统完成企业档案管理系统中的几个常用的模块,不仅适于规模一般的企业的使用,也适用于大型企业。 参考文献 [1] 刘萌,周学明,郭安源,《Visual Basic企业办公系统开发实例导航》,人民邮电出版社,2003 [2] 求是科技,《Visual Basic 6.0 数据库开发技术与工程实践》,人民邮电出版社,2004 [3] 张瀚文,齐锦刚,《Visual Basic数据库系统开发实例与解析》,高等教育出版社,2003 [4] 刘瑞新,汪远征,《Visual Basic程序设计教程》,机械工业出版社,2001 [5] 孟小峰,王珊,《数据库系统导论》,机械工业出版社,2000 [6]Hector Garcia-Molina/Jeffrey.D.ullman, 《Database system inplementation》 , 机械工业出版社 [7] C.J.Date,《An introduction to Database System(Seventh Edition)》, 机械工业出版社 [8] 姚巍,《Visual Basic数据库开发及工程实例》,人民邮电出版社 [9] 伍俊良,《VB课程设计与系统开发安例》,清华大学出版社 附录 系统使用说明: 1. 本系统的超级用户名称为aa,初始密码为aa。 2. 本系统的普通用户名称为bb,初始密码为bb。 3. 超级用户进入系统后可以运行系统中全部内容,普通用户进入后无法使用系统中的“添 加用户”,“添加管理员”,“删除管理员”等功能。 There were seventeen officers in all riding in this race. The racecourse was a large four-versta ring in the form of an ellipse in front of the pavilion. On this course nine obstacles had been arranged: the stream, a big and solid barrier two arsheenes high, just before the pavilion, a dry ditch, a ditch full of water, a precipitous slope, an Irish barricade (one of the most difficult obstacles, consisting of a mound fenced with brushwood, beyond which was a ditch out of sight for the horses, so that the horse had to clear both obstacles or possibly be killed); then two more ditches filled with water, and one dry one; and the end of the race was just facing the pavilion. But the race began not in the ring, but a hundred arsheenes away from it, and in that part of the course was the first obstacle, a dammed-up stream, three arsheenes in breadth, which the racers could leap or wade through as they preferred. Three times they were ranged ready to start, but each time some horse thrust itself out of line, and they had to begin again. The starter, Colonel Sestrin, was beginning to lose his temper, when at last, for the fourth time, he shouted `Away!' and the riders started. Every eye, every opera glass, was turned on the brightly colored group of riders at the moment they were in line to start. `They're off! They're starting!' was heard on all sides after the hush of expectation. And little groups and solitary figures among the public began running from place to place to get a better view. In the very first minute the close group of horsemen spread out, and it could be seen that they were approaching the stream in twos and threes and one behind another. To the spectators it seemed as though they had all started simultaneously, but to the racers there were seconds of difference that had great value to them. Frou-Frou, excited and overnervous, had lost the first moment, and several horses had started before her, but before reaching the stream, Vronsky, who was holding in the mare with all his force as she tugged at the bridle, easily overtook three, and there were left in front of him Makhotin's chestnut Gladiator, whose hindquarters were moving lightly and rhythmically up and down exactly in front of Vronsky, and, in front of all, the dainty mare Diana bearing the more dead than alive Kuzovlev. For the first instant Vronsky was not master either of himself or his mare. Up to the first obstacle, the stream, he could not guide the motions of his mare. Gladiator and Diana came up to it together and almost at the same instant; at a stroke they rose above the stream and flew across to the other side; Frou-Frou darted after them easily, as if flying; but at the very moment when Vronsky felt himself in the air, he suddenly saw almost under his mare's hoofs Kuzovlev, who was floundering with Diana on the further side of the stream. (Kuzovlev had let go the reins as he took the leap, and the mare had fallen together with him over her head.) Those details Vronsky learned later; at the moment all he saw was that just under him, where Frou-Frou must alight, Diana's legs or head might be in the way. But Frou-Frou drew up her legs and back in the very act of leaping, like a falling cat, and, clearing the other mare, alighted beyond her. `Oh, you darling!' flashed through Vronsky's head. After crossing the stream Vronsky had complete control of his mare, and began holding her in, intending to cross the great barrier behind Makhotin, and to try to overtake him in the clear ground of about two hundred sazhenes that followed it. The great barrier stood just in front of the Imperial Pavilion. The Czar and the whole Court, and crowds of people, were all gazing at them - at him, and at Makhotin, a length ahead of him, as they drew near the `devil,' as the solid barrier was called. Vronsky was aware of those eyes fastened upon him from all sides, but he saw nothing except the ears and neck of his own mare, the ground racing to meet him, and the back and white legs of Gladiator beating time swiftly before him, and keeping always the same distance ahead. Gladiator rose, with no sound of knocking against anything. With a wave of his short tail he disappeared from Vronsky's sight. `Bravo!' cried a voice. At the same instant, under Vronsky's eyes, right before him flashed the palings of the barrier. Without the slightest change in her action his mare flew over it; the palings vanished, and he heard only a crash behind him. The mare, excited by Gladiator's keeping ahead, had risen too soon before the barrier, and grazed it with one of her hind hoofs. But her pace never changed, and Vronsky, feeling a spatter of mud in his face, realized that he was once more the same distance from Gladiator. Once more he perceived in front of him the same back and short tail, and again the same swiftly moving white legs that got no further away. At the very moment when Vronsky thought that now was the time to overtake Makhotin, Frou-Frou herself, understanding his thoughts, without any incitement on his part, gained considerably, and began getting alongside of Makhotin on the most favorable side, close to the inner rope. Makhotin would not let her pass that side. Vronsky had hardly formed the thought that he could perhaps pass on the outer side, when Frou-Frou shifted her pace and began overtaking him on the other side. Frou-Frou's shoulder, beginning by now to be dark with sweat, was even with Gladiator's back. For a few bounds they moved evenly. But before the obstacle they were approaching, Vronsky began working at the reins, anxious to avoid having to take the outer circle, and swiftly passed Makhotin just upon the declivity. He caught a glimpse of his mud-stained face as he flashed by. He even fancied that he smiled. Vronsky passed Makhotin, but he was immediately aware of him close upon him, and he never ceased hearing just behind him the even-thudding hoofs and the rapid and still quite fresh breathing of Gladiator. The next two obstacles, the watercourse and the barrier, were easily crossed, but Vronsky began to hear the snorting and thud of Gladiator closer upon him. He urged on his mare, and to his delight felt that she easily quickened her pace, and the thud of Gladiator's hoofs was again heard at the same distance away. Vronsky was at the head of the race, just as he wanted to be and as Cord had advised, and now he felt sure of being the winner. His excitement, his delight, and his tenderness for Frou-Frou grew keener and keener. He longed to look round, but he did not dare do this, and tried to be cool and not to urge on his mare, so as to keep the same reserve of force in her as he felt that Gladiator still kept. There remained only one obstacle, the most difficult; if he could cross it ahead of the others, he would come in first. He was flying toward the Irish barricade; Frou-Frou and he both together saw the barricade in the distance, and both the man and the mare had a moment's hesitation. He saw the uncertainty in the mare's ears and lifted the whip, but at the same time felt that his fears were groundless; the mare knew what was wanted. She quickened her pace and rose rhythmically, just as he had fancied she would, and as she left the ground gave herself up to the force of her rush, which carried her far beyond the ditch; and with the same rhythm, without effort, with the same leg forward, Frou-Frou fell back into her pace again. `Bravo, Vronsky!' he heard shouts from a knot of men - he knew they were his friends and his regiment comrades - who were standing at the obstacle. He could not fail to recognize Iashvin's voice, though he did not see him. `O my sweet!' he said inwardly to Frou-Frou, as he listened for what was happening behind. `He's cleared it!' he thought, catching the thud of Gladiator's hoofs behind him. There remained only the last ditch, filled with water and two arsheenes wide. Vronsky did not even look at it, but anxious to come in a long way ahead began sawing away at the reins, lifting the mare's head and letting it go in time with her paces. He felt that the mare was at her very last reserve of strength; not her neck and shoulders merely were wet, but the sweat was standing in drops on her mane, her head, her sharp ears, and her breath came in short, sharp gasps. But he knew that she had strength left more than enough for the remaining two hundred sazhenes. It was only from feeling himself nearer the ground and from the peculiar smoothness of his motion that Vronsky knew how greatly the mare had quickened her pace. She flew over the ditch as though not noticing it. She flew over it like a bird; but at the same instant Vronsky, to his horror, felt that failing to keep up with the mare's pace, he had, he did not know how, made an abominable, unpardonable move in recovering his seat in the saddle. All at once his position had shifted and he knew that something awful had happened. He could not yet make out what had happened, when the white legs of a chestnut horse flashed by close to him, and Makhotin passed at a swift gallop. Vronsky was touching the ground with one foot, and his mare was sinking on that foot. He just had time to free his leg when she fell on one side, gasping painfully, and, making vain efforts to rise with her delicate, soaking neck, she fluttered on the ground at his feet like a shot bird. The clumsy movement made by Vronsky had broken her back. But that he only knew much later. At that moment he knew only that Makhotin had flown swiftly by, while he stood staggering alone on the muddy, motionless ground, and Frou-Frou lay gasping before him, bending her head back and gazing at him with her exquisite eye. Still unable to realize what had happened, Vronsky tugged at his mare's reins. Again she struggled all over like a fish, and, her shoulders making the wings of the saddle crackle, she rose on her front legs; but unable to lift her back, she quivered all over and again fell on her side. With his face hideous with passion, pale, his lower jaw trembling, Vronsky kicked her with his heel in the stomach and again fell to tugging at the rein. She did not stir, but thrusting her nose into the ground, she simply gazed at her master with her speaking eyes. `A-a-a!' groaned Vronsky, clutching at his head. `Ah! what have I done!' he cried. `The race lost! And my fault! shameful, unpardonable! And the poor darling, ruined mare! Ah, what have I done!' A crowd of men, a doctor and his assistant, the officers of his regiment, ran up to him. To his misery he felt that he was whole and unhurt. The mare had broken her back, and it was decided to shoot her. Vronsky could not answer questions, could not speak to anyone. He turned, and without picking up his fallen cap, walked away from the racecourse, unconscious of where he was going. He felt utterly wretched. For the first time in his life he knew the bitterest sort of misfortune, misfortune beyond remedy, and caused by his own fault. Iashvin overtook him with his cap, and led him home, and half an hour later Vronsky had regained his self-possession. But the memory of that race remained for long in his heart, the cruelest and PART TWO Chapter 29 Everyone was loudly expressing disapprobation, everyone was repeating a phrase someone had uttered: `The lions and gladiators will be the next thing,' and everyone was feeling horrified; so that when Vronsky fell to the ground, and Anna moaned aloud, there was nothing very much out of the way in it. But afterward a change came over Anna's face which really went beyond decorum. She utterly lost her head. She began fluttering like a caged bird, at one moment wanting to get up and move away, and at the next turning to Betsy. `Let us go, let us go!' she said. But Betsy did not hear her. She was bending down, talking to a general who had come up to her. Alexei Alexandrovich went up to Anna and courteously offered her his arm. `Let us go, if you like,' he said in French, but Anna was listening to the general and did not notice her husband. `He's broken his leg too, so they say,' the general was saying. `This surpasses everything.' Without answering her husband, Anna lifted her opera glass and gazed toward the place where Vronsky had fallen; but it was so far off, and there was such a crowd of people about it, that she could make out nothing. She put down the opera glass, and would have moved away, but at that moment an officer galloped up and made some announcement to the Czar. Anna craned forward, listening. `Stiva! Stiva!' she cried to her brother. But her brother did not hear her. Again she would have moved away. `Once more I offer you my arm if you want to be going,' said Alexei Alexandrovich, reaching for her hand. She drew back from him with aversion, and without looking at his face answered: `No, no, leave me alone - I'll stay.' She saw now that from the place of Vronsky's accident an officer was running across the course toward the pavilion. Betsy waved her handkerchief to him. The officer brought the news that the rider was not killed, but that the back of the horse had been broken. On hearing this Anna sat down hurriedly, and hid her face in her fan. Alexei Alexandrovich saw that she was weeping, and could not control her tears, nor even the sobs that were shaking her bosom. Alexei Alexandrovich stood so as to screen her, giving her time to recover herself. `For the third time I offer you my arm,' he said to her after a short interval, turning to her. Anna gazed at him and did not know what to say. Princess Betsy came to her rescue. `No, Alexei Alexandrovich; I brought Anna and I promised to take her home,' put in Betsy. `Excuse me, Princess,' he said smiling courteously, but looking her very firmly in the face, `but I see that Anna's not very well, and I wish her to come home with me.' Anna looked about her in a frightened way, got up submissively, and laid her hand on her husband's arm. `I'll send to him and find out, and let you know,' Betsy whispered to her. As they left the pavilion, Alexei Alexandrovich, as always, talked to those he met, and Anna had, as always, to talk and answer; but she was utterly beside herself, and moved hanging on her husband's arm, as though in a dream. `Is he killed or not? Is it true? Will he come or not? Shall I see him today?' she was thinking. She took her seat in her husband's carriage in silence, and in silence drove out of the press of carriages. In spite of all he had seen, Alexei Alexandrovich still did not allow himself to consider his wife's real condition. He merely saw the outward symptoms. He saw that she was behaving unbecomingly, and considered it his duty to tell her so. But it was very difficult for him not to say more, to tell her nothing but that. He opened his mouth to tell her she had behaved unbecomingly, but he could not help saying something utterly different. `What an inclination we all have, though, for these cruel spectacles! he said. `I observe...' `Eh? I don't understand,' said Anna contemptuously. He was offended, and at once began to say what he had meant to say. `I am obliged to tell you...' he began. `So now we are to have it out,' she thought, and she felt frightened. `I am obliged to tell you that your behavior has been unbecoming today,' he said to her, in French. `In what way has my behavior been unbecoming?' she said aloud, turning her head swiftly and looking him straight in the face, not with the bright expression that seemed covering something, but with a look of determination, under which she concealed with difficulty the dismay she was feeling. `Be careful,' he said, pointing to the open window opposite the coachman. He got up and pulled up the window. `What did you consider unbecoming?' she repeated. `The despair you were unable to conceal at the accident to one of the riders.' He waited for her to retort, but she was silent, looking straight before her. `I have already begged you so to conduct yourself in society that even malicious tongues can find nothing to say against you. There was a time when I spoke of your inward attitude, but I am not speaking of that now. Now I speak only of your external attitude. You have behaved improperly, and I would wish it not to occur again.' She did not hear half of what he was saying; she felt panic-stricken before him, and was thinking whether it was true that Vronsky was not killed. Was it of him they were speaking when they said the rider was unhurt, but that the back of the horse had been broken? She merely smiled with a forced smile when he finished, and made no reply, because she had not heard what he said. Alexei Alexandrovich had begun to speak boldly, but as he realized plainly what he was speaking of, the dismay she was feeling infected him too. He saw the smile, and a strange misapprehension came over him. `She is smiling at my suspicions. Yes, she will tell me directly what she told me before; that there is no foundation for my suspicions, that the whole thing is absurd.' At that moment, when the revelation of everything was hanging over him, there was nothing he expected so much as that she would answer mockingly, as before, that his suspicions were absurd and utterly groundless. So terrible to him was what he knew that now he was ready to believe anything. But the expression of her face, scared and gloomy, did not now promise even deception. `Possibly I was mistaken,' said he. `If so, I beg your pardon.' `No, you were not mistaken,' she said slowly, looking desperately into his frigid face. `You were not mistaken. I was in despair, nor could I help being in despair. I am listening to you, but I am thinking of him. I love him, I am his mistress; I can't bear you; I'm afraid of you, and I hate you... You can do what you like to me.' And dropping back into the corner of the carriage, she broke into sobs, hiding her face in her hands. Alexei Alexandrovich did not stir, and kept looking straight before him. But his whole face suddenly bore the solemn rigidity of the dead, and his expression did not change during the whole time of the drive home. On reaching the house he turned his head to her, still with the same expression. `Very well! But I expect a strict observance of the external forms of propriety till such time' - his voice shook - `as I may take measures to secure my honor, and communicate them to you.' He got out first and helped her to get out. Before the servants he pressed her hand, took his seat in the carriage, and drove back to Peterburg. Immediately afterward a footman came from Princess Betsy and brought Anna a note. `I sent to Alexei to find out how he is, and he writes me he is quite well and unhurt, but in despair.' `So he will be here,' she thought. `What a good thing I told him all.' She glanced at her watch. She had still three hours to wait, and the memories of their last meeting set her blood in flame. `My God, how light it is! It's dreadful, but I do love to see his face, and I do love this fantastic light.... My husband! Oh! yes... Well, thank God! everything's at an end with him.' PART TWO Chapter 5 `This is rather indiscreet, but it's so charming that one is awfully tempted to tell the story,' said Vronsky, looking at her with laughing eyes. `I don't intend to mention any names.' `But I shall guess them - so much the better.' `Listen, then: two festive young men were driving along...' `Officers of your regiment, of course?' `I didn't say they were officers - just two young men who had been lunching.' `In other words, drinking.' `Possibly. They were driving on their way to dinner with a friend in the gayest of moods. And they catch sight of a pretty woman in a hired sleigh, who overtakes them, looks back at them, and - so it seemed to them, at any rate - nods to them and laughs. They, of course, follow her - galloping at full speed. To their amazement, the fair one alights at the entrance of the very house to which they were going. The fair one darts upstairs to the top floor. All they got was a glimpse of rosebud lips under a short veil, and of exquisite little feet.' `You tell this with such feeling that it seems to me you yourself must have been one of the two.' `But what did you tell me just now?... Well, the young men enter their comrade's apartment - he was giving a farewell dinner. There they certainly did take a drop too much, as is always the case at farewell dinners. And at dinner they inquire who lives at the top in that house. No one knows; only their host's valet, in answer to their inquiry whether any ``young ladies' are living on the top floor, answered that there were a great many of them. After dinner the two young men go into their host's study, and write a letter to the fair unknown. They composed a passionate epistle, really a declaration, and then carry the letter upstairs themselves, so as to explain whatever might prove not altogether clear in the letter.' `Why do you tell me such nasty things? And then?' `They ring. A maidservant opens the door, they hand her the letter, and assure her that they're both so enamored that they'll die on the spot at the door. The maid, stupefied, carries on the negotiations. Suddenly a gentleman appears - with side whiskers like country sausages, he is as red as a lobster and, informing them that there is no one living in that flat except his wife, he sends them both packing.' `How do you know he had side whiskers like sausages, as you put it?' `Ah, do but listen. Recently I went to make peace between them.' `Well, and what was the upshot?' `That's the most interesting part. This couple turned out to be a most happy one - a government clerk and his lady. The government clerk lodges a complaint, whereupon I become a mediator - and what a mediator!... I assure you Talleyrand was a nobody compared to me.' `Just what was the difficulty?' `Ah, do but listen.... We make fitting apologies: ``We are in despair; we entreat forgiveness for the unfortunate misunderstanding.'' The government clerk with the country sausages begins to melt, and he, too, desires to express his sentiments, but no sooner does he begin to express them than he gets heated and says nasty things, and again I'm obliged to trot out all my diplomatic talents. ``I agree that their action was bad, but I beg of you to take into consideration the misunderstanding, and their youth; besides, the young men had just come from their lunch. You understand. Their repentance is heartfelt and they beg you to forgive their misbehavior.'' The government clerk was softened once more. ``I consent, Count, and am ready to forgive but you must understand that my wife - my wife! - a respectable woman is subjected to annoyances, and insults, and impertinences by certain milksops, scou-...'' Yet, you understand, the milksop is present, and it is up to me to make peace between them. Again I trot out all my diplomacy, and again, just as the matter is about to be concluded, our friend the government clerk gets heated and turns red while his country sausages bristle up, and I once more exert diplomatic finesse.' `Ah, you must hear this story!' said Betsy, laughing, to a lady who was entering the box. `He has made me laugh so much... Well, bonne chance!' she added, giving Vronsky the one finger free from holding her fan, and with a shrug of her shoulders letting down the bodice of her gown, that had worked up, so as to be fittingly and fully nude as she moved forward, toward the footlights, into the lights of the gas, and within the ken of all. Vronsky drove to the French theater, where he really had to see the colonel of his regiment, who never missed a single performance there; he wanted to talk over his peacemaking, which had been occupying and amusing him for the last three days. Petritsky, whom he liked, was implicated in the affair, as well as another fine fellow and excellent comrade, who had lately joined the regiment - the young Prince Kedrov. But, mainly, the interests of the regiment were involved as well. Both culprits were in Vronsky's squadron. The colonel of the regiment had received a call from the government clerk, Venden, with a complaint against his officers, who had insulted his wife. His young wife, as Venden told the story - he had been married half a year - had been at church with her mother, and, suddenly feeling indisposed, due to her interesting condition, found that she could not remain standing and drove home in the first sleigh with the mettlesome coachman she came across. It was then that the officers set off in pursuit of her; she was alarmed, and, feeling still worse, ran home up the staircase. Venden himself, on returning from his office, had heard a ring at their bell and voices, had stepped out, and seeing the intoxicated officers with a letter, he had pushed them out. He was asking that the culprits be severely punished. `You may say what you will,' said the colonel to Vronsky, whom he had invited to come and see
本文档为【企业档案管理系统】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_266065
暂无简介~
格式:doc
大小:218KB
软件:Word
页数:47
分类:工学
上传时间:2017-09-30
浏览量:21