软件工程名片管理系统Word文档下载推荐.docx

上传人:b****7 文档编号:22552768 上传时间:2023-02-04 格式:DOCX 页数:20 大小:143.83KB
下载 相关 举报
软件工程名片管理系统Word文档下载推荐.docx_第1页
第1页 / 共20页
软件工程名片管理系统Word文档下载推荐.docx_第2页
第2页 / 共20页
软件工程名片管理系统Word文档下载推荐.docx_第3页
第3页 / 共20页
软件工程名片管理系统Word文档下载推荐.docx_第4页
第4页 / 共20页
软件工程名片管理系统Word文档下载推荐.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

软件工程名片管理系统Word文档下载推荐.docx

《软件工程名片管理系统Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《软件工程名片管理系统Word文档下载推荐.docx(20页珍藏版)》请在冰豆网上搜索。

软件工程名片管理系统Word文档下载推荐.docx

二、技术可行性

本设计“名片管理系统”是为各类人员开发的信息管理系统。

通过近几个月的学习和实践,对开发管理信息系统又有了新的认识。

使自己在开发管理信息系统方面的技术更加成熟。

由于本设计最重要体现的是实用性,所以,通过大量的社会调查和分析,结合自己现有的技术水平加上导师的指导,还是能按期完成本毕业设计。

三、经济可行性

成本方面:

由于本毕业设计属于计算机科学(本科)教学的最后一个环节,所以人力消耗免费,资源学校提供,指导老师义务指导。

所以成本计算只需计算开发期间开发者的生活消费,学校资源的消耗(主要包括机器的折价和消耗的电钱),所以开发本软件的成本是非常低的。

四、操作可行性

本软件的用户对象是信息管理的工作人员,由于本软件要设计成友好的界面,写出详细的使用说明,用户只需懂得简单的计算机操作知识,就能自由应用本软件。

所以从以上几个方面的分析来看,开发本软件是完全可行的。

五、需求分析

结合国内外管理软件的最新研究成果进行大量的调查和分析可以得出一下的需求分析。

(1)系统功能需求分析

系统开发的总体任务是各种信息的系统化、规范化和自动化。

主要完成功能:

系统基本信息设置。

包括添加新项目,退出等。

名片信息的删除,查询等。

名片信息的输入。

包括包括姓名,电话,手机,备注等。

(2)数据库需求分析

用户的需求具体体现在各种信息的提供、保存、更新、和查询,这就要求数据库结构能充分满足各种信息的输出和输入。

收集基本数据、数据结构以及数据处理的流程,组成一份详尽的数据字典,为后面的具体设计打下基础。

仔细分析调查的基础上,得到如下图所示的本系统所处理的数据流程。

名片管理系统数据流程图

六、系统总体设计

经过需求分析阶段的工作,系统必须“做什么”已经清楚了,现在是决定“怎样做”的时候了。

总体设计的基本目的就是回答“概括的说,系统应该如何实现?

”这个问题,因此,总体设计又称为概要设计或初步设计。

总体设计的重要任务是设计软件的结构,也就是要确定系统中每个程序由哪些模块组成,以及这些模块相互间的关系。

通常程序中的一个模块完成一个适当的子功能。

应该把模块组成良好的层次系统,顶层模块调用它的下层模块以实现程序的完整功能,每个下层模块再调用更下层的模块,从而完成程序的一个子功能,最下层的模块完成最具体的功能。

软件结构(即由模块组成的层次系统)可以用层次图或结构图来描述。

对需求分析得到各项功能进行集中、分块、按照结构化程序设计的要求,得到如下图所示的系统功能模块图。

系统功能模块图

(1)概念结构设计

由第三章的需求分析,就可以设计出能够满足用户需求的各种实体结构,以及他们之间的关系,为以后的逻辑结构设计打下基础。

名片信息实体E-R图如下所示:

客房信息实体E-R图

(2)逻辑结构设计

首先将名片管理信息系统的数据库概念结构转化为Access2003数据库系统所支持的实际数据模型,即:

数据库的逻辑结构。

其表格如下:

七、系统实现

1、用户登录窗体

publicclassLoginForm:

Form

{

privatevoidbtnOk_Click(objectsender,EventArgse)

if(txtUserName.Text.Trim().Length>

0&

&

txtPassword.Text.Trim().Length>

0)

stringstrConnect="

Provider=Microsoft.Jet.OLEDB.4.0;

DataSource=db.mdb;

PersistSecurityInfo=False;

"

;

OleDbConnectionthisConnection=newOleDbConnection(strConnect);

Try

stringname=txtUserName.Text.Trim();

stringpwd=txtPassword.Text.Trim();

thisConnection.Open();

OleDbCommandcmd=newOleDbCommand("

select*fromadminwhereusername='

+txtUserName.Text+"

'

andpassword='

+pwd+"

"

thisConnection);

OleDbDataReaderdr=cmd.ExecuteReader();

if(dr.Read())

this.Hide();

MainFormMCC=newMainForm();

MCC.Show();

}

else

{MessageBox.Show("

请输入用户名和密码

MessageBox.Show("

输入用户名或密码错误."

"

登录错误"

MessageBoxButtons.OK,MessageBoxIcon.Error,MessageBoxDefaultButton.Button1);

DialogResult=DialogResult.None;

privatevoidbtnCancel_Click(objectsender,EventArgse)

{

this.Close();

privatevoidtxtUserName_TextChanged(objectsender,EventArgse)

{

txtUserName.SelectAll();

}

privatevoidtxtPassword_TextChanged(objectsender,EventArgse)

txtPassword.SelectAll();

2、名片管理系统主窗体

本模块的创建是整个管理系统的重要环节,这是管理系统的主界面,本管理系统共五个模块,分别是系统设置,信息管理,类别管理,打印管理,查询管理。

其中系统设置模块功能是:

添加新类别,退出。

主窗体模块主要代码如下:

privatevoidLoadData()

stringstrConnect="

conn=newOleDbConnection(strConnect);

stringquery="

SELECTid,name,parentidFROMcodeitemsORDERBYparentid,id"

DataSetds=newDataSet();

conn.Open();

OleDbDataAdaptercommand=newOleDbDataAdapter(query,conn);

command.Fill(ds,"

codeitems"

);

DataTabledt=ds.Tables["

];

DataRowCollectionrows=dt.Rows;

Hashtableh=newHashtable();

arrCategoryID=newArrayList();

foreach(DataRowdrinrows)

{

TreeNodeItemtni=newTreeNodeItem((int)dr[0],(string)dr[1],(int)dr[2]);

intparentID=tni.ParentID;

if(tni.ID>

maxID)

{

maxID=tni.ID;

}

if(parentID==0)//iscategory

arrCategoryID.Add(tni);

ArrayListarr=(ArrayList)h[parentID];

if(arr==null)

arr=newArrayList();

h.Add(parentID,arr);

}

arr.Add(tni);

}

rootNode=newTreeNode("

名片管理"

rootNode.Tag=newTreeNodeItem(0,"

-1);

treeViewCode.Nodes.Add(rootNode);

if(maxID==-1)

maxID=0;

BuildBranch(h,0,rootNode);

3、类别设置模块

模块主要代码如下:

privatevoidShowNewCategoryForm()

CategoryFormf=newCategoryForm();

if(f.ShowDialog()==DialogResult.OK)

{

stringstrName=f.ItemName;

stringstrNotes=f.Notes;

if(CreateNewCategory(strName,strNotes)==null)

MessageBox.Show(this,"

不能保存到数据库,数据库错误!

"

错误提示"

MessageBoxButtons.OK,MessageBoxIcon.Error);

4、名片输入模块:

privatevoidShowNewItemForm()

ItemFormf=newItemForm(arrCategoryID);

{stringstrName=f.ItemName;

stringstrCode=f.Code;

TreeNodeItemtniCategory=(TreeNodeItem)f.Category;

TreeNodenewNode=newTreeNode(strName);

maxID++;

TreeNodeItemtni=newTreeNodeItem(maxID,strName,tniCategory.ID);

newNode.Tag=tni;

if(MessageBox.Show("

您确定要保存在"

+strAuthor,"

信息提示"

MessageBoxButtons.YesNo,MessageBoxIcon.Question)==DialogResult.Yes)

INSERTINTOcodeitems(id,name,code,notes,phone,email,msn,qq,address,author,parentid)"

if(i==-1

MessageBox.Show(this,"

不能保存到数据库,数据库错误!

}

else

{

for(intj=0;

j<

rootNode.Nodes.Count;

j++)

{

TreeNodenodeTemp=rootNode.Nodes[j];

TreeNodeItemtemp=(TreeNodeItem)nodeTemp.Tag;

if(temp.ID==tniCategory.ID)

{

nodeTemp.Nodes.Add(newNode);

catch(Exception)

{

MessageBox.Show(this,"

5、名片查询

privatevoidbtnOK_Click(objectsender,System.EventArgse)

if(txtSearch.Text.Trim()=="

{

MessageBox.Show(this,"

请输入你要查询的信息!

MessageBoxButtons.OK,MessageBoxIcon.Information);

txtSearch.Focus();

else

if(chkCode.Checked==false&

chkNotes.Checked==false)

请选择你要查询的范围!

else

{

this.DialogResult=DialogResult.OK;

6、修改模块

privatevoidEditCategoryItem()

{TreeNodecurNode=(TreeNode)treeViewCode.SelectedNode;

if(curNode==null)

return;

TreeNodeItemtni=(TreeNodeItem)curNode.Tag;

if(tni.ParentID==-1)//root

if(tni.ParentID==0)//iscategory

{CategoryFormf=newCategoryForm(curNode.Text,txtNotes.Text);

{stringstrName=f.ItemName;

stringstrNotes=f.Notes;

tni.Name=strName;

try

stringquery="

UPDATEcodeitemsSETname='

OleDbCommandcommand=newOleDbCommand(query,conn);

inti=command.ExecuteNonQuery();

if(i==-1)

{MessageBox.Show(this,"

不能保存到数据库,数据库出错!

}

else

{curNode.Text=strName;

txtNotes.Text=strNotes;

catch(Exception

MessageBox.Show(this,"

ItemFormf=newItemForm(arrCategoryID,tni,newCodeItem(txtCode.Text,txtNotes.Text,txtPhone.Text,txtEmail.Text,txtMsn.Text,txtQq.Text,txtAddress.Text),curNode.Parent.Text,curNode.Text);

7、打印模块

八、模块主要源代码:

privatevoidNews_Load(objectsender,System.EventArgse)

OleDbConnectionconn=newOleDbConnection(strConnect);

SELECT*FROMcodeitemsORDERBYparentid,id"

DataSetds=newDataSet();

conn.Open();

OleDbDataAdaptercommand=newOleDbDataAdapter(query,conn);

dataGrid1.DataSource=ds.Tables[0].DefaultView;

privatevoidmenuItem1_Click(objectsender,System.EventArgse)

privatevoidprintDocument1_PrintPage(objectsender,System.Drawing.Printing.PrintPageEventArgse)

privatevoidbutton1_Click(objectsender,System.EventArgse)

//createprinterclassobject

PrintC=newPrinterClass(printDocument1,dataGrid1);

printDocument1.Print();

privatevoidbutton2_Click(objectsender,System.EventArgse)

//createprinterclassobject

if(printPreviewDialog1.ShowDialog()==DialogResult.Cancel){}

privatevoidprintDocument2_PrintPage(objectsender,System.Drawing.Printing.PrintPageEventArgse)

floatCurrentX=(e.PageBounds.Width-e.MarginBounds.Left)/2;

//center

floatCurrentY=e.MarginBounds.Top;

stringtext=dataGrid1.CaptionText;

Fontfont=dataGrid1.CaptionFont;

e.Graphics.FillRectangle(newSolidBrush(dataGrid1.CaptionBack

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 解决方案

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1