首页 家庭理财系统的设计与实现—毕业设计论文

家庭理财系统的设计与实现—毕业设计论文

举报
开通vip

家庭理财系统的设计与实现—毕业设计论文家庭理财系统的设计与实现—毕业设计论文 图家庭理财系统的设计与实现 摘 要 全球经济的蓬勃发展带来了金融理财领域的巨大变革和创新,新的金融工具和理财观点不断产生,迅速地刷新着家庭与个人传统的理财观念。改革开放以来,我国社会经济的发展和居民收入水平得到了很大的提高,家庭理财活动已成为居民生活的重要内容。人们迫切需要一个能充分利用计算机优势,并可以管理家庭财务的软件平台,利用这个平台使得个人的财务有了明晰的收支情况的系统。 家庭理财系统采用VS2005作为开发工具,采用SQL SERVER 2000开发后台数据...

家庭理财系统的设计与实现—毕业设计论文
家庭理财系统的设计与实现—毕业设计论文 图家庭理财系统的设计与实现 摘 要 全球经济的蓬勃发展带来了金融理财领域的巨大变革和创新,新的金融工具和理财观点不断产生,迅速地刷新着家庭与个人传统的理财观念。改革开放以来,我国社会经济的发展和居民收入水平得到了很大的提高,家庭理财活动已成为居民生活的重要内容。人们迫切需要一个能充分利用计算机优势,并可以管理家庭财务的软件平台,利用这个平台使得个人的财务有了明晰的收支情况的系统。 家庭理财系统采用VS2005作为开发工具,采用SQL SERVER 2000开发后台数据库。主要包含了用户登录模块、用户管理模块、数据库备份模块、收入模块、支出模块、密码管理模块、帐目统计模块、报 关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf 输出模块以及查询模块。用户能够通过这些模块所提供的功能,完成相应的操作,满足家庭内部对家庭理财需求。 关键词:家庭理财;收入;支出;查询;VS2005;数据库;模块 Design and Implementation of Family Financial Management System Abstract The flourish development of the global economy has brought great transform and innovation of financial transactions, new financial instruments and financial perspectives are evolving rapidly to surpass the traditional family and personal financial management concepts in China. Since the 1980s last century, with the development of China’s economy, Chinese people’s income level has been greatly improved. Family financial management has become an important part of Chinese people’s life. There was an urgent need to use all the advantages of the computer, which can manage family finances’ system, which can clearly reflect individuals financial conditions. This system uses VS2005 as a development tool, SQL Server 2000 database development background. It contains the user landing module, user information management module, database backup module, income module, output management module, user password management module, accounts statistics module, report forms export module and inquire module. System users can be satisfied by the system, which can meet the internal management of the family financial management needs through these modules and the functions in the system. Key words: Family Financial Management; Income; Payout; Inquire; VS2005; Database; Module 目 录 1 引言............................................................................................................................................... 1 1.1 课题背景 ................................................................................................................................ 1 1.2 国内外研究的现状 ................................................................................................................ 1 1.3 本课题研究的意义 ................................................................................................................ 1 1.4 本课题的研究方法 ................................................................................................................ 1 2 可行性研究 ................................................................................................................................... 2 2.1 技术可行性 ............................................................................................................................ 2 2.2 经济可行性 ............................................................................................................................ 2 2.3 操作上的可行性 .................................................................................................................... 3 3 系统需求分析 ............................................................................................................................... 3 3.1 系统功能需求分析 ................................................................................................................ 3 3.2 数据流图 ................................................................................................................................ 4 3.3 系统数据库表设计 ................................................................................................................ 5 3.3.1 用户表(UserInfo) ..................................................................................................... 5 3.3.2 用户信息表(UserMessage) ...................................................................................... 5 3.3.3 收入类型表 (ClassInputChashTable) ...................................................................... 5 3.3.4 支出类型表(ClassOutputChashTable) ..................................................................... 5 3.3.5 收入表(InputChashTable) .............................................................................................. 6 3.3.6 成员登录信息表(MemberName) .................................................................................. 6 3.3.7 支出表(OutputChashTable) ........................................................................................... 6 4 系统功能的设计与实现 ............................................................................................................... 6 4.1 系统登录界面的设计 ............................................................................................................ 7 4.1.1 登录界面 ........................................................................................................................ 7 4.1.2 登录功能的实现 ............................................................................................................ 7 4.2 用户信息管理模块的设计 .................................................................................................... 8 4.3 密码管理模块的设计 ............................................................................................................ 9 4.4 数据库备份模块的设计 ...................................................................................................... 10 4.5 收入模块的设计 .................................................................................................................. 11 4.5.1 添加收入记录 .............................................................................................................. 12 4.5.2 删除收入记录 .............................................................................................................. 12 4.6 支出模块的设计 .................................................................................................................. 13 4.6.1 添加支出记录 .............................................................................................................. 14 4.6.2 删除支出记录 .............................................................................................................. 14 帐目统计模块的设计 .......................................................................................................... 14 4.7 4.8 查询模块的设计 .................................................................................................................. 15 4.9 报表输出模块的设计 .......................................................................................................... 17 5 系统测试结果 ............................................................................................................................. 17 结 论......................................................................................................................................... 18 参考文献......................................................................................................................................... 18 致 谢......................................................................................................................................... 19 声 明......................................................................................................................................... 20 1 引言 1.1 课题背景 家庭理财系统,即Family Conduct Financial Transactions System。它利用计算机技术技术,使家庭理财逐步信息化,从而形成由家庭成员与计算机共同构成服务于家庭的人机信息财务管理系统。随着计算机发展,家庭理财系统已经成为很多家庭财务管理的一个重要途径。计算机的最大优点在于利用它能够高效准确地进行财务信息管理。使用计算机进行信息财务管理,不仅提高了工作效率,而且大大的提高了其安全性。 1.2 国内外研究的现状 家庭理财系统在国外很多地方使用已经相当的普遍,而且国外的家庭理财系统功能相当强大,比如系统里包含有股票的预测、基金的分析等等。在我们国内,尤其是在近几年,伴随着计算机的高速普及,家庭理财系统的使用范围逐步扩大,从最早的简单使用纸笔记录家庭、个人财务的收支情况,到现在用计算机对财务的收支、查询、汇总等等。巨大的市场需求也促使了很多公司加大了对家庭理财系统的研究。 1.3 本课题研究的意义 多年以来人们都使用传统的人工方式记录和管理家庭或自己财务情况。这种管理和记录方式不仅不便于长期保存,也存在着不可避免的缺点,如效率太低、保密性太差。时间一长,伴随着居民收入水平的提高和居民各种消费和收入的多样性,家庭理财所需要管理的信息就会越来越多,就会产生大量的文件和数据,这样就会对查阅、更新、保存等方面都产生不少的困难。随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已逐渐被人们认识并掌握。如果使用计算机对家庭理财信息进行管理具有传统的手工管理所没法比拟的优点。例如:统计方便、查找容易、可靠性高、保密性好、更新方便等。这些优点能够极大地提高家庭理财信息管理的效率,大大降低居民在信息管理精力上的投入,使企业获得更大的利润空间。因此,开发一个能够管理家庭内部各种财务信息的家庭理财管理系统是一件十分必要的事情。 1.4 本课题的研究方法 家庭理财系统的用户群体是家庭内部成员,用户类型单一,因此将本系统设计成一个相对封闭的单机运行系统结合居民管理信息方面的具体需求,利用VS2005作为前台开发工具,使用SQL SERVER 2000作为数据库。结合数据库原理及应用、软件工程开发方法,在经过深入地学习之后,开发了这套家庭理财管理系统。下面将具体介绍系统的开发过程: 第 1 页 共 20 页 2 可行性研究 2.1 技术可行性 本系统的开发利用VS2005作为开发工具。VS2005是一个具有完善开发工具的平台。VS2005提供的工具适合各种水平层次无论是初学者还是有经验的团队,并适合各种不同的开发需求。降低了开发的复杂度,其提供给开发者更加简便动态的.Net Framework基础解决 方案 气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载 ,其中包括了windows应用程序开发、office嵌入开发、Web应用开发、移动应用程序开发。改进了团队交流方式,VS2005为团队开发提供通道和完整的开发周期工具,从而增加了团队内部的交流与协作的效率。通过学习,熟悉和掌握VB.NET的使用方法,使用VS2005作为开发工具将使整个系统的模块化设计变得更加简便。 系统采用SQL SERVER 2000作为开发数据库。SQL SERVER 2000是一种客户机/服务器结构的关系数据库管理系统。SQL SERVER 2000提供了许多易于使用的图形化工具和向导,其中最常用的是服务管理器、企业管理器和查询分析器。它们为创建和管理数据库带来了很大的方便。 在技术难度方面,有指导老师的指导、周围同学的热心帮助,加上对很多相关文献的参考,能够解决开发过程中所遇到的困难。 2.2 经济可行性 如今,随着计算机的大量普及,各种软件的开发成本越来越低,价格也越来越底。本系统也是这样,开发成本较低,只是需要一台配置一般的计算机,该系统运行时占计算机的资源也不多,但并不会因为开发成本低而造成系统功能性能的下降。相反,随着计算机技术的发展,各种实用软件的性能日渐提高。家庭理财管理系统廉价的开发成本,却能够为居民带来相当大的实惠和方便。主要表现在: (1)本系统可以说是一个拥有多种实用功能的家庭理财管理信息系统,它集成了家庭成员管理、收入管理、支出管理、密码管理等多种功能,具有较强的实用性和方便性。 (2)本系统的运行可以大大提高居民管理财务的效率,减少不必要的人力和物力。 (3)本系统还具有查询和统计功能,能够查询到用户在一段特定时间内收入和支出的情况,特别是支出情况,有时往往会让用户在月底吓一跳,大大超出预算,还弄不清钱都花到哪里了,有了家庭理财系统,不仅使用户对口袋里钱的去向一目了然,而且可以渐渐悟到一些心得,摸清哪些花费是必要的,哪些“意外开支”是可以避免的,哪笔开支是可继续评估其必要性的。 由此,可以得出,本系统在经济上是绝对具有可行性。 第 2 页 共 20 页 2.3 操作上的可行性 由于本系统管理的对象比较明确,就是对于收入支出的一些管理,主要就是对数据库的操作,且每个数据库内容具有较强的关联性,设计的过程也不复杂。因此,整个软件的使用非常简便。任何一个普通的计算机用户都能很快的熟悉整个软件的使用。并且本系统所耗费的资源非常小,任何家庭成员只需要在一般的电脑上面,就能够使用这个软件,简单、方便、快捷的实现对财务信息进行管理。 3 系统需求分析 3.1 系统功能需求分析 家庭理财管理系统是针对用户要求用计算机,对自己的财务的收入、支出以及相关的各种信息,进行记录、修改、添加、删除而设计的一种现代化管理软件。 通过需求分析,本系统需要具有以下功能: (1)由于一项新的软件在被使用之前,对于使用者来说是陌生和崭新的,所以要求系统具有良好的人机界面。 (2)能够家庭理财管理系统的各项功能,能成功的对用户各种信息进行管理。 (3)查询、修改、删除、添加数据方便,数据的稳定性和可靠性好。 具体说来,要求本系统具有以下几个功能模块:用户登录模块、用户管理模块、数据库备份模块、收入模块、支出模块、密码管理模块、账目统计模块、报表输出模块以及查询模块。系统整体的简单关系图如下所示: 用户登录模块 用户管理模块 家 数据库备份模块 庭 理 收入模块 财 信 支出模块 息 系 密码管理模块 统 账目管理模块 报表输出模块 查询模块 图1 家庭理财管理系统模块划分图 第 3 页 共 20 页 各模块具体的需求描述如下: (1)用户登录模块 用户登录:验证用户的信息是否合法,以及验证用户是否为系统的合法用户。 (2)用户管理模块 在系统中主要包括添加用户。 (3)数据库备份模块 主要对数据库里的数据进行备份。 (4)收入模块 主要实现对收入记录的添加、删除、修改。 )支出模块 (5 主要实现对收入记录的添加、删除、修改。 (6)密码管理模块 在系统中主要包括用户修改密码。 (7)账目统计模块 主要对总收入、总支出、余额管理。 (8)报表输出模块 主要实现对收入、支出记录的输出及打印。 (9)查询模块 主要实现对收入、支出记录按时间按类型查询等。 3.2 数据流图 根据系统中收入、支出模块内对收入记录、支出记录具体操作和功能之间的 关系,可以得出如下图2所示的数据流图: 添加、修改、删 除两表信息 用 收入表、支出表 户 数据库 添加、修改、删 除的结果 图2 数据流图 第 4 页 共 20 页 3.3 系统数据库表设计 本系统是一个关于家庭理财信息的管理系统,主要包括收入、支出的管理。 所以,所设计数据库表的时候设计了用户表、用户信息表、收入类型表、支出类 型表、收入表、支出表、用户登录表用来存储对应的信息。 3.3.1 用户表(UserInfo) 表1角色表 字段名称 数据类型 字段说明 键引用 UserID int 用户ID UserNum varchar 用户编号 UserName varchar 用户名 3.3.2 用户信息表(UserMessage) 表2用户信息表 字段名称 数据类型 字段说明 键引用 UserID varchar 用户ID UserAddress varchar 用户地址 Birthday datetime 用户生日 WorkAddress varchar 工作地址 WorkPhone numeric 工作电话 UserName varchar 用户名 3.3.3 收入类型表 (ClassInputChashTable) 表3收入类型表 字段名称 数据类型 字段说明 键引用 ClassID numeric 支出类型编号 ClassName varchar 支出类型名称 3.3.4 支出类型表(ClassOutputChashTable) 表4支出类型表 字段名称 数据类型 字段说明 键引用 ClsaaID numeric 分类ID ClassName varchar 分类名称 第 5 页 共 20 页 3.3.5 收入表(InputChashTable) 表5收入表 字段名称 数据类型 字段说明 键引用 UserID varchar 编号 ID int 编号 InputName varchar 收入者 InputComesFrom numeric 收入来源 InputChash varchar 收入金额 InputForms varchar 收入类型 InputContent varchar 备注 InputDateTime datetime 时间 ClassID numeric 收入类型编号 3.3.6 成员登录信息表(MemberName) 表6成员登录信息表 字段名称 数据类型 字段说明 键引用 ID int 编号 UserPassword char 密码 PassName numeric 登录名 3.3.7 支出表(OutputChashTable) 表7支出表 字段名称 数据类型 字段说明 键引用 UserID varchar 编号 ID int 编号 OutputName varchar 支出用途 OutputChash numeric 支出金额 UserName varchar 支出者 OutputContent varchar 备注 OutputDateTime datetime 时间 ClassID numeric 支出类型编号 4 系统功能的设计与实现 本系统主要包括对登录模块的设计、用户管理模块的设计、用户密码管理模 块的设计、数据库备份管理模块的设计、收入模块的设计、支出模块的设计、帐 目统计模块的设计、查询模块的设计以及报表输出模块的设计。具体如下: 第 6 页 共 20 页 4.1 系统登录界面的设计 4.1.1 登录界面 系统登录界面也是本家庭理财管理系统的第一个界面,其界面如下: 图3 登录界面 此界面是用户进入系统首先需要经过的界面,用户在正确地输入自己的用户名和密码后,便可进入系统的主界面,用户可以通过这个界面进入主页面与其它模块进行接触,对系统内的各个财务等多种信息进行修改、添加、删除、查询等操作。 4.1.2 登录功能的实现 当用户输入完用户名和密码以后,系统会触发一个验证用户输入的用户名称、密码是否正确的事件。只有当两个信息全部正确时,用户才能够登录到系统中,否则页面将通过Messagebox控件显示登录时发生的相关错误信息。用户登录成功后,系统将跳转到主界面。 首先是与数据库相连,其相关代码为: Dim conn As New SqlClient.SqlConnection conn.ConnectionString = My.Settings.checkConnectionString.ToString conn.Open() 与数据库相连以后,获取用户输入的用户名及密码信息,相关代码为: With comm.Parameters .Add(New SqlClient.SqlParameter("@name", SqlDbType.Char)).Value = UsernameTextBox.Text .Add(NewSqlClient.SqlParameter("@PassWord",SqlDbType.Decimal)).Value = PasswordTextBox.Text .Add(NewSqlClient.SqlParameter("ReturnValue", SqlDbType.Int)).Direction = ParameterDirection.ReturnValue End With 第 7 页 共 20 页 然后再将获取的信息与信息表里的信息进行比较,做出是否登录的判断,如果用户名和密码不相匹配的话,则无法登录。相关代码为: Dim dr As String dr = CStr(comm.ExecuteScalar) If dr <> "" Then MessageBox.Show("已经登录了", dr.ToString + "用户号", MessageBoxButtons.OK,MessageBoxIcon.Information, MessageBoxDefaultButton.Button3) flag = True Else flag = False MessageBox.Show("登录失败", "请先登录", MessageBoxButtons.YesNo, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) OK.Enabled = False Me.Close() End If 4.2 用户信息管理模块的设计 添加用户信息页面主要实现对新用户的信息进行添加的功能。因为本系统涉及到对用户的财务信息进行相关的管理,这些信息对于用户来说应该是相当机密相当重要的。所以,本系统添加的用户只能够是家庭内部成员。在以后需要的情况下,可以由已经存在的拥护从数据库中添加新的用户。从下图中,我们可以看到添加用户信息的界面中的各个需要添加的信息项: 图4 用户信息管理界面示意图 第 8 页 共 20 页 以下是添加新用户的代码: Private Sub InsertTpb() ToolStripComboBox1.Items.Clear() Dim comstr As String = "select UserName from UserInfo" sqlconstr = New SqlClient.SqlConnection(Constr) Dim dp As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(comstr, s qlconstr) dp.Fill(ds, "table") If Not ds Is Nothing Then For i As Integer = 0 To ds.Tables(0).Rows.Count - 1 If ds.Tables(0).Rows.Count = 0 Then Exit For End If ToolStripComboBox1.Items.Add(ds.Tables(0).Rows(i)(0).ToString) Next End If End Sub 4.3 密码管理模块的设计 在该系统中密码是保护信息的安全性的重要工具,定期的更换密码对于保证 用户信息的安全性是非常有好处的,也是非常必要的。在本系统中对于用户密码 的修改是很简单的,用户只需要来到密码修改的页面上,输入自己的登录名、原 来的用户密码以及新密码,就可以轻松地完成密码修改了。密码修改如下图所示: 图5 密码修改界面 第 9 页 共 20 页 用户在修改密码时,需要输入用户的登录名、用户原来的密码以及新的密码,当用户输入完以上信息,点击修改按钮之后,系统将会触发一系列的事件。首先系统会将用户登录名和用户原来的密码与数据库中的用户信息做比较,判断是否是该用户在进行操作,如果判断是该用户的话,则将新密码保存到数据库中去,系统便会弹出MessageBox提示用户密码修改成功。如果判断不是该用户的话,系统也会弹出MessageBox提示用户不能修改密码。密码修改功能的相关代码如下: If TextBox7.Text <> "" Then With Search .ComstrKou = "Update MemberName set MemberName.PassWord=" + TextBox8.Text + " where PassName like '%" + TextBox6.Text + "'" .ConstrKou = Constr End With If Search.initvaled_dataset = 1 Then MessageBox.Show("成功的更改", "海星") TextBox7.Text = TextBox8.Text TextBox8.Text = "" Else MessageBox.Show("更新失败","你使用不当") End If End If 4.4 数据库备份模块的设计 数据库备份模块对于用户非常重要,数据库备份模块可以把用户的信息在数据库里再保存一份,为以后发生特殊情况做准备,也可以说是为用户信息的安全又加了一层保险,数据库备份模块界面如下图所示: 图6 数据库备份模块界面 第 10 页 共 20 页 以下代码的功能是删除原来的文件: gDatabaseName = cmbDatabaseName.Text oBackup = New SQLDMO.Backup oBackupEvent = oBackup oBackup.Database = gDatabaseName gBkupRstrFileName = txtDataFileName.Text oBackup.Files = gBkupRstrFileName 进行数据库备份: If Len(Dir(gBkupRstrFileName)) > 0 Then Kill((gBkupRstrFileName)) End If System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor 恢复数据库: Dim oRestore As SQLDMO.Restore gDatabaseName = cmbDatabaseName.Text oRestore = New SQLDMO.Restore oRestoreEvent = oRestore oRestore.Database = gDatabaseName gBkupRstrFileName = txtDataFileName.Text oRestore.Files = gBkupRstrFileName System.Windows.Forms.Cursor.Current= System.Windows.Forms.Cursors.WaitCursor 4.5 收入模块的设计 对于该家庭理财系统来说,收入模块是很非常重要的一个模块。因为它能记录用户收入的一切信息,为用户提供一个非常实用且便捷的记录功能。此外,该模块还具有修改、删除、排序、查找等功能。 在家庭理财系统中,用户添加收入记录是很频繁的事,那么在系统中收入的记录就会非常多。正因为如此,每条记录的信息就显得尤为重要。添加收入信息记录的内容包括:收入来源、金额、收入日期、收入者、存放方以及相关备注这几项。另外为了用户能够方便的查看收入记录,故将收入来源进行了分类,具体分为三类,分别为工资、股票以及其他。收入模块的界面如下图所示: 第 11 页 共 20 页 图7 收入模块 4.5.1 添加收入记录 以下是添加收入记录的代码,首先找出收入记录中最大的ID号,然后把将 要插入的收入记录中的ID号,在最大ID号的基础上加1,然后根据用户输入的 收入记录的信息保存到数据库中,并显示在收入界面的右半部分。 Public Sub save() Dim id As String With data .Commadstr = "select Max(ID)from InputChashTable" .connstring = My.Settings.checkConnectionString.ToString End With id = CType(data.GetMaxID(), String) id = id + 1 data.insert(InputComes, InputChash, InputForms, InputName, InputContant, InputDataTime, id) End Sub 4.5.2 删除收入记录 在删除记录的时候,只需要让该记录获取焦点,再点击工具栏中的删除图标 就可以了。在该记录后的记录的ID号都减1,以下是删除收入记录的相关代码: Public Sub delectItem(ByVal CurrentID As String) 第 12 页 共 20 页 With data .connstring = My.Settings.checkConnectionString End With data.delect(CurrentID) End Sub Public Sub delectItem(ByVal CurrentID As String, ByVal name As String) With data .connstring = My.Settings.checkConnectionString End With data.delect(CurrentID, name) End Sub 4.6 支出模块的设计 对于该家庭理财系统来说,支出模块是很非常重要的一个模块。因为它能记录用户支出的一切信息,让用户能清楚地知道每一分钱到底是花在了什么地方。为用户提供一个非常实用且便捷的记录功能。此外,该模块还具有修改、删除、排序、查找等功能。 在家庭理财系统中,用户添加支出记录是很频繁的事,那么在系统中支出的记录就会非常多。正因为如此,所以每条记录的信息就显得尤为重要。添加收入信息记录的内容包括:支出金额、支出者、支出日期、支出用途以及相关备注这几项。 图8 支出模块 第 13 页 共 20 页 4.6.1 添加支出记录 以下是添加支出记录的代码,首先找出收入记录中最大的ID号,然后把将 要插入的支出记录中的ID号,在最大ID号的基础上加1,然后根据用户输入的 支出记录的信息保存到数据库中,并显示在收入界面的右半部分。 Public Sub save() Dim id As String With data .Commadstr = "select Max(ID)from OutPutTable" .connstring = My.Settings.checkConnectionString.ToString End With id = CType(data.GetMaxID(), String) id = id + 1 data.insert(OutputChash, OutputName, UserName, OutputContant, OutputDate, id) End Sub 4.6.2 删除支出记录 在删除记录的时候,只需要让该记录获取焦点,再点击工具栏中的删除图标 就可以了。在该记录后的记录的ID号都减1,以下是删除收入记录的相关代码: Public Sub delectItem(ByVal CurrentID As String) With data .connstring = My.Settings.checkConnectionString End With data.delect(CurrentID) End Sub Public Sub updata(ByVal CurrentID As String) data.UpdataContant(OutputChash, OutputName, UserName, OutputContant, OutputDate, CurrentID) data.delect(CurrentID) End Sub 4.7 帐目统计模块的设计 对于该家庭理财系统来说,帐目统计模块是一个不可缺少的模块,它的一个 重要的功能就是将用户所有的收入金额、总支出金额、总结余做一个汇总,使用 户对自己总体的财务状况有一个很清晰的了解,对收支是否平衡等情况一目了 然。此外,因为在该模块界面的右边做了收入记录和支出记录的链接,所以该模 块还具有跳转到收入和支出两表的功能。 第 14 页 共 20 页 图9 帐目统计模块界面 用户想要查看帐目统计是非常简单的,用户只需要登录到系统主界面,再进 入到收入支出表就可以了,而并不需要输入信息,这样对于用户来讲就十分方便。 该模块核心代码如下: Dim comm As SqlClient.SqlCommand = New SqlClient.SqlCommand("outincoming", cnn) '命令类型 comm.CommandType = CommandType.StoredProcedure Dim CheckNumber As String = CType(comm.ExecuteScalar, Double).ToString("c") TextBox2.Text = CheckNumber comm = New SqlClient.SqlCommand("InputChashNumber", cnn) comm.CommandType = CommandType.StoredProcedure Dim OutPutNum As String = CType(comm.ExecuteScalar,Double).ToString("c") TextBox1.Text = OutPutNum TextBox3.Text = CType(CInt(OutPutNum) - CInt(CheckNumber), Double).ToString("c") comm.Dispose() 4.8 查询模块的设计 对于家庭理财系统来说,查询功能是非常重要的一个功能。该家庭理财系统 查询模块包含四个查询方式,以收入表为例,这四种查询方式分别是按收入类型、 按收入时间、按收入者、按收入金额范围进行查询,对应收入表和支出表,并实 现对其他相关表单的跨表查询。用户能按多种不同的方式更清楚地了解到自己的 财务情况。下图是查询模块的界面示意图: 第 15 页 共 20 页 图10 查询模块 本系统采用统一的查询模块TheOrderWithSelect进行查询。其中该查询模块里面拥有数据字符串连接属性、填充属性以及数据集属性,相应的dataset数据集属性,通过这些属性实现对ADO.NET的操作。 通常情况下,实现查询的 流程 快递问题件怎么处理流程河南自建厂房流程下载关于规范招聘需求审批流程制作流程表下载邮件下载流程设计 为:首先对string类型的字符串连接属性进行赋值,该值为my.settings.connectionstring。其中my对象是VS2005中新添加的功能,My提供了常用.NET Framework类与函数的进入点,让常用的功能唾手可得,并减少程序员所编写代码的行数。通过my实现了对系统资源的访问,其中系统资源包含settings,通过settings实现了对系统资源的保存。其次实现对connection对象的初始化,通过connection.open事件将数据库连接打开。再次实现对数据库命令属性初始化,并修改commandstring(数据库命令字符串)。然后实现查询命令,其中查询命令保存在commandstring中,并用command对象初始化DataAdapter,最终实现对数据集属性的填充。其中DataAdapter实现对数据库底层的操作,并返回一张类型为XML的表单,该表单保存了相应的查询结果,并填充dataset数据集。 其中dataset数据集包含了多种存贮XML表单的方法,第一种方法为直接填充,其中该表单的名字为”datatable1”,第二种方法为带名字的填充,这样实现了一个dataset数据集可以保存多个数据表单,甚至可以实现添加表但的关联性,模拟出了SQL底层表但实体的情况,只需要修改XML表单就可以实现对数据库无连接的操作。当需要修改数据时,只需提交XML表单便实现了对实体的操作,但是作为存放数据的dataset数据集,仍然有很大的缺陷,不能直接对XML的查询,而是在新建连接的情况下实现对数据集的再次填充,从而损耗了部分系统资源。查询功能核心代码如下: 第 16 页 共 20 页 With SelectItem .selectMethodInfo = "select ClassName,InputName,InputChash,InputDateTime from InputChashTable, ClassInputChashTable where(InputChashTable.ClassID = ClassInputChashTable.ClassID) AND ClassInputChashTable.ClassName='" + ComboBox1.Text.Trim + "' " End with 4.9 报表输出模块的设计 报表输出模块实际上就是对收入表和支出表的记录通过打印的方式输出。将所得到的表的列名,赋值给单元格: Dim xlApp As New Interop.Excel.ApplicationClass Dim xlBook As Interop.Excel.Workbook Dim xlSheet As Interop.Excel.Worksheet Dim rowIndex, colIndex As Integer rowIndex = 1 colIndex = 0 xlBook = xlApp.Workbooks().Add xlSheet = xlBook.Worksheets("sheet1") Dim Table As New DataTable Table = ds.Tables(0) 得到的表所有行,赋值给单元格: Dim Col As DataColumn Dim Row As DataRow For Each Col In Table.Columns colIndex = colIndex + 1 xlApp.Cells(1, colIndex) = Col.ColumnName Next 系统在执行打印时,其实是生成了一张Excel的表,然后再将信息打印出来。 Execl表单的申明: Imports Microsoft.Office.Core Imports Microsoft.Office 5 系统测试结果 本系统的开发使用了VS2005作为开发工具,具有良好的可视化的编程环境。在编程的过程中就可以对所做的模块进行运行,发现错误,以便立即进行改正。经过不断地修改和更正,最终得以完善各个模块的功能。通过进行系统各个子模 第 17 页 共 20 页 块的测试和总体的测试,本系统各个模块运行良好,能够完成其对应的功能。要进入系统,系统用户必须通过验证。在登录之后,进入系统主界面。在主界面中,系统用户能够进入用户登录模块、用户管理模块、数据库备份模块、收入模块、支出模块、密码管理模块、帐目统计模块、报表输出模块以及查询模块等九个子模块。在各个子模块中,用户能够对子模块中对应的信息进行相应的操作,本系统的各个模块都能正常的运行。 结 论 由于时间比较紧张,加上自己本身在语言编程方面的能力比较有限,该系统势必还存在着一定的问题。作为一个短时间内完成的实用性软件,本系统在实用性和全面性方面肯定还有不少的欠缺。如本系统后面的查询模块、用户密码管理模块,所能考虑到的方面就不是很全面,所以效果就并不是很理想。总的来讲,这个家庭理财系统能够基本满足简家庭内部成员的理财需求。它和一个功能强大的家庭理财系统比较起来,还有一定的差距。其实还有一些模块功能可以进一步的完善,希望可以通过以后的学习能够不断的完善和强大本系统的功能。尽管如此,在开发和设计这个软件的过程中,通过学习,我掌握了很多编程上的新知识,比如说更加了解了SQL2000数据库,有机会接触到了VS2005,掌握了VS2005的一些特点,还有对VB语言也有了更深的认识。总的来说,通过这次毕业设计,让我取得了一个相当大的进步。 同时,使用家庭理财系统来管理财务的各种信息,对于信息化时代的人们来说,是很有必要的。现在已经有越来越多的人开始认识到家庭理财系统的优势所在,大范围的推广和使用家庭理财系统来管理个人财务信息会逐渐成为大众化个人财务管理的主流模式。从目前来看,各种家庭理财系统的需求量都是相当大的,家庭理财系统的市场前景应该是很好的。 参考文献 [1] CARSTEN THOMSEN.VB.NET数据库开发[M].北京:清华大学出版社,2004。 [2] 王进强.Visual Basic.NET基础教程[M].北京:清华大学出版社,2004。 [3] 贾文晋,薛为民.Visual Basic.NET组件开发专业教程[M].北京:清华大学出版社,2004。 [4] 张树泉.Visual Basic.NET控件技术教程[M].北京:清华大学出版社,2004。 [5] 黄淼云.Visual Basic.NET函数技术教程[M].北京:清华大学出版社,2004。 [6] 章立民.Visual Basic.NET程序开发与界面设计秘诀[M].北京:机械工业出版社,2006。 [7] 方睿,刁仁宏,吴四九.网络数据库原理及应用[M].成都:四川大学出版社,2005。 第 18 页 共 20 页 致 谢 本文是在吴四九老师、陈念伟老师的热情关心和指导下完成的,他们渊博的知识和严谨的治学作风使我受益匪浅,对顺利完成本课题起到了极大的作用。在此向他表示我最衷心的感谢~ 感谢陈念伟老师在课题研究初期给予的帮助,在陈念伟老师的帮助下课题才得以很好的展开,有了一个很好的开端~ 在论文完成过程中,本人还得到了其他老师和许多同学的热心帮助,本人向他们表示深深的谢意~ 最后向在百忙之中评审本文的各位专家、老师表示衷心的感谢~ 作者简介: 姓 名:易 帆 性别:男 出生年月:1985-07 民族:汉 E-mail:yifan1818@126.com 第 19 页 共 20 页 声 明 本论文是2007年2月至2007年6月在成都信息工程学院网络工程系完成的。 文中除了特别加以标注地方外,不包含他人已经发表或撰写过的研究成果,也不包含为获得成都信息工程学院或其他教学机构的学位或证 关于书的成语关于读书的排比句社区图书漂流公约怎么写关于读书的小报汉书pdf 而使用过的材料。除非另有说明,本文的工作是原始性工作。 关于学位论文使用权和研究成果知识产权的说明: 本人完全了解成都信息工程学院有关保管使用学位论文的规定,其中包括: (1)学校有权保管并向有关部门递交学位论文的原件与复印件。 (2)学校可以采用影印、缩印或其他复制方式保存学位论文。 (3)学校可以学术交流为目的复制、赠送和交换学位论文。 (4)学校可允许学位论文被查阅或借阅。 (5)学校可以公布学位论文的全部或部分内容(保密学位论文在解密后遵守此规定)。 除非另有科研 合同 劳动合同范本免费下载装修合同范本免费下载租赁合同免费下载房屋买卖合同下载劳务合同范本下载 和其他法律文书的制约,本论文的科研成果属于成都信息工程学院。 特此声明~ 图家庭理财系统的设计与实现 摘 要 全球经济的蓬勃发展带来了金融理财领域的巨大变革和创新,新的金融工具和理财观点不断产生,迅速地刷新着家庭与个人传统的理财观念。改革开放以来,我国社会经济的发展和居民收入水平得到了很大的提高,家庭理财活动已成为居民生活的重要内容。人们迫切需要一个能充分利用计算机优势,并可以管理家庭财务的软件平台,利用这个平台使得个人的财务有了明晰的收支情况的系统。 家庭理财系统采用VS2005作为开发工具,采用SQL SERVER 2000开发后台数据库。主要包含了用户登录模块、用户管理模块、数据库备份模块、收入模块、支出模块、密码管理模块、帐目统计模块、报表输出模块以及查询模块。用户能够通过这些模块所提供的功能,完成相应的操作,满足家庭内部对家庭理财需求。 关键词:家庭理财;收入;支出;查询;VS2005;数据库;模块 Design and Implementation of Family Financial Management System Abstract The flourish development of the global economy has brought great transform and innovation of financial transactions, new financial instruments and financial perspectives are evolving rapidly to surpass the traditional family and personal financial management concepts in China. Since the 1980s last century, with the development of China’s economy, Chinese people’s income level has been greatly improved. Family financial management has become an important part of Chinese people’s life. There was an urgent need to use all the advantages of the computer, which can manage family finances’ system, which can clearly reflect individuals financial conditions. This system uses VS2005 as a development tool, SQL Server 2000 database development background. It contains the user landing module, user information management module, database backup module, income module, output management module, user password management module, accounts statistics module, report forms export module and inquire module. System users can be satisfied by the system, which can meet the internal management of the family financial management needs through these modules and the functions in the system. Key words: Family Financial Management; Income; Payout; Inquire; VS2005; Database; Module 目 录 1 引言............................................................................................................................................... 1 1.1 课题背景 ................................................................................................................................ 1 1.2 国内外研究的现状 ................................................................................................................ 1 1.3 本课题研究的意义 ................................................................................................................ 1 1.4 本课题的研究方法 ................................................................................................................ 1 2 可行性研究 ................................................................................................................................... 2 2.1 技术可行性 ............................................................................................................................ 2 2.2 经济可行性 ............................................................................................................................ 2 2.3 操作上的可行性 .................................................................................................................... 3 3 系统需求分析 ............................................................................................................................... 3 3.1 系统功能需求分析 ................................................................................................................ 3 3.2 数据流图 ................................................................................................................................ 4 3.3 系统数据库表设计 ................................................................................................................ 5 3.3.1 用户表(UserInfo) ..................................................................................................... 5 3.3.2 用户信息表(UserMessage) ...................................................................................... 5 3.3.3 收入类型表 (ClassInputChashTable) ...................................................................... 5 3.3.4 支出类型表(ClassOutputChashTable) ..................................................................... 5 3.3.5 收入表(InputChashTable) .............................................................................................. 6 3.3.6 成员登录信息表(MemberName) .................................................................................. 6 3.3.7 支出表(OutputChashTable) ........................................................................................... 6 4 系统功能的设计与实现 ............................................................................................................... 6 4.1 系统登录界面的设计 ............................................................................................................ 7 4.1.1 登录界面 ........................................................................................................................ 7 4.1.2 登录功能的实现 ............................................................................................................ 7 4.2 用户信息管理模块的设计 .................................................................................................... 8 4.3 密码管理模块的设计 ............................................................................................................ 9 4.4 数据库备份模块的设计 ...................................................................................................... 10 4.5 收入模块的设计 .................................................................................................................. 11 4.5.1 添加收入记录 .............................................................................................................. 12 4.5.2 删除收入记录 .............................................................................................................. 12 4.6 支出模块的设计 .................................................................................................................. 13 4.6.1 添加支出记录 .............................................................................................................. 14 4.6.2 删除支出记录 .............................................................................................................. 14 帐目统计模块的设计 .......................................................................................................... 14 4.7 4.8 查询模块的设计 .................................................................................................................. 15 4.9 报表输出模块的设计 .......................................................................................................... 17 5 系统测试结果 ............................................................................................................................. 17 结 论......................................................................................................................................... 18 参考文献......................................................................................................................................... 18 致 谢......................................................................................................................................... 19 声 明......................................................................................................................................... 20 1 引言 1.1 课题背景 家庭理财系统,即Family Conduct Financial Transactions System。它利用计算机技术技术,使家庭理财逐步信息化,从而形成由家庭成员与计算机共同构成服务于家庭的人机信息财务管理系统。随着计算机发展,家庭理财系统已经成为很多家庭财务管理的一个重要途径。计算机的最大优点在于利用它能够高效准确地进行财务信息管理。使用计算机进行信息财务管理,不仅提高了工作效率,而且大大的提高了其安全性。 1.2 国内外研究的现状 家庭理财系统在国外很多地方使用已经相当的普遍,而且国外的家庭理财系统功能相当强大,比如系统里包含有股票的预测、基金的分析等等。在我们国内,尤其是在近几年,伴随着计算机的高速普及,家庭理财系统的使用范围逐步扩大,从最早的简单使用纸笔记录家庭、个人财务的收支情况,到现在用计算机对财务的收支、查询、汇总等等。巨大的市场需求也促使了很多公司加大了对家庭理财系统的研究。 1.3 本课题研究的意义 多年以来人们都使用传统的人工方式记录和管理家庭或自己财务情况。这种管理和记录方式不仅不便于长期保存,也存在着不可避免的缺点,如效率太低、保密性太差。时间一长,伴随着居民收入水平的提高和居民各种消费和收入的多样性,家庭理财所需要管理的信息就会越来越多,就会产生大量的文件和数据,这样就会对查阅、更新、保存等方面都产生不少的困难。随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已逐渐被人们认识并掌握。如果使用计算机对家庭理财信息进行管理具有传统的手工管理所没法比拟的优点。例如:统计方便、查找容易、可靠性高、保密性好、更新方便等。这些优点能够极大地提高家庭理财信息管理的效率,大大降低居民在信息管理精力上的投入,使企业获得更大的利润空间。因此,开发一个能够管理家庭内部各种财务信息的家庭理财管理系统是一件十分必要的事情。 1.4 本课题的研究方法 家庭理财系统的用户群体是家庭内部成员,用户类型单一,因此将本系统设计成一个相对封闭的单机运行系统结合居民管理信息方面的具体需求,利用VS2005作为前台开发工具,使用SQL SERVER 2000作为数据库。结合数据库原理及应用、软件工程开发方法,在经过深入地学习之后,开发了这套家庭理财管理系统。下面将具体介绍系统的开发过程: 第 1 页 共 20 页 2 可行性研究 2.1 技术可行性 本系统的开发利用VS2005作为开发工具。VS2005是一个具有完善开发工具的平台。VS2005提供的工具适合各种水平层次无论是初学者还是有经验的团队,并适合各种不同的开发需求。降低了开发的复杂度,其提供给开发者更加简便动态的.Net Framework基础解决方案,其中包括了windows应用程序开发、office嵌入开发、Web应用开发、移动应用程序开发。改进了团队交流方式,VS2005为团队开发提供通道和完整的开发周期工具,从而增加了团队内部的交流与协作的效率。通过学习,熟悉和掌握VB.NET的使用方法,使用VS2005作为开发工具将使整个系统的模块化设计变得更加简便。 系统采用SQL SERVER 2000作为开发数据库。SQL SERVER 2000是一种客户机/服务器结构的关系数据库管理系统。SQL SERVER 2000提供了许多易于使用的图形化工具和向导,其中最常用的是服务管理器、企业管理器和查询分析器。它们为创建和管理数据库带来了很大的方便。 在技术难度方面,有指导老师的指导、周围同学的热心帮助,加上对很多相关文献的参考,能够解决开发过程中所遇到的困难。 2.2 经济可行性 如今,随着计算机的大量普及,各种软件的开发成本越来越低,价格也越来越底。本系统也是这样,开发成本较低,只是需要一台配置一般的计算机,该系统运行时占计算机的资源也不多,但并不会因为开发成本低而造成系统功能性能的下降。相反,随着计算机技术的发展,各种实用软件的性能日渐提高。家庭理财管理系统廉价的开发成本,却能够为居民带来相当大的实惠和方便。主要表现在: (1)本系统可以说是一个拥有多种实用功能的家庭理财管理信息系统,它集成了家庭成员管理、收入管理、支出管理、密码管理等多种功能,具有较强的实用性和方便性。 (2)本系统的运行可以大大提高居民管理财务的效率,减少不必要的人力和物力。 (3)本系统还具有查询和统计功能,能够查询到用户在一段特定时间内收入和支出的情况,特别是支出情况,有时往往会让用户在月底吓一跳,大大超出预算,还弄不清钱都花到哪里了,有了家庭理财系统,不仅使用户对口袋里钱的去向一目了然,而且可以渐渐悟到一些心得,摸清哪些花费是必要的,哪些“意外开支”是可以避免的,哪笔开支是可继续评估其必要性的。 由此,可以得出,本系统在经济上是绝对具有可行性。 第 2 页 共 20 页 2.3 操作上的可行性 由于本系统管理的对象比较明确,就是对于收入支出的一些管理,主要就是对数据库的操作,且每个数据库内容具有较强的关联性,设计的过程也不复杂。因此,整个软件的使用非常简便。任何一个普通的计算机用户都能很快的熟悉整个软件的使用。并且本系统所耗费的资源非常小,任何家庭成员只需要在一般的电脑上面,就能够使用这个软件,简单、方便、快捷的实现对财务信息进行管理。 3 系统需求分析 3.1 系统功能需求分析 家庭理财管理系统是针对用户要求用计算机,对自己的财务的收入、支出以及相关的各种信息,进行记录、修改、添加、删除而设计的一种现代化管理软件。 通过需求分析,本系统需要具有以下功能: (1)由于一项新的软件在被使用之前,对于使用者来说是陌生和崭新的,所以要求系统具有良好的人机界面。 (2)能够家庭理财管理系统的各项功能,能成功的对用户各种信息进行管理。 (3)查询、修改、删除、添加数据方便,数据的稳定性和可靠性好。 具体说来,要求本系统具有以下几个功能模块:用户登录模块、用户管理模块、数据库备份模块、收入模块、支出模块、密码管理模块、账目统计模块、报表输出模块以及查询模块。系统整体的简单关系图如下所示: 用户登录模块 用户管理模块 家 数据库备份模块 庭 理 收入模块 财 信 支出模块 息 系 密码管理模块 统 账目管理模块 报表输出模块 查询模块 图1 家庭理财管理系统模块划分图 第 3 页 共 20 页 各模块具体的需求描述如下: (1)用户登录模块 用户登录:验证用户的信息是否合法,以及验证用户是否为系统的合法用户。 (2)用户管理模块 在系统中主要包括添加用户。 (3)数据库备份模块 主要对数据库里的数据进行备份。 (4)收入模块 主要实现对收入记录的添加、删除、修改。 )支出模块 (5 主要实现对收入记录的添加、删除、修改。 (6)密码管理模块 在系统中主要包括用户修改密码。 (7)账目统计模块 主要对总收入、总支出、余额管理。 (8)报表输出模块 主要实现对收入、支出记录的输出及打印。 (9)查询模块 主要实现对收入、支出记录按时间按类型查询等。 3.2 数据流图 根据系统中收入、支出模块内对收入记录、支出记录具体操作和功能之间的 关系,可以得出如下图2所示的数据流图: 添加、修改、删 除两表信息 用 收入表、支出表 户 数据库 添加、修改、删 除的结果 图2 数据流图 第 4 页 共 20 页 3.3 系统数据库表设计 本系统是一个关于家庭理财信息的管理系统,主要包括收入、支出的管理。 所以,所设计数据库表的时候设计了用户表、用户信息表、收入类型表、支出类 型表、收入表、支出表、用户登录表用来存储对应的信息。 3.3.1 用户表(UserInfo) 表1角色表 字段名称 数据类型 字段说明 键引用 UserID int 用户ID UserNum varchar 用户编号 UserName varchar 用户名 3.3.2 用户信息表(UserMessage) 表2用户信息表 字段名称 数据类型 字段说明 键引用 UserID varchar 用户ID UserAddress varchar 用户地址 Birthday datetime 用户生日 WorkAddress varchar 工作地址 WorkPhone numeric 工作电话 UserName varchar 用户名 3.3.3 收入类型表 (ClassInputChashTable) 表3收入类型表 字段名称 数据类型 字段说明 键引用 ClassID numeric 支出类型编号 ClassName varchar 支出类型名称 3.3.4 支出类型表(ClassOutputChashTable) 表4支出类型表 字段名称 数据类型 字段说明 键引用 ClsaaID numeric 分类ID ClassName varchar 分类名称 第 5 页 共 20 页 3.3.5 收入表(InputChashTable) 表5收入表 字段名称 数据类型 字段说明 键引用 UserID varchar 编号 ID int 编号 InputName varchar 收入者 InputComesFrom numeric 收入来源 InputChash varchar 收入金额 InputForms varchar 收入类型 InputContent varchar 备注 InputDateTime datetime 时间 ClassID numeric 收入类型编号 3.3.6 成员登录信息表(MemberName) 表6成员登录信息表 字段名称 数据类型 字段说明 键引用 ID int 编号 UserPassword char 密码 PassName numeric 登录名 3.3.7 支出表(OutputChashTable) 表7支出表 字段名称 数据类型 字段说明 键引用 UserID varchar 编号 ID int 编号 OutputName varchar 支出用途 OutputChash numeric 支出金额 UserName varchar 支出者 OutputContent varchar 备注 OutputDateTime datetime 时间 ClassID numeric 支出类型编号 4 系统功能的设计与实现 本系统主要包括对登录模块的设计、用户管理模块的设计、用户密码管理模 块的设计、数据库备份管理模块的设计、收入模块的设计、支出模块的设计、帐 目统计模块的设计、查询模块的设计以及报表输出模块的设计。具体如下: 第 6 页 共 20 页 4.1 系统登录界面的设计 4.1.1 登录界面 系统登录界面也是本家庭理财管理系统的第一个界面,其界面如下: 图3 登录界面 此界面是用户进入系统首先需要经过的界面,用户在正确地输入自己的用户名和密码后,便可进入系统的主界面,用户可以通过这个界面进入主页面与其它模块进行接触,对系统内的各个财务等多种信息进行修改、添加、删除、查询等操作。 4.1.2 登录功能的实现 当用户输入完用户名和密码以后,系统会触发一个验证用户输入的用户名称、密码是否正确的事件。只有当两个信息全部正确时,用户才能够登录到系统中,否则页面将通过Messagebox控件显示登录时发生的相关错误信息。用户登录成功后,系统将跳转到主界面。 首先是与数据库相连,其相关代码为: Dim conn As New SqlClient.SqlConnection conn.ConnectionString = My.Settings.checkConnectionString.ToString conn.Open() 与数据库相连以后,获取用户输入的用户名及密码信息,相关代码为: With comm.Parameters .Add(New SqlClient.SqlParameter("@name", SqlDbType.Char)).Value = UsernameTextBox.Text .Add(NewSqlClient.SqlParameter("@PassWord",SqlDbType.Decimal)).Value = PasswordTextBox.Text .Add(NewSqlClient.SqlParameter("ReturnValue", SqlDbType.Int)).Direction = ParameterDirection.ReturnValue End With 第 7 页 共 20 页 然后再将获取的信息与信息表里的信息进行比较,做出是否登录的判断,如果用户名和密码不相匹配的话,则无法登录。相关代码为: Dim dr As String dr = CStr(comm.ExecuteScalar) If dr <> "" Then MessageBox.Show("已经登录了", dr.ToString + "用户号", MessageBoxButtons.OK,MessageBoxIcon.Information, MessageBoxDefaultButton.Button3) flag = True Else flag = False MessageBox.Show("登录失败", "请先登录", MessageBoxButtons.YesNo, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) OK.Enabled = False Me.Close() End If 4.2 用户信息管理模块的设计 添加用户信息页面主要实现对新用户的信息进行添加的功能。因为本系统涉及到对用户的财务信息进行相关的管理,这些信息对于用户来说应该是相当机密相当重要的。所以,本系统添加的用户只能够是家庭内部成员。在以后需要的情况下,可以由已经存在的拥护从数据库中添加新的用户。从下图中,我们可以看到添加用户信息的界面中的各个需要添加的信息项: 图4 用户信息管理界面示意图 第 8 页 共 20 页 以下是添加新用户的代码: Private Sub InsertTpb() ToolStripComboBox1.Items.Clear() Dim comstr As String = "select UserName from UserInfo" sqlconstr = New SqlClient.SqlConnection(Constr) Dim dp As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(comstr, s qlconstr) dp.Fill(ds, "table") If Not ds Is Nothing Then For i As Integer = 0 To ds.Tables(0).Rows.Count - 1 If ds.Tables(0).Rows.Count = 0 Then Exit For End If ToolStripComboBox1.Items.Add(ds.Tables(0).Rows(i)(0).ToString) Next End If End Sub 4.3 密码管理模块的设计 在该系统中密码是保护信息的安全性的重要工具,定期的更换密码对于保证 用户信息的安全性是非常有好处的,也是非常必要的。在本系统中对于用户密码 的修改是很简单的,用户只需要来到密码修改的页面上,输入自己的登录名、原 来的用户密码以及新密码,就可以轻松地完成密码修改了。密码修改如下图所示: 图5 密码修改界面 第 9 页 共 20 页 用户在修改密码时,需要输入用户的登录名、用户原来的密码以及新的密码,当用户输入完以上信息,点击修改按钮之后,系统将会触发一系列的事件。首先系统会将用户登录名和用户原来的密码与数据库中的用户信息做比较,判断是否是该用户在进行操作,如果判断是该用户的话,则将新密码保存到数据库中去,系统便会弹出MessageBox提示用户密码修改成功。如果判断不是该用户的话,系统也会弹出MessageBox提示用户不能修改密码。密码修改功能的相关代码如下: If TextBox7.Text <> "" Then With Search .ComstrKou = "Update MemberName set MemberName.PassWord=" + TextBox8.Text + " where PassName like '%" + TextBox6.Text + "'" .ConstrKou = Constr End With If Search.initvaled_dataset = 1 Then MessageBox.Show("成功的更改", "海星") TextBox7.Text = TextBox8.Text TextBox8.Text = "" Else MessageBox.Show("更新失败","你使用不当") End If End If 4.4 数据库备份模块的设计 数据库备份模块对于用户非常重要,数据库备份模块可以把用户的信息在数据库里再保存一份,为以后发生特殊情况做准备,也可以说是为用户信息的安全又加了一层保险,数据库备份模块界面如下图所示: 图6 数据库备份模块界面 第 10 页 共 20 页 以下代码的功能是删除原来的文件: gDatabaseName = cmbDatabaseName.Text oBackup = New SQLDMO.Backup oBackupEvent = oBackup oBackup.Database = gDatabaseName gBkupRstrFileName = txtDataFileName.Text oBackup.Files = gBkupRstrFileName 进行数据库备份: If Len(Dir(gBkupRstrFileName)) > 0 Then Kill((gBkupRstrFileName)) End If System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor 恢复数据库: Dim oRestore As SQLDMO.Restore gDatabaseName = cmbDatabaseName.Text oRestore = New SQLDMO.Restore oRestoreEvent = oRestore oRestore.Database = gDatabaseName gBkupRstrFileName = txtDataFileName.Text oRestore.Files = gBkupRstrFileName System.Windows.Forms.Cursor.Current= System.Windows.Forms.Cursors.WaitCursor 4.5 收入模块的设计 对于该家庭理财系统来说,收入模块是很非常重要的一个模块。因为它能记录用户收入的一切信息,为用户提供一个非常实用且便捷的记录功能。此外,该模块还具有修改、删除、排序、查找等功能。 在家庭理财系统中,用户添加收入记录是很频繁的事,那么在系统中收入的记录就会非常多。正因为如此,每条记录的信息就显得尤为重要。添加收入信息记录的内容包括:收入来源、金额、收入日期、收入者、存放方以及相关备注这几项。另外为了用户能够方便的查看收入记录,故将收入来源进行了分类,具体分为三类,分别为工资、股票以及其他。收入模块的界面如下图所示: 第 11 页 共 20 页 图7 收入模块 4.5.1 添加收入记录 以下是添加收入记录的代码,首先找出收入记录中最大的ID号,然后把将 要插入的收入记录中的ID号,在最大ID号的基础上加1,然后根据用户输入的 收入记录的信息保存到数据库中,并显示在收入界面的右半部分。 Public Sub save() Dim id As String With data .Commadstr = "select Max(ID)from InputChashTable" .connstring = My.Settings.checkConnectionString.ToString End With id = CType(data.GetMaxID(), String) id = id + 1 data.insert(InputComes, InputChash, InputForms, InputName, InputContant, InputDataTime, id) End Sub 4.5.2 删除收入记录 在删除记录的时候,只需要让该记录获取焦点,再点击工具栏中的删除图标 就可以了。在该记录后的记录的ID号都减1,以下是删除收入记录的相关代码: Public Sub delectItem(ByVal CurrentID As String) 第 12 页 共 20 页 With data .connstring = My.Settings.checkConnectionString End With data.delect(CurrentID) End Sub Public Sub delectItem(ByVal CurrentID As String, ByVal name As String) With data .connstring = My.Settings.checkConnectionString End With data.delect(CurrentID, name) End Sub 4.6 支出模块的设计 对于该家庭理财系统来说,支出模块是很非常重要的一个模块。因为它能记录用户支出的一切信息,让用户能清楚地知道每一分钱到底是花在了什么地方。为用户提供一个非常实用且便捷的记录功能。此外,该模块还具有修改、删除、排序、查找等功能。 在家庭理财系统中,用户添加支出记录是很频繁的事,那么在系统中支出的记录就会非常多。正因为如此,所以每条记录的信息就显得尤为重要。添加收入信息记录的内容包括:支出金额、支出者、支出日期、支出用途以及相关备注这几项。 图8 支出模块 第 13 页 共 20 页 4.6.1 添加支出记录 以下是添加支出记录的代码,首先找出收入记录中最大的ID号,然后把将 要插入的支出记录中的ID号,在最大ID号的基础上加1,然后根据用户输入的 支出记录的信息保存到数据库中,并显示在收入界面的右半部分。 Public Sub save() Dim id As String With data .Commadstr = "select Max(ID)from OutPutTable" .connstring = My.Settings.checkConnectionString.ToString End With id = CType(data.GetMaxID(), String) id = id + 1 data.insert(OutputChash, OutputName, UserName, OutputContant, OutputDate, id) End Sub 4.6.2 删除支出记录 在删除记录的时候,只需要让该记录获取焦点,再点击工具栏中的删除图标 就可以了。在该记录后的记录的ID号都减1,以下是删除收入记录的相关代码: Public Sub delectItem(ByVal CurrentID As String) With data .connstring = My.Settings.checkConnectionString End With data.delect(CurrentID) End Sub Public Sub updata(ByVal CurrentID As String) data.UpdataContant(OutputChash, OutputName, UserName, OutputContant, OutputDate, CurrentID) data.delect(CurrentID) End Sub 4.7 帐目统计模块的设计 对于该家庭理财系统来说,帐目统计模块是一个不可缺少的模块,它的一个 重要的功能就是将用户所有的收入金额、总支出金额、总结余做一个汇总,使用 户对自己总体的财务状况有一个很清晰的了解,对收支是否平衡等情况一目了 然。此外,因为在该模块界面的右边做了收入记录和支出记录的链接,所以该模 块还具有跳转到收入和支出两表的功能。 第 14 页 共 20 页 图9 帐目统计模块界面 用户想要查看帐目统计是非常简单的,用户只需要登录到系统主界面,再进 入到收入支出表就可以了,而并不需要输入信息,这样对于用户来讲就十分方便。 该模块核心代码如下: Dim comm As SqlClient.SqlCommand = New SqlClient.SqlCommand("outincoming", cnn) '命令类型 comm.CommandType = CommandType.StoredProcedure Dim CheckNumber As String = CType(comm.ExecuteScalar, Double).ToString("c") TextBox2.Text = CheckNumber comm = New SqlClient.SqlCommand("InputChashNumber", cnn) comm.CommandType = CommandType.StoredProcedure Dim OutPutNum As String = CType(comm.ExecuteScalar,Double).ToString("c") TextBox1.Text = OutPutNum TextBox3.Text = CType(CInt(OutPutNum) - CInt(CheckNumber), Double).ToString("c") comm.Dispose() 4.8 查询模块的设计 对于家庭理财系统来说,查询功能是非常重要的一个功能。该家庭理财系统 查询模块包含四个查询方式,以收入表为例,这四种查询方式分别是按收入类型、 按收入时间、按收入者、按收入金额范围进行查询,对应收入表和支出表,并实 现对其他相关表单的跨表查询。用户能按多种不同的方式更清楚地了解到自己的 财务情况。下图是查询模块的界面示意图: 第 15 页 共 20 页 图10 查询模块 本系统采用统一的查询模块TheOrderWithSelect进行查询。其中该查询模块里面拥有数据字符串连接属性、填充属性以及数据集属性,相应的dataset数据集属性,通过这些属性实现对ADO.NET的操作。 通常情况下,实现查询的流程为:首先对string类型的字符串连接属性进行赋值,该值为my.settings.connectionstring。其中my对象是VS2005中新添加的功能,My提供了常用.NET Framework类与函数的进入点,让常用的功能唾手可得,并减少程序员所编写代码的行数。通过my实现了对系统资源的访问,其中系统资源包含settings,通过settings实现了对系统资源的保存。其次实现对connection对象的初始化,通过connection.open事件将数据库连接打开。再次实现对数据库命令属性初始化,并修改commandstring(数据库命令字符串)。然后实现查询命令,其中查询命令保存在commandstring中,并用command对象初始化DataAdapter,最终实现对数据集属性的填充。其中DataAdapter实现对数据库底层的操作,并返回一张类型为XML的表单,该表单保存了相应的查询结果,并填充dataset数据集。 其中dataset数据集包含了多种存贮XML表单的方法,第一种方法为直接填充,其中该表单的名字为”datatable1”,第二种方法为带名字的填充,这样实现了一个dataset数据集可以保存多个数据表单,甚至可以实现添加表但的关联性,模拟出了SQL底层表但实体的情况,只需要修改XML表单就可以实现对数据库无连接的操作。当需要修改数据时,只需提交XML表单便实现了对实体的操作,但是作为存放数据的dataset数据集,仍然有很大的缺陷,不能直接对XML的查询,而是在新建连接的情况下实现对数据集的再次填充,从而损耗了部分系统资源。查询功能核心代码如下: 第 16 页 共 20 页 With SelectItem .selectMethodInfo = "select ClassName,InputName,InputChash,InputDateTime from InputChashTable, ClassInputChashTable where(InputChashTable.ClassID = ClassInputChashTable.ClassID) AND ClassInputChashTable.ClassName='" + ComboBox1.Text.Trim + "' " End with 4.9 报表输出模块的设计 报表输出模块实际上就是对收入表和支出表的记录通过打印的方式输出。将所得到的表的列名,赋值给单元格: Dim xlApp As New Interop.Excel.ApplicationClass Dim xlBook As Interop.Excel.Workbook Dim xlSheet As Interop.Excel.Worksheet Dim rowIndex, colIndex As Integer rowIndex = 1 colIndex = 0 xlBook = xlApp.Workbooks().Add xlSheet = xlBook.Worksheets("sheet1") Dim Table As New DataTable Table = ds.Tables(0) 得到的表所有行,赋值给单元格: Dim Col As DataColumn Dim Row As DataRow For Each Col In Table.Columns colIndex = colIndex + 1 xlApp.Cells(1, colIndex) = Col.ColumnName Next 系统在执行打印时,其实是生成了一张Excel的表,然后再将信息打印出来。 Execl表单的申明: Imports Microsoft.Office.Core Imports Microsoft.Office 5 系统测试结果 本系统的开发使用了VS2005作为开发工具,具有良好的可视化的编程环境。在编程的过程中就可以对所做的模块进行运行,发现错误,以便立即进行改正。经过不断地修改和更正,最终得以完善各个模块的功能。通过进行系统各个子模 第 17 页 共 20 页 块的测试和总体的测试,本系统各个模块运行良好,能够完成其对应的功能。要进入系统,系统用户必须通过验证。在登录之后,进入系统主界面。在主界面中,系统用户能够进入用户登录模块、用户管理模块、数据库备份模块、收入模块、支出模块、密码管理模块、帐目统计模块、报表输出模块以及查询模块等九个子模块。在各个子模块中,用户能够对子模块中对应的信息进行相应的操作,本系统的各个模块都能正常的运行。 结 论 由于时间比较紧张,加上自己本身在语言编程方面的能力比较有限,该系统势必还存在着一定的问题。作为一个短时间内完成的实用性软件,本系统在实用性和全面性方面肯定还有不少的欠缺。如本系统后面的查询模块、用户密码管理模块,所能考虑到的方面就不是很全面,所以效果就并不是很理想。总的来讲,这个家庭理财系统能够基本满足简家庭内部成员的理财需求。它和一个功能强大的家庭理财系统比较起来,还有一定的差距。其实还有一些模块功能可以进一步的完善,希望可以通过以后的学习能够不断的完善和强大本系统的功能。尽管如此,在开发和设计这个软件的过程中,通过学习,我掌握了很多编程上的新知识,比如说更加了解了SQL2000数据库,有机会接触到了VS2005,掌握了VS2005的一些特点,还有对VB语言也有了更深的认识。总的来说,通过这次毕业设计,让我取得了一个相当大的进步。 同时,使用家庭理财系统来管理财务的各种信息,对于信息化时代的人们来说,是很有必要的。现在已经有越来越多的人开始认识到家庭理财系统的优势所在,大范围的推广和使用家庭理财系统来管理个人财务信息会逐渐成为大众化个人财务管理的主流模式。从目前来看,各种家庭理财系统的需求量都是相当大的,家庭理财系统的市场前景应该是很好的。 参考文献 [1] CARSTEN THOMSEN.VB.NET数据库开发[M].北京:清华大学出版社,2004。 [2] 王进强.Visual Basic.NET基础教程[M].北京:清华大学出版社,2004。 [3] 贾文晋,薛为民.Visual Basic.NET组件开发专业教程[M].北京:清华大学出版社,2004。 [4] 张树泉.Visual Basic.NET控件技术教程[M].北京:清华大学出版社,2004。 [5] 黄淼云.Visual Basic.NET函数技术教程[M].北京:清华大学出版社,2004。 [6] 章立民.Visual Basic.NET程序开发与界面设计秘诀[M].北京:机械工业出版社,2006。 [7] 方睿,刁仁宏,吴四九.网络数据库原理及应用[M].成都:四川大学出版社,2005。 第 18 页 共 20 页 致 谢 本文是在吴四九老师、陈念伟老师的热情关心和指导下完成的,他们渊博的知识和严谨的治学作风使我受益匪浅,对顺利完成本课题起到了极大的作用。在此向他表示我最衷心的感谢~ 感谢陈念伟老师在课题研究初期给予的帮助,在陈念伟老师的帮助下课题才得以很好的展开,有了一个很好的开端~ 在论文完成过程中,本人还得到了其他老师和许多同学的热心帮助,本人向他们表示深深的谢意~ 最后向在百忙之中评审本文的各位专家、老师表示衷心的感谢~ 作者简介: 姓 名:易 帆 性别:男 出生年月:1985-07 民族:汉 E-mail:yifan1818@126.com 第 19 页 共 20 页 声 明 本论文是2007年2月至2007年6月在成都信息工程学院网络工程系完成的。 文中除了特别加以标注地方外,不包含他人已经发表或撰写过的研究成果,也不包含为获得成都信息工程学院或其他教学机构的学位或证书而使用过的材料。除非另有说明,本文的工作是原始性工作。 关于学位论文使用权和研究成果知识产权的说明: 本人完全了解成都信息工程学院有关保管使用学位论文的规定,其中包括: (1)学校有权保管并向有关部门递交学位论文的原件与复印件。 (2)学校可以采用影印、缩印或其他复制方式保存学位论文。 (3)学校可以学术交流为目的复制、赠送和交换学位论文。 (4)学校可允许学位论文被查阅或借阅。 (5)学校可以公布学位论文的全部或部分内容(保密学位论文在解密后遵守此规定)。 除非另有科研合同和其他法律文书的制约,本论文的科研成果属于成都信息工程学院。 特此声明~ 第 20 页 共 20 页 Christopher Tolkien AINULINDAL? The Music of the Ainur There was Eru, the One, who in Arda is called Il鷙atar; and he made first the Ainur, the Holy Ones, that were the offspring of his thought, and they were with him before aught else was made. And he spoke to them, propounding to them themes of music; and they sang before him, and he was glad. But for a long while they sang only each alone, or but few together, while the rest hearkened; for each comprehended only that part of me mind of Il鷙atar from which he came, and in the understanding of their brethren they grew but slowly. Yet ever as they listened they came to deeper understanding, and increased in unison and harmony. And it came to pass that Il鷙atar called together all the Ainur and declared to them a mighty theme, unfolding to them things greater and more wonderful than he had yet revealed; and the glory of its beginning and the splendour of its end amazed the Ainur, so that they bowed before Il鷙atar and were silent. Then Il鷙atar said to them: 'Of the theme that I have declared to you, I will now that ye make in harmony together a Great Music. And since I have kindled you with the Flame Imperishable, ye shall show forth your powers in adorning this theme, each with his own thoughts and devices, if he will. But I win sit and hearken, and be glad that through you great beauty has been wakened into song.' Then the voices of the Ainur, like unto harps and lutes, and pipes and trumpets, and viols and organs, and like unto countless choirs singing with words, began to fashion the theme of Il鷙atar to a great music; and a sound arose of endless interchanging melodies woven in harmony that passed beyond hearing into the depths and into the heights, and the places of the dwelling of Il鷙atar were filled to overflowing, and the music and the echo of the music went out into the Void, and it was not void. Never since have the Ainur made any music like to this music, though it has been said that a greater still shall be made before Il鷙atar by the choirs of the Ainur and the Children of Il鷙atar after the end of days. Then the themes of Il鷙atar shall be played aright, and take Being in the moment of their utterance, for all shall then understand fully his intent in their part, and each shall know the comprehension of each, and Il鷙atar shall give to their thoughts the secret fire, being well pleased. But now Il鷙atar sat and hearkened, and for a great while it seemed good to him, for in the music there were no flaws. But as the theme progressed, it came into the heart of Melkor to interweave matters of his own imagining that were not in accord with the theme of Il鷙atar, for he sought therein to increase the power and glory of the part assigned to himself. To Melkor among the Ainur had been given the greatest gifts of power and knowledge, and he had a share in all the gifts of his brethren. He had gone often alone into the void places seeking the Imperishable Flame; for desire grew hot within him to bring into Being things of his own, and it seemed to him that Il鷙atar took no thought for the Void, and he was impatient of its emptiness. Yet he found not the Fire, for it is with Il鷙atar. But being alone he had begun to conceive thoughts of his own unlike those of his brethren. Some of these thoughts he now wove into his music, and straightway discord arose about him, and many that sang nigh him grew despondent, and their thought was disturbed and their music faltered; but some began to attune their music to his rather than to the thought which they had at first. Then the discord of Melkor spread ever wider, and the melodies which had been heard before foundered in a sea of turbulent sound. But Il鷙atar sat and hearkened until it seemed that about his throne there was a raging storm, as of dark waters that made war one upon another in an endless wrath that would not be assuaged. Then Il鷙atar arose, and the Ainur perceived that he smiled; and he lifted up his left hand, and a new theme began amid the storm, like and yet unlike to the former theme, and it gathered power and had new beauty. But the discord of Melkor rose in uproar and contended with it, and again there was a war of sound more violent than before, until many of the Ainur were dismayed and sang no longer, and Melkor had the mastery. Then again Il鷙atar arose, and the Ainur perceived that his countenance was stern; and he lifted up his right hand, and behold! a third theme grew amid the confusion, and it was unlike the others. For it seemed at first soft and sweet, a mere rippling of gentle sounds in delicate melodies; but it could not be quenched, and it took to itself power and profundity. And it seemed at last that there were two musics progressing at one time before the seat of Il鷙atar, and they were utterly at variance. The one was deep and wide and beautiful, but slow and blended with an immeasurable sorrow, from which its beauty chiefly came. The other had now achieved a unity of its own; but it was loud, and vain, and endlessly repeated; and it had little harmony, but rather a clamorous unison as of many trumpets braying upon a few notes. And it essayed to drown the other music by the violence of its voice, but it seemed that its most triumphant notes were taken by the other and woven into its own solemn pattern. In the midst of this strife, whereat the halls of Il鷙atar shook and a tremor ran out into the silences yet unmoved, Il鷙atar arose a third time, and his face was terrible to behold. Then he raised up both his hands, and in one chord, deeper than the Abyss, higher than the Firmament, piercing as the light of the eye of Il鷙atar, the Music ceased. Then Il鷙atar spoke, and he said: 'Mighty are the Ainur, and mightiest among them is Melkor; but that he may know, and all the Ainur, that I am Il鷙atar, those things that ye have sung, I will show them forth, that ye may see what ye have done. And thou, Melkor, shalt see that no theme may be played that hath not its uttermost source in me, nor can any alter the music in my despite. For he that attempteth this shall prove but mine instrument in the devising of things more wonderful, which he himself hath not imagined.' Then the Ainur were afraid, and they did not yet comprehend the words that were said to them; and Melkor was filled with shame, of which came secret anger. But Il鷙atar arose in splendour, and he went forth from the fair regions that he had made for the Ainur; and the Ainur followed him. But when they were come into the Void, Il鷙atar said to them: 'Behold your Music!' And he showed to them a vision, giving to them sight where before was only hearing; arid they saw a new World made visible before them, and it was globed amid the Void, and it was sustained therein, but was not of it. And as they looked and wondered this World began to unfold its history, and it seemed to them that it lived and grew. And when the Ainur had gazed for a while and were silent, Il鷙atar said again: 'Behold your Music! This is your minstrelsy; and each of you shall find contained herein, amid the design that I set before you, all those things which it may seem that he himself devised or added. And thou, Melkor, wilt discover all the secret thoughts of thy mind, and wilt perceive that they are but a part of the whole 第 21 页 共 20 页 and tributary to its glory.' And many other things Il鷙atar spoke to the Ainur at that time, and because of their memory of his words, and the knowledge that each has of the music that he himself made, the Ainur know much of what was, and is, and is to come, and few things are unseen by them. Yet some things there are that they cannot see, neither alone nor taking counsel together; for to none but himself has Il鷙atar revealed all that he has in store, and in every age there come forth things that are new and have no foretelling, for they do not proceed from the past. And so it was that as this vision of the World was played before them, the Ainur saw that it contained things which they had not thought. And they saw with amazement the coming of the Children of Il鷙atar, and the habitation that was prepared for them; and they perceived that they themselves in the labour of their music had been busy with the preparation of this dwelling, and yet knew not that it had any purpose beyond its own beauty. For the Children of Il鷙atar were conceived by him alone; and they came with the third theme, and were not in the theme which Il鷙atar propounded at the beginning, and none of the Ainur had part in their making. Therefore when they beheld them, the more did they love them, being things other than themselves, strange and free, wherein they saw the mind of Il鷙atar reflected anew, and learned yet a little more of his wisdom, which otherwise had been hidden even from the Ainur. Now the Children of Il鷙atar are Elves and Men, the Firstborn and the Followers. And amid all the splendours of the World, its vast halls and spaces, and its wheeling fires, Il鷙atar chose a place for their habitation in the Deeps of Time and in the midst of the innumerable stars. And this habitation might seem a little thing to those who consider only the majesty of the Ainur, and not their terrible sharpness; as who should take the whole field of Arda for the foundation of a pillar and so raise it until the cone of its summit were more bitter than a needle; or who consider only the immeasurable vastness of the World, which still the Ainur are shaping, and not the minute precision to which they shape all things therein. But when the Ainur had beheld this habitation in a vision and had seen the Children of Il鷙atar arise therein, then many of the most mighty among them bent all their thought and their desire towards that place. And of these Melkor was the chief, even as he was in the beginning the greatest of the Ainur who took part in the Music. And he feigned, even to himself at first, that he desired to go thither and order all things for the good of the Children of Il鷙atar, controlling the turmoils of the heat and the cold that had come to pass through him. But he desired rather to subdue to his will both Elves and Men, envying the gifts with which Il鷙atar promised to endow them; and he wished himself to have subject and servants, and to be called Lord, and to be a master over other wills. But the other Ainur looked upon this habitation set within the vast spaces of the World, which the Elves call Arda, the Earth; and their hearts rejoiced in light, and their eyes beholding many colours were filled with gladness; but because of the roaring of the sea they felt a great unquiet. And they observed the winds and the air, and the matters of which Arda was made, of iron and stone and silver and gold and many substances: but of all these water they most greatly praised. And it is said by the Eldar that in water there lives yet the echo of the Music of the Ainur more than in any substance else that is in this Earth; and many of the Children of Il鷙atar hearken still unsated to the voices of the Sea, and yet know not for what they listen. Now to water had that Ainu whom the Elves can Ulmo turned his thought, and of all most deeply was he instructed by Il鷙atar in music. But of the airs and winds Manw?most had pondered, who is the noblest of the Ainur. Of the fabric of Earth had Aul?thought, to whom Il鷙atar had given skin and knowledge scarce less than to Melkor; but the delight and pride of Aul?is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work. And Il鷙atar spoke to Ulmo, and said: 'Seest thou not how here in this little realm in the Deeps of Time Melkor hath made war upon thy province? He hath bethought him of bitter cold immoderate, and yet hath not destroyed the beauty of thy fountains, nor of my clear pools. Behold the snow, and the cunning work of frost! Melkor hath devised heats and fire without restraint, and hath not dried up thy desire nor utterly quelled the music of the sea. Behold rather the height and glory of the clouds, and the everchanging mists; and listen to the fall of rain upon the Earth! And in these clouds thou art drawn nearer to The Silmarillion, now published four years after the death of its author, is an account of the Elder Days, or the First Age of the World. In The Lord of the Rings were narrated the great events at the end of the Third Age; but the tales of The Silmarillion are legends deriving from a much deeper past, when Morgoth, the first Dark Lord, dwelt in Middle-earth, and the High Elves made war upon him for the recovery of the Silmarils. Not only, however, does The Silmarillion relate the events of a far earlier time than those of The Lord of the Rings; it is also, in all the essentials of its conception, far the earlier work. Indeed, although it was not then called The Silmarillion, it was already in being half a century ago; and in battered notebooks extending back to 1917 can still be read the earliest versions, often hastily pencilled, of the central stories of the mythology. But it was never published (though some indication of its content could be gleaned from The Lord of the Rings), and throughout my father's long life he never abandoned it, nor ceased even in his last years to work on it. In all that time The Silmarillion, considered simply as a large narrative structure, underwent relatively little radical change; it became long ago a fixed tradition, and background to later writings. But it was far indeed from being a fixed text, and did not remain unchanged even in certain fundamental ideas concerning the nature of the world it portrays; while the same legends came to be retold in longer and shorter forms, and in different styles. As the years passed the changes and variants, both in detail and in larger perspectives, became so complex, so pervasive, and so many-layered that a final and definitive version seemed unattainable. Moreover the old legends ('old' now not only in their derivation from the remote First Age, but also in terms of my father's life) became the vehicle and depository of his profoundest reflections. In h is later writing mythology and poetry sank down behind his theological and philosophical preoccupations: from which arose incompatibilities of tone. I was astonished while watching the news on NHK when the announcer suddenly began talking about me. "...and that concludes our news about Vietnam. Next, domestic topics. "Today, Mr. Tsutomu Morishita invited Miss Akiko Mikawa, a typist at his company, out to tea, but was refused. This was the fifth time Mr. Morishita had invited Miss Mikawa out to tea, though she'd only agreed to accompany him on the first occasion. Since then, he had been turned down repeatedly." "Huh? What, what, what!!" 第 22 页 共 20 页 I banged my cup down on the low table and my eyes widened. "Wh-what the devil is this!" My mug shot filled the screen. "The reason for Miss Mikawa's refusal of Mr. Morishita's invitation for a date is not yet known," continued the announcer. "However, according to Miss Hiruma Sakamoto, Miss Mikawa's friend and co-worker, Miss Mikawa does not necessarily dislike Mr. Morishita. It is likely that the reason she refused is that she simply does not like him all that much." A head and shoulders shot of Akiko Mikawa loomed on the screen. "From this, it is believed that Mr. Morishita did not make a particularly strong impression on Miss Mikawa the first time she had tea with him. Meanwhile, informed sources report that tonight Mr. Morishita did not go anywhere after work, but returned directly to his lodgings, where he prepared and is eating dinner by himself. That concludes our news about Mr. Morishita. "In other news, this evening is the night festival at the Yakuyoke Hachiman Shrine in Mizugaoka, Kobe. Let's go to our live report on the festivities from Mr. Mizuno, reporting from the scene." "Yes! Mizuno here..." I sat dazed, blankly watching the screen as the television broadcast the next story. "Whew, that was a shock," I murmured at last. It was an hallucination. It had to be. An illusion, and an auditory hallucination at that. Anything else was unthinkable. In the first place, what was the point of reporting that I had invited Akiko Misawa out, and that I had been soundly turned down as usual? It had no news value. Still, for an hallucination, the photographs of myself and Akiko Mikawa shown on the screen, the style of character used for our names underneath, and the way the announcer had spoken lingered all too vividly in my memory. I shook my head violently. "Impossible!" The news ended. I nodded decisively, then declared resolutely. "It?Ls an illusion. Yes. An illusion." I murmured on. "I guess there really are illusion as clear as this one." "Ha ha ha ha ha!" I laughed. The sound of my low laughter echoed in the four-and-a-half tatami-mat room. I tried imagining what would happen if the story really had been broadcast. If Akiko Mikawa had seen it, or if the guys at the office had seen it, what on earth would they think? I burst out laughing again at the thought, and it just wouldn't stop. "Ah-hahah! Hahahahahahaha! Hee,hee! Hahahahahahaha!" Even after I'd burrowed into my futon, I still couldn't stop laughing for some time. The next morning I was on the human interest page of the newspaper. MISS MIKAWA REFUSES MR. MORISHITA'S INVITATION! "At approximately 4:40 p.m. on the 18th, Mr. Tsutomu Morishita(28), employee of Kasuyama Electric Industry Ltd. of Sanko-machi, Shinjuku Ward, Tokyo, was turned down after asking Miss Akiko Mikawa(23), a typist at the same company, to have tea with him after work. Miss Mikawa said she had to return home early. When he asked Miss Mikawa in the hall, Mr.Morishita was wearing a red necktie with green polka dots purchased the previous day at a Shinjuku supermarket. "Mr. Morishita had no choice but This is the assignment essay for the summer vacation. The assignment was to write an essay titled "A Summer Vacation Trip". I heard that Kano had been to Hawaii with his mother. Farther than that, Fujimori's family took her to Canada, which is much farther than Hawaii. But I had no one to take me to a trip because I have neither Father nor Mother. My Father and Mother died in a traffic accident when I was four years old. Ever since then, I have been living with Grandmother. Everybody is going to make fun of me since I have not travelled anywhere so I cannot write the assignment essay. 第 23 页 共 20 页 Yet, to tell the truth, I've had a trip. I went there alone. This is true. The place I've been is much much farther than Hawaii or even Canada. It is the North Pole. I'm not lying, not at all. The reason I could go to such a far place by myself is because I had a letter of invitation from Polar King. The letter went like this: ywhere appeared. He was thin, short, had two children, and lived in a suburban high-rise. He was chief clerk for general affairs at a shipbuilding company. I became, once again, truly nameless. I tried asking Akiko out just once after that to see what would happen. I asked if she would meet me after work at a coffee shop. But Akiko refused. Since I know what kind of woman she was. I felt quite satisfied. After a month, there was no one left who remembered my face apart from my own acquaintances. Yet even so, there were sometimes people who would look startled on seeing my face. One day, in the train on my way back to my apartment, one of two girls sitting on the seat in front of me had that kind of expression on her face. "Gosh. I've seen that man before somewhere," she whispered, nudging the girl beside her with her elbow. Look. This guy. What does he do, I wonder?" The other girl gave me an annoyed glance. Finally she replied uninterestedy, "That guy? Oh, he's just a nobody." Dear Kazuhiro Uno, How are you doing? How is your grandmother? Prices and taxes have gone up too high these days, haven't they? I suppose, Kazuhiro, you will not go out anywhere during the summer vacation. But that will give you trouble when the time comes to write the summer assignment essay. So I invite you to the North Pole. The North Pole is a wonderful place. I would be glad if you'd come. Don't worry about the train fare. Use the ticket I enclosed. I'm looking forward to seeing you. Sincerely,Polar King I showed the letter to Grandmother right away. She was very pleased and the next day she got up early in the morning to prepare a lunch box for me. "Take extra underwear with you as the North Pole is a cold place," said Grandmother, putting my underwear and the lunch box into my bag. She also gave me a thousand yen. In the morning, Friday, August sixteenth, I set out for the North Pole with my bag. Leaving home but going in the opposite direction from school, I turned the corner of Tomoe-Ya Candy Store, and went through Hachiman-Mae Mall, passing Sakura Beauty Parlor, then came out in front of Takasu-Hachiman Station. I presented my ticket from Polar King to the ticket taker. He was surprised at the ticket and said, "Well, well. You'll go all the way to the North Pole all by yourself? Good boy!" A train bound for Hagite-Ochiai came along after I'd been waiting on the platform for a while. There were many people in the train and every one of them gave me a pat on the back when they heard I was visiting the North Pole alone. Passing the railroad bridge across Kamito River and making stops at stations such as Higashi-Tugumo-Cho and Hachiken-Sakagami, the train arrived at Hagite-Ochiai. I had to change there. I asked a railroad officer at the station which train I should transfer to. There were many people on that train too, but I could find a seat. 第 24 页 共 20 页 The train rushed, rushed and rushed through rice fields, farms and villages, through forests and woods, through big towns and beaches, through mountains and meadows, through railroad bridges and tunnels, and through countless numbers of them. The train seemed going northward and northward. At the northern end of Japan is Hokkaido. I arrived at Hokkaido by train. According to a railroad officer at Hokkaido Station, the land of Soviet Union is the north of Hokkaido, so you cannot go farther north unless you take a Soviet train. The officer also told me that Japan and the Soviet Union once had been in a bad mood, fighting, invading territories and once friends,--well, now they are still getting along--besides, there had been countless of various other things that you cannot explain in a word, the numbers of complicating, troublesome affairs between them, therefore the Japanese train cannot go into the Soviet land. So I had to walk from Hokkaido Station to the entrance of the Soviet Union. The entrance of the Soviet Union is the exit of Japan. I walked up, up to the north through Hokkaido Mall in front of the station, just as told by the railroad officer of Hokkaido Station. Then I came to the end of Japan. There stood the Soviet entrance gate, as large as the main gate of Tempuku-Ji Temple, and on the entrance was written "Entrance of the Soviet Union" in the Soviet language. I passed through the gate into the Soviet land. From the gate continues the Soviet Mall. There I walked through up and up to the north. Soon, it was noon. I was hungry, so I went into the Noodle Heaven in the Soviet Mall and ordered a bowl of noodle soup to have lunch in my bag with, just like when Grandmother and I had been to the Noodle Heaven in Tempuku-Ji Temple Mall to have lunch. After I finished eating, I paid seventy yen for the noodle, and walked up, up to the north through the mall again. Then I found myself in front of the Soviet Station. I presented my ticket again to the railroad officer of the Soviet Station and got on the train. The Soviet train ran up and up to the north. It rushed, rushed and rushed through rice fields, farms and villages, through forests and woods, through big towns and beaches,through mountains and meadows, over railroad bridges and through tunnels, and through countless numbers of them. his trouble!" It must cost money to print even a single copy of a newspaper. Who on earth would go to all that expense to plot to drive me crazy? I had absolutely no memory of doing anything to make someone hate me. If anything, I suppose it could be that someone else was in love with Akiko Mikawa. But even then, all I'd gotten from her so far was the cold shoulder. I figured that anyone who would try a prank on this scale must be a real loony. But there simply wasn't anyone like that around me. "Oh dear, it would have been better if I hadn't torn up that newspaper." I clicked my tongue at my own short temper. It might have helped me find the criminal, and it would have been evidence once I had him. to return to his lodgings in Kichijoji's Higashi-machi, where he prepared dinner and ate by himself. After dinner, he is believed to have gone straight to bed as usual. It was the fourth time in a row that Miss Mikawa had turned Mr. Morishita's invitation down." There was a mug shot of me. It was the same one I'd seen on television the night before. There was no picture of Akiko Mikawa. Apparently I was the main subject of the story. I read the article over four or five times while I drank some milk. Then I ripped it into shreds and dumped it in the wastebasket. "It's a plot," I muttered. It's somebody's plot. Damn! Going to all t 第 25 页 共 20 页
本文档为【家庭理财系统的设计与实现—毕业设计论文】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_721103
暂无简介~
格式:doc
大小:451KB
软件:Word
页数:0
分类:工学
上传时间:2017-10-19
浏览量:20