软件工程课程设计报告网吧会员管理系统.doc

上传人:叶*** 文档编号:35145243 上传时间:2022-08-20 格式:DOC 页数:26 大小:98.50KB
返回 下载 相关 举报
软件工程课程设计报告网吧会员管理系统.doc_第1页
第1页 / 共26页
软件工程课程设计报告网吧会员管理系统.doc_第2页
第2页 / 共26页
点击查看更多>>
资源描述

《软件工程课程设计报告网吧会员管理系统.doc》由会员分享,可在线阅读,更多相关《软件工程课程设计报告网吧会员管理系统.doc(26页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

1、网吧会员管理系统一 可行性分析管理与决策,提高运行效率与经营效益,以计算机为代表信息技术被广泛采用,并及管理科学、系统科学等结合起来,构建了全新管理信息系统学科。计算机应用已普及到经济与社会生活各个领域。使原本旧管理方法越来越不适应现在社会发展。许多人还停留在以前手工操作,这大大地阻碍了社会经济发展。为了适应现代社会人们高度强烈时间观念,网吧信息管理系统软件为网吧办公带来了极大方便。作为网吧信息管理系统一部分,网吧会员管理系统对会员管理具有无可比拟优点。例如,检索迅速、查找方便、可靠性高、存储量大、保密性好、成本低等。这些优点极大地提高网吧管理效率,也是网吧科学化、正规化管理重要条件。经济可行

2、性:由于网吧人口流动比较大,会员数量比较多,如果没有一个好管理系统,其业务过程中产生数据将得不到及时存储与处理,显得比较杂乱无章,难以分析,比较与归纳,会浪费大量人力、物力与时间。其次,开发本系统不需要很高成本,开发时间短,是网吧能够在短时间内就可以达到很好管理效果。技术可行性:网吧会员管理系统整体简单,不需要大量技术与专业知识。普通程序员只要在了解网吧工作流程基础上就可以开发出来,唯一值得注意地方就是系统安全性。出于对安全方面考虑,本系统主要针对网吧管理员而设计。管理员登录系统流程图如图1所示:功能选择数据处理退出图1 系统流程图二 需求分析1 系统目标系统应具有方便、强大资料管理与良好人机

3、界面,使网吧管理员易于操作,便于浏览。系统健壮性、扩展性良好。系统安全性好,通过密码与权限管理使用户数据不受到侵害。系统动态信息交互功能强,系统根据不同管理员权限开放不同处理权限。、系统功能介绍本系统分为管理员与超级管理员,管理员能够对会员进行添加,删除,信息修改,充值等操作。超级管理员拥有管理员一起操作,并且能够对管理员添加,删除,修改信息。本系统E-R图如图2所示:图2 系统E-R图 2 网吧会员管理数据库设计管理员表如表1所示:表1 管理员信息表列名数据类型宽度字段描述Anamevarchar20管理员姓名,主键Apwdvarchar20管理员密码会员基本信息表如表2所示:表2 会员基本

4、信息表列名数据类型宽度字段描述Vid_numvarchar18身份证号,唯一Vageint4年龄,大于18Vlevel varchar10会员级别Vidvarchar30会员号,主键,外键Vpwdvarchar50会员密码会员消费信息表如表3所示:表3 会员消费信息表列名数据类型宽度字段描述Vidvarchar30会员号Vcostphint4每小时花费Vmoneyint4账户余额三 总体设计本系统属于B/S架构,页面总体设计反应了整个系统界面组成结构。由于非常重视安全方面问题,本系统主要为管理员设计,管理员其中包括超级管理员拥有对会员添加,删除,修改等操作。系统HIPO图如图3所示:会员系统管

5、理员超级管理员添加会员修改会员信息删除会员查看会员信息修改会员信息删除管理员添加会员查看会员信息为会员充值为会员充值删除会员添加管理员修改管理员信息图3 系统HIPO图功能介绍:本系统分为超级管理员与管理员。管理员可以添加,修改,删除会员信息,并且可以为会员充值,超级管理员除了拥有普通管理员权限外还能够添加,修改,删除管理员。四 详细设计实现思路:本系统设置有拥有不同权限管理员,根据登录账号不同,可以调转到不同页面,实现不同功能。其中,超级管理员与普通管理员对会员权限是相同,都是查看,添加,删除,修改,超级管理员还拥有对普通管理员查看,添加,修改,删除。1 普通管理员查看会员信息模块当管理员登

6、录系统后,通过选择查看会员信息功能,可以查看任何会员信息,并且可以通过搜索选择所要查看会员信息。普通管理员登录存在? N Y进入系统选择查看功能完成,退出系统图4 普通管理员功能图2 普通管理员添加会员模块管理员进入系统后,首先选择添加会员功能,然后输入所要添加会员姓名,年龄,密码,充值等信息,可根据所充值设置级别,并且只能在首次充值时候设置级别。进入系统选择添加会员功能输入会员信息完成,退出系统图6 普通管理员添加会员3 普通管理员修改员信息模块管理员进入系统后,首先选择修改功能,然后输入要修改会员ID,进行查找,可以修改会员密码。进入系统选择修改功能查找会员修改信息完成,退出系统图7 普通

7、管理员修改会员信息4 普通管理员删除会员模块管理员进入系统后,首先选择删除功能,如果向只删除固定ID会员可以借助查找功能,还可以同时删除多个会员。进入系统选择删除功能查找会员删除会员完成,退出系统图8 普通管理员删除会员5 普通管理员为会员充值模块当会员来充值时,管理员首先选择充值功能,然后查找所要充值会员ID,最后输入所要充值。进入系统选择充值功能查找会员为会员充值完成,退出系统图9 普通管理员给会员充值6 超级管理员查看普通管理员模块当超级管理员登录系统后,通过选择查看管理员信息功能,可以查看任何管理员信息,并且可以通过搜索选择所要查看管理员信息。超级管理员登录存在? NY进入系统选择查看

8、功能完成,退出系统图10 超级管理员查看会员信息7 超级管理员添加普通管理员模块超级管理员进入系统后,首先选择添加管理员功能,然后输入所要添加管理员姓名,密码等信息。进入系统选择添加管理员功能输入管理员信息完成,退出系统图11 超级管理员添加管理员8 超级管理员修改普通管理员模块超级管理员进入系统后,首先选择修改管理员信息功能,然后输入要修改管理员ID,进行查找,可以修改管理员密码。进入系统选择管理员信息修改功能查找管理员修改信息完成,退出系统图12 超级管理员修改普通管理员模块9 超级管理员删除普通管理员模块超级管理员进入系统后,首先选择删除功能,如果向只删除固定ID管理员可以借助查找功能,

9、还可以同时删除多个管理员。进入系统选择删除管理员功能查找管理员删除管理员完成,退出系统图13 超级管理员删除普通管理员五 编码及实现1 管理员登录模块根据登录名称不同分别跳转到不用页面来进行操作。public partial class _Default : System.Web.UI.Page protected void Button1_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettingsconnString); conn.Open

10、(); string sql = select * from Administrator where Aname= + this.TextBoxName.Text + and Apwd= + this.TextBoxPwd.Text + ; SqlCommand cmd = new SqlCommand(sql, conn); SqlDataReader sdr = cmd.ExecuteReader(); if (sdr.Read() = true) conn.Close(); SessionUserName = this.TextBoxName.Text; Response.Redirec

11、t(admin/Default1.aspx); else if (this.TextBoxName.Text = admin & this.TextBoxPwd.Text = admin) SessionUserName = admin; Response.Write(window.location.href=admin/Default.aspx;); else SessionUserName = null; Response.Write(window.alert(请输入正确用户名与密码!););2 查看会员信息模块public partial class AddInfototables :

12、System.Web.UI.Pageprotected void Page_Load(object sender, EventArgs e) SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettingsconnString); string sql = select * from VIPInfo where Vid_num= + Sessionvalues1+ ; SqlCommand cmd = new SqlCommand(); cmd.Connection=conn; cmdmandText=select

13、 Vid from VIPInfo where Vid_num=+Sessionid+; cmd.Parameters.AddWithValue(Vid_num,Sessionid); conn.Open(); if (Sessionid = null) goto next; else string res = cmd.ExecuteScalar().ToString(); int money = Convert.ToInt32(Sessionmoney); if (money 0 & money = 200) cmdmandText = insert into Bronze(Vid,Vcos

14、tph,Vmoney) values( + res + ,3.0, + Sessionmoney + ); else if (money = 500) cmdmandText = insert into Silver(Vid,Vcostph,Vmoney) values( + res + ,2.0, + Sessionmoney + ); else cmdmandText = insert into Golden(Vid,Vcostph,Vmoney) values( + res + ,1.0, + Sessionmoney + ); cmd.ExecuteNonQuery(); conn.C

15、lose(); next: if (!this.IsPostBack) bind(); public void bind() PagedDataSource ps = new PagedDataSource(); int curpage = Convert.ToInt32(this.LabelPage.Text); SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettingsconnString); string sql = select * from VIPInfo; DataSet ds = new Data

16、Set(); con.Open(); SqlDataAdapter sda = new SqlDataAdapter(sql, con); sda.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); this.GridView1.AllowPaging = true; this.GridView1.PagerSettings.Visible = false; this.GridView1.PageSize = 20; this.LabelPageRecordsNum.Text = Convert.ToString(this.Gr

17、idView1.PageSize); this.GridView1.PageIndex = curpage - 1; thisButtonOne.Enabled = true; thisButtonUp.Enabled = true; thisButtonNext.Enabled = true; thisButtonBack.Enabled = true; if (curpage = 1) thisButtonOne.Enabled = false; thisButtonUp.Enabled = false; this.GridView1.DataSource = ds; this.GridV

18、iew1.DataBind(); this.LabelBackPage.Text = Convert.ToString(this.GridView1.PageCount); int final = Convert.ToInt32(this.LabelBackPage.Text); if (curpage = this.GridView1.PageCount|final=0) thisButtonBack.Enabled = false; thisButtonNext.Enabled = false; con.Close(); protected void LinkButtonOne_Click

19、(object sender, EventArgs e) this.LabelPage.Text = 1; this.bind(); protected void LinkButtonUp_Click(object sender, EventArgs e) this.LabelPage.Text = Convert.ToString(Convert.ToInt32(this.LabelPage.Text) - 1);this.bind(); protected void LinkButtonNext_Click(object sender, EventArgs e) this.LabelPag

20、e.Text = Convert.ToString(Convert.ToInt32(this.LabelPage.Text) + 1);this.bind(); protected void LinkButtonBack_Click(object sender, EventArgs e) this.LabelPage.Text = this.LabelBackPage.Text;this.bind(); protected void ButtonSearch_Click(object sender, EventArgs e) PagedDataSource ps = new PagedData

21、Source(); int curpage = Convert.ToInt32(this.LabelPage.Text); SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettingsconnString); string sql = ; if (this.TextBoxID.Text = ) sql = select * from VIPInfo ; else /sql = select * from Users where Uname like % + this.TextBoxUname.Text + %;

22、sql = select * from VIPInfo where Vid = + this.TextBoxID.Text + ; DataSet ds = new DataSet(); con.Open(); SqlDataAdapter sda = new SqlDataAdapter(sql, con); sda.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); this.GridView1.AllowPaging = true; this.GridView1.PagerSettings.Visible = false;

23、 this.GridView1.PageSize = 20; this.LabelPageRecordsNum.Text = Convert.ToString(this.GridView1.PageSize); this.GridView1.PageIndex = curpage - 1; thisButtonOne.Enabled = true; thisButtonUp.Enabled = true; thisButtonNext.Enabled = true; thisButtonBack.Enabled = true; if (curpage = 1) thisButtonOne.En

24、abled = false; thisButtonUp.Enabled = false; this.GridView1.DataSource = ds; this.GridView1.DataBind(); this.LabelBackPage.Text = Convert.ToString(this.GridView1.PageCount); int final = Convert.ToInt32(this.LabelBackPage.Text); if (curpage = this.GridView1.PageCount | final = 0) thisButtonBack.Enabl

25、ed = false; thisButtonNext.Enabled = false; con.Close();3 修改会员信息模块public partial class VIPInfoxiugai : System.Web.UI.Pageprotected void Page_Load(object sender, EventArgs e) if (!this.IsPostBack) string hid = this.Request.QueryStringid.ToString(); SqlConnection conn = new SqlConnection(Configuration

26、Settings.AppSettingsconnString); conn.Open(); string sql = select * from VIPInfo where Vid= + hid + ; SqlCommand cmd = new SqlCommand(sql, conn); SqlDataReader sdr = cmd.ExecuteReader(); if (sdr.Read() this.LabelID.Text = sdrVid.ToString(); this.TextBoxPwd.Text = sdrVpwd.ToString(); conn.Close(); pr

27、otected void ButtonOk_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettingsconnString); conn.Open(); string sql = update VIPInfo set Vpwd= + this.TextBoxPwd.Text + where Vid= + this.LabelID.Text + ; SqlCommand cmd = new SqlCommand(sql, conn); cmd.

28、ExecuteNonQuery(); conn.Close(); Response.Write(window.alert(修改成功!);); Server.Transfer(VIPxianshi.aspx);4 删除会员模块public partial class VIPdelete : System.Web.UI.Pagepublic void bind() PagedDataSource ps = new PagedDataSource(); int curpage = Convert.ToInt32(this.LabelPage.Text); SqlConnection con = ne

29、w SqlConnection(ConfigurationSettings.AppSettingsconnString); string sql = select * from VIPInfo; DataSet ds = new DataSet(); con.Open(); SqlDataAdapter sda = new SqlDataAdapter(sql, con); sda.Fill(ds); this.GridView1.AllowPaging = true; this.GridView1.PagerSettings.Visible = false; this.GridView1.P

30、ageSize = 20; this.LabelPageRecordsNum.Text = Convert.ToString(this.GridView1.PageSize); this.GridView1.PageIndex = curpage - 1; thisButtonOne.Enabled = true; thisButtonUp.Enabled = true; thisButtonNext.Enabled = true; thisButtonBack.Enabled = true; if (curpage = 1) thisButtonOne.Enabled = false; th

31、isButtonUp.Enabled = false; this.GridView1.DataSource = ds; GridView1.DataKeyNames = new string Vid ; this.GridView1.DataBind(); this.LabelBackPage.Text = Convert.ToString(this.GridView1.PageCount); int final = Convert.ToInt32(this.LabelBackPage.Text); if (curpage = this.GridView1.PageCount|final=0)

32、 thisButtonBack.Enabled = false; thisButtonNext.Enabled = false; con.Close(); protected void Page_Load(object sender, EventArgs e) if (!this.IsPostBack) bind(); protected void LinkButtonOne_Click(object sender, EventArgs e) this.LabelPage.Text = 1;this.bind(); protected void LinkButtonUp_Click(objec

33、t sender, EventArgs e) this.LabelPage.Text = Convert.ToString(Convert.ToInt32(this.LabelPage.Text) - 1); this.bind(); protected void LinkButtonNext_Click(object sender, EventArgs e) this.LabelPage.Text = Convert.ToString(Convert.ToInt32(this.LabelPage.Text) + 1);this.bind(); protected void LinkButto

34、nBack_Click(object sender, EventArgs e) this.LabelPage.Text = this.LabelBackPage.Text; this.bind(); protected void ButtonDelete_Click(object sender, EventArgs e) SqlConnection sqlcon = new SqlConnection(ConfigurationSettings.AppSettingsconnString); for (int i = 0; i = GridView1.Rows.Count - 1; i+) C

35、heckBox cbox = (CheckBox)GridView1.Rowsi.FindControl(CheckBox1); if (cbox.Checked = true) string sqlstr = delete from VIPInfo where Vid= + GridView1.DataKeysi.Value + ; SqlCommand sqlcom = new SqlCommand(sqlstr, sqlcon); sqlcon.Open(); sqlcom.ExecuteNonQuery(); sqlcon.Close(); sqlcon.Close(); bind()

36、;5 给会员充值模块public partial class add : System.Web.UI.Page string level = ; protected void Page_Load(object sender, EventArgs e) if (!this.IsPostBack) string hid = this.Request.QueryStringid.ToString(); SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettingsconnString); conn.Open(); st

37、ring sql = select * from VIPInfo where Vid= + hid + ; SqlCommand cmd = new SqlCommand(sql, conn); SqlDataReader sdr = cmd.ExecuteReader(); if (sdr.Read() this.LabelID.Text = sdrVid.ToString(); SessionHuiId = this.LabelID.Text; this.TextBoxchongzhi.Text = sdrVpwd.ToString(); level = sdrVlevel.ToStrin

38、g(); conn.Close(); protected void ButtonOk_Click(object sender, EventArgs e) SessionLmoney = this.TextBoxchongzhi.Text; SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettingsconnString); conn.Open(); string sql = ; if (level = Golden) sql = update Golden set Vmoney= + this.TextBoxc

39、hongzhi.Text + where Vid= + this.LabelID.Text + ; else if (level = Silver) sql = update Silver set Vmoney= + this.TextBoxchongzhi.Text + where Vid= + this.LabelID.Text + ; else sql = update Bronze set Vmoney= + this.TextBoxchongzhi.Text + where Vid= + this.LabelID.Text + ; SqlCommand cmd = new SqlCommand(sql, conn); cmd.ExecuteNonQuery(); conn.Close(); Response.Write(window.alert(充值成功!););

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 工作报告

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com