资源描述
正文_预算管理系统
52
2020年5月29日
文档仅供参考
目 录
1.引言 1
2.系统技术及运行环境 1
2.1 ASP.NET简介 1
2.2 Visual Studio 简介 1
2.3 SQL Server 简介 2
3.系统分析 2
3.1需求分析 2
3.2可行性分析 2
4.总体设计 3
4.1项目规划 3
4.2系统功能图 3
4.3系统功能介绍 3
5.数据库设计 4
6.主要模块设计 6
6.1前台普通人员登录 6
6.2预算上报 7
6.3添加预算 10
6.3预算执行 12
6.4报销单上报 14
6.5预算查询 15
6.6修改密码 17
6.7后台财务人员登录 17
6.8项目(部门)查询 18
6.9添加项目(部门) 20
6.10预算详情查询 21
6.11报销单信息 23
6.12 汇总表信息 24
7.结束语 25
致 谢 26
参考文献 27
1.引言
随着中国高等教育改革的深化和发展,高校预算成为高校财务管理的一项重要工作,在高校各项管理工作中日渐占据了举足轻重的地位。当前各高校普遍采用的财务管理软件,大多数都没有预算科目额度控制的功能,无法进行实时的预算控制,需要经过手工记账的方式来管理。树立科学编制预算, 严格预算程序和预算执行的观念规范会计核算,是高校不断提高管理水平的重要保障,也能使有限的资金发挥最大的经济效益。 本文探讨如何更好地将高校的财务核算工作和预算控制相结合,进行相应的财务决策计划、控制和分析。
本文将根据高校财务和预算管理的需要,简要总结预算控制理论中的预算控制模式、控制环节和控制方法以及预算管理系统的定义和特点。而且针对高校财务管理系统中的预算管理模块作一研究,从而试图寻找适合高校的预算控制模式和方法。本文将详细介绍高校预算控制实施的内容和心得,并对当前高校预算控制模式和预算管理系统的改进提出了设想,从中总结出的成功或失败的经验能够为其它类型的非盈利组织提供可资借鉴的一般性规律。
2.系统技术及运行环境
2.1 ASP.NET简介
ASP.NET 是一种建立在通用语言上的程序构架,能被用于一台Web服务器来建立强大的Web应用程序。ASP.NET提供许多比现在的Web开发模式强大的的优势。
执行效率的大幅提高。ASP.NET是把基于通用语言的程序在服务器上运行。是将程序在服务器端首次运行时进行编译,这样的执行效果,当然比一条一条的解释强很多。
简单性和易学性。ASP.NET是运行一些很平常的任务如表单的提交客户端的身份验证、分布系统和网站配置变得非常简单。
2.2 Visual Studio 简介
Visual Studio 是一套完整的开发工具集,用于生成 ASP.NET Web 应用程序、XML Web Services、桌面应用程序和移动应用程序。Visual Basic、Visual C++、Visual C# 和 Visual J# 全都使用相同的集成开发环境 (IDE),利用此 IDE 能够共享工具且有助于创立混合语言解决方案。另外,这些语言利用了 .NET Framework 的功能,经过此框架可使用简化 ASP Web 应用程序和 XML Web Services 开发的关键技术。
Visual Studio 是微软在 发布的一个VS版本。.NET 字眼从各种语言的名字中被抹去,可是这个版本的 Visual Studio 依然还是面向 .NET 框架的(版本2.0)。它同时也能开发跨平台的应用程序,如开发使用微软操作系统的手机的程序等。总体来说是一个非常庞大的软件,甚至包含代码测试功能。
2.3 SQL Server 简介
SQL Server 是微软公司SQL Server生产线上的最受期待的产品。在成千上万的电子邮件、成百上千的规格说明以及大量的编译的基础上,SQL Server 确保了自己是Windows平台上数据库应用程序中最具戏剧性的新型数据库平台。
管理工具。SQL Server 引入一整套管理工具和管理API,管理工具和管理API使得SQL Server使用更方便、管理更轻松,而且支持大规模SQL Server部署操作。
数据转换服务(DTS)的增强。DTS在SQL Server 中全部重新设计了、提供全面的企业提取、转换和装载平台。它也被重新命名为SQL服务器集成服务(SQL Server Integration Services)。
3.系统分析
3.1需求分析
经过初步调查和分析,以及和学校计划财务处人员进行交谈,要求系统需要具有以下功能:
² 经过网络,实现预算的方便快捷管理;
² 由于网站的使用客户多,分布广泛,要求有较好的权限管理;
² 方便的实现预算上报和报销单上报以及增删改查操作;
² 经过后台对项目(部门)实现增删改查操作,以及对项目(部门)的各种渠道的预算或报销单进行那个审核或取消审核;
² 网站有良好的操作界面;
3.2可行性分析
(1)经济可行性
当前中国高校的预算管理普遍存在管理思想保守、管理方式僵化、管理方法落后等问题.本文对高校预算管理体系建设进行探讨,旨在打破旧的高校预算管理理念,建立一个适应现代高校事业发展的、科学的预算管理体制,从管理方式及管理方法等全方位地改变高校预算管理模式。
(2)技术可行性
本系统将大大改进数据处理速度,而且更加方便的对数据进行管理,同时能够减少人力资源的浪费以及工资支出 。对现有软件不会产生冲突,对使用的操作系统来说有很好的兼容性、稳定性。需要短时间来熟悉新系统,但不需要大量的培训。在以上限制条件下利用现有技术和人员,完全能够实现预期目标。开发人员应尽职尽责,尽量在规定期限内完成项目。
4.总体设计
4.1项目规划
项目(部门)预算管理系统是一个财务管理系统,是一个ASP.NET开发的B/S应用程序,由项目(部门)负责人前台申报预算、报销单和财务人员后台管理审核两大部分组成。
(1)前台功能模块
前台功能主要包括预算上报,报销单上报,预算查询,修改密码。
(2)后台管理模块
后台主要包括项目(部门)管理,预算查询及审核,报销单查询及审核,汇总表查询及修改,修改密码。
4.2系统功能图
本预算管理系统网站,功能结构如图4.1所示:
登录
前台页面
后台页面
预算上报
预算执行
预算查询
修改密码
项目信息
预算信息
报销单信息
汇总表信息
修改密码
图4.1 系统功能结构图
4.3系统功能介绍
前台页面主要包括以下的功能模块:
l 预算上报:显示登录项目(部门)的不同渠道的所有预算信息。点击预算上报按钮实现预算添加。还能够对未审核的预算进行修改或删除。
l 预算执行:显示登录项目(部门)的各个渠道的报销单信息。点击报销单上报实现报销单的添加。还能够对未审核的报销单进行修改或删除。
l 预算查询:显示登录项目(部门) 的不同渠道的所有预算信息,点击详细显示所有报销单信息。
l 修改密码:项目(部门)的负责人能够自行修改密码。
后台页面主要包括以下的功能模块:
l 查看所有项目信息:显示所有项目(部门)的详细信息。能够进行增删改操作。点击预算信息查看对应项目(部门)的预算信息。
l 查看所有预算信息:查看所有项目(部门)的预算信息,能够进行审核或取消审核操作。点击报销单信息能够查看对应项目(部门)和渠道的所有报销单信息。选择下拉列表里的不同项目(部门)能够查看对应的预算信息。
l 查看所有报销单信息:能够进行审核或取消审核操作。选择下拉列表里的不同项目(部门)能够查看对应的报销单信息。
l 查看所有汇总表信息:查看所有预算的执行情况。能够修改预算金额。选择下拉列表里的不同项目(部门)能够查看对应的汇总表信息。
l 修改密码:财务人员可自行修改密码。
5.数据库设计
本系统的库采用Microsoft SQL Server 数据库,数据库名为Finance。以下是数据库表关系图,如图5.1所示:
图5.1 数据库表关系图
Finance数据库包括Items,Categories,Budgets,BankrollGather,Notes。
(1)项目表Items
该表是财务管理人员负责添加,修改,删除,用户平台可修改密码。其表的结构见表5.1。
表5.1 Items表
字段名
数据类型
备注
ItemId
int
主键自动增加1 Not null
ItemName
varchar(200)
Not null
Category
varchar(50)
Not null
Manager
vvarchar(50)
Not null
Password
varchar(50)
默认值‘123456’ Not null
(2)财务类别表Categories
该表是财务管理人员负责添加、修改和删除。其表的结构见表5.2。
表5.2 Categories表
字段名
数据类型
备注
CategoryId
int
主键自动增加1 Not null
CategoryName
varchar(200)
Not null
(3)项目预算表Budgets
该表是用户平台负责添加数据,在审核状态”False”状态用户平台能够修改,删除
数据;财务管理人员平台负责审核,审核完成以下操作:1.修改审核状态为”True”
2.将项目编码, 报销渠道,预算金额,插入资金汇总表。其表的结构见表5.3。
表5.3 Budgets表
字段名
数据类型
备注
ItemId
int
外键 Not null
Channel
varchar(200)
外键 Not null
Budget
Money
Not null
Excuse
varchar(500)
Not null
Auditing
bit
默认值0 Not null
(4)资金汇总表BankrollGather
项目编码,报销渠道,预算金额由项目预算表Budgets提供,预算执行金额由提供,财务管理人员平台能够修改预算金额字段)。其表的结构见表5.4。
表5.4 BankrollGather表
字段名
数据类型
备注
ItemId
int
外键 Not null
Channel
varchar(200)
外键 Not null
Budget
Money
Null
BudgetExecute
Money
Null
(5)报销单表Notes
该表是用户负责添加数 据,在审核状态” False”状态下用户平台能够修改,删除; 财务管理人员平台负责审核,审核完成以下操作1根据部门代码,报销渠道 查找部门资金表,判断预算余额,累加预算使用金额,2修改审核状态为”已审核” 。其表结构见表5.5。
表5.5 Notes表
字段名
数据类型
备注
NoteId
int
主键自动增加1 Not null
ItemId
int
外键 Not null
Channel
varchar(200)
Not null
CategoryId
int
外键 Not null
Describe
Varchar(500)
Null
Operator
varchar(200)
Null
Certifier
varchar(50)
Null
Assessor
varchar(50)
Null
Cost
money
Null
Auditing
bit
Null
Userdefined1-5
varchar(200)
Null
Userdefined6-10
int
Null
6.主要模块设计
6.1前台普通人员登录
环境科学与工程系的负责人xx登录,输入用户名和密码,项目名称选择”环境科学与工程系”。 单击登录按钮,经过ItemId是否为”0”判断是后台登录还是前台登录,ItemId为”0”时是后台财务人员登录,不为”0”时是前台普通用户登录。
用户名密码跟正确则进入预算上报页面(SubmitBudget.aspx),若用户名密码错误,则显示”用户名或密码错误!”。如图6.1所示:
图6.1 项目(部门)管理人员登录
相关方法代码如下所示:
protected void btnLogin_Click1(object sender, EventArgs e)
{
Item item = new Item();
item.Manager = this.txtLoginId.Text;
item.Password = this.txtPwd.Text;
item.ItemId = int.Parse(this.DropDownList1.SelectedValue);
Item nitem = BudgetProBLL.ItemManager.login(item);
if (nitem != null && nitem.ItemId != 0)
{
Session["nitem"] = nitem;
Response.Redirect("~/CommonUser/SubmitBudget.aspx");
}
else if (nitem != null && nitem.ItemId == 0)
{
Session["nitem"] = nitem;
Response.Redirect("~/Admin/ItemsList.aspx");
}
else
{
this.lblMessage.Text = "用户名或密码错误!";
}
}
6.2预算上报
预算上报页面(SubmitBudget.aspx),单击图中手型按钮能够修改预算,单击红叉按钮删除预算,如图6.2所示:
图6.2 预算上报
此页面所涉及的主要方法代码如下:
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
if (Session["nitem"] == null)
{
Response.Redirect("Login.aspx");
}
else
{
Bind();
}
}
}
private void Bind()
{
Item item = (Item)Session["nitem"];
List<Budget> budgets=
BudgetProBLL.BudgetManager.getBudgetsByItemId(item.ItemId);
if(budgets.Count==0)
{
this.lblMessage.Visible = true;
this.lblMessage.Text = item.ItemName+"暂时没有任何预算!";
return;
}
this.GridView1.DataSource =budgets ;
this.GridView1.DataKeyNames = new string[] {"channel"};
this.GridView1.DataBind();
}
protected void btnBudget_Click(object sender, EventArgs e)
{
Response.Redirect("AddBudget.aspx");
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
this.GridView1.EditIndex= e.NewEditIndex;
Bind();
bindChannel(e.NewEditIndex);
}
//绑定channel
private void bindChannel(int num)
{
IList<string> lists = BudgetProBLL.BudgetManager.GetChannels();
(this.GridView1.Rows[num].FindControl("ddlChannel")
as DropDownList).DataSource = lists;
(this.GridView1.Rows[num].FindControl("ddlChannel")
as DropDownList).DataBind();
string originalChannel =
this.GridView1.DataKeys[num].Value.ToString();
for (int i = 0; i < lists.Count; i++)
{
string channel = (string)lists[i];
if (originalChannel == channel)
{
(this.GridView1.Rows[num].FindControl("ddlChannel")
as DropDownList).SelectedIndex = i; break;
}
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgse)
{
//荧光
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699ff'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
Label lblAuthing = (Label)e.Row.FindControl("lblAuthing");
ImageButton imgbtnEdit =
(ImageButton)e.Row.FindControl("imgbtnEdit");
ImageButton imgbtnDelete =
(ImageButton)e.Row.FindControl("imgbtnDelete");
if (lblAuthing.Text == "已审核")
{
imgbtnEdit.Visible = false;
imgbtnDelete.Visible = false;
}
else
{
imgbtnEdit.Visible = true;
imgbtnDelete.Visible = true;
}
//删除确认
(e.Row.FindControl("imgbtnDelete") as
ImageButton).Attributes.Add("onclick", "return confirm('确定要删除吗?')");
}
}
protected void GridView1_RowCommand(object sender,GridViewCommandEventArgs e)
{
string cmd = e.CommandName;
string itemAndChannel = e.CommandArgument.ToString();
int index = itemAndChannel.IndexOf(",");
int itemId = int.Parse(itemAndChannel.Substring(0,index));
string channel = itemAndChannel.Substring(index+1);
if (cmd == "Delete")
{
Budget budget = (Budget)Session["budget"];
BudgetProBLL.BudgetManager.deleteBudget(itemId,channel);
Response.Redirect("SubmitBudget.aspx");
}
if (cmd == "Edit")
{
Response.Redirect("EditBudget.aspx?itemId="+itemId+"
&channel="+channel+"");
}
}
6.3添加预算
单击预算上报按钮进入添加预算页面(AddBudget.aspx),如图6.3所示:
图6.3 添加预算
注意:预算渠道是能够自定义的。在下拉框后面的文本框里填写报销渠道。如图6.4所示:
图6.4 自定义添加预算
如果该项目的报销渠道已经存在,会提示”已存在此预算!”,如图6.5所示:
图6.5 添加已存在的预算
单击图6.3、图6.4、图6.5中的确定按钮相关方法代码如下:
protected void btnConfirm_Click(object sender, EventArgs e)
{
this.RequiredFieldValidator1.Visible = this.txtChannel.Visible;
Budget budget = new Budget();
if (this.DropDownList1.SelectedValue.Equals("自定义"))
{
this.txtChannel.Visible = true;
budget.Channel = this.txtChannel.Text;
}
else
{
budget.Channel = this.DropDownList1.SelectedValue;
}
Item item = (Item)Session["nitem"];
budget.Item = item;
budget.Budget1 = decimal.Parse(this.txtBudget.Text);
budget.Excuse = this.txtExcute.Text;
int num = BudgetProBLL.BudgetManager.
isExistsBudget(item.ItemId,budget.Channel);
if (num > 0)
{
this.lblMessages.Text = "已存在此预算!";
return;
}
else
{
int num1 = BudgetProBLL.BudgetManager.AddBudget(budget);
Response.Redirect("SubmitBudget.aspx");
}
}
6.3预算执行
预算执行页面(BudgetExecute.aspx),如图6.6所示:
图6.6 预算执行
相关方法代码如下所示:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Session["nitem"] == null)
{
Response.Redirect("Login.aspx");
}
else
{
BindNote();
}
}
}
private void BindNote()
{
Item item = (Item)Session["nitem"];
IList<Note> notes =
BudgetProBLL.NoteManager.GetNotesByItemId(item.ItemId);
if(notes.Count==0)
{
this.lblMessage.Visible = true;
this.lblMessage.Text = item.ItemName+"暂时没有报销单!";
}
this.GridView1.DataSource = notes;
this.GridView1.DataBind();
}
protected void btnReport_Click(object sender, EventArgs e)
{
Response.Redirect("AddNote.aspx");
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.
backgroundColor='#ff9900'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor;");
Label lblAuditing = (Label)e.Row.FindControl("lblAuditing");
ImageButton imgbtnEdit =
(ImageButton)e.Row.FindControl("imgbtnEdit");
ImageButton imgbtnDelete =
(ImageButton)e.Row.FindControl("imgbtnDelete");
if (lblAuditing.Text == "已审核")
{
imgbtnEdit.Visible = false;
imgbtnDelete.Visible = false;
}
else
{
imgbtnEdit.Visible = true;
imgbtnDelete.Visible = true;
}
ImageButton imgbtn =
(ImageButton)e.Row.FindControl("imgbtnDelete");
imgbtn.Attributes.Add("onclick", "return confirm('您确认要删除吗?');");
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
string cmd = e.CommandName;
int noteId = Convert.ToInt32(e.CommandArgument);
if (cmd == "Delete")
{
BudgetProBLL.NoteManager.DeleteNotesByNoteId(noteId);
}
if (cmd == "Edit")
{
Response.Redirect("EditNote.aspx?noteId=" + noteId);
}
BindNote();
}
6.4报销单上报
报销单上报(AddNote.aspx)页面,如图6.7所示:
图6.7 报销单上报
单击上报按钮,相关方法代码如下:
protected void btnOK_Click(object sender, EventArgs e)
{
Item item=(Item)Session["nitem"];
Note note = new Note();
note.ItemId = item.ItemId;
note.Channel = this.ddlChannel.SelectedItem.ToString();
int categoryId=int.Parse(this.ddlCategory.SelectedValue);
note.Categories = BudgetProBLL.CategoryManager.GetCategoryById(categoryId);
note.Operator1 = this.txtOperator.Text;
note.Cetifier = this.txtCertifer.Text;
note.Assessor = this.txtAssessor.Text;
note.Describe = this.txtDescribe.Text;
note.Cost =decimal.Parse(this.txtCost.Text);
string message=BudgetProBLL.NoteManager.AddNote(note);
Response.Redirect("BudgetExecute.aspx");
}
6.5预算查询
预算查询(BudgetSearch.aspx)页面,如图6.8所示:
图6.8 预算查询
点击详细按钮显示登录项目(部门)的对应渠道的所有报销单信息(BudgetDetail.aspx),如图6.9所示:
图6.9 报销单信息
BudgetDetail.aspx页显示内容的相关方法代码如下:
private void BindNotes()
{
string channel = Request.QueryString["channel"].ToString();
Item item = (Item)Session["nitem"];
IList<Note> notes =BudgetProBLL.
NoteManager.GetNotesByItemIdAndChannel(item.ItemId,channel);
if(notes.Count==0)
{
this.lblMessage.Visible = true;
this.lblMessage.Text = item.ItemName+"的"+channel+"预算暂时没有报销单!";
return;
}
this.GridView1.DataSource = notes;
this.GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#ff9900'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor;");
Label lblAuditing = (Label)e.Row.FindControl("lblAuditing");
ImageButton imgbtnEdit =
(ImageButton)e.Row.FindControl("imgbtnEdit");
ImageButton imgbtnDelete =
(ImageButton)e.Row.FindControl("imgbtnDelete");
if (lblAuditing.Text == "已审核")
{
imgbtnEdit.Visible = false;
imgbtnDelete.Visible = false;
}
else
{
imgbtnEdit.Visible = true;
img
展开阅读全文