会议管理系统的分析与设计_第1页
会议管理系统的分析与设计_第2页
会议管理系统的分析与设计_第3页
会议管理系统的分析与设计_第4页
会议管理系统的分析与设计_第5页
已阅读5页,还剩26页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

件工程实验报告.doc20116要伴随着定规模员流动和消费。前大部分主办方均有意尝试信息化更强活动管理系统管理建设,仅节约开发周期、并且费用低廉、样也可以自定义网站样式及风格,并且线注册环节比自主开发更稳定和可靠。本次实验利用VisualC开发语言工具,SQLserver数据库开发工具,开发小型室管理系统。关键词:;数据库;管理系统录122222333466667775.1.1E-R75.2.17主界面 8登陆界面 8用户注册界面 9用户申请室 后主界面 后登陆 查询室 处用户申请 删除用户信息 处用户结账 软件测试 2424测试内容 24结 27参考文献 28ASP.NET技术系统设计与实计算机强功能人们深刻认识。、修改、删除:1)先注册一个账号通过注册账号登陆进操作。相应后如果继续使。也删除。结账:1)员登陆查询情况(空闲或占。员处为分配。员删除基。员处结账。前提求、对、对。能:方便快捷实现、修改、删除功能。、、、、方法1)技术l#Lr。本对一。2)济开发VisualC2005SQLserver软件开发小组已拥再购买开发成较低从济方面来说开发。,:大程度避免管理中容易现些错误。使用要用户熟悉Windows操作,并且有操作础。预计将会在些小会议室租赁公司中得到广泛使用。性要求安全、可靠齐全界面清晰大方,操作简单易于维护和扩充数据流图顶层数据流图如图3.1所示:会议室记录表会议室记录表申请修改删除会议室管理员用户信息表会议管理系统用户注册图3.1 0层数据流图如图3.2所示:11写户信息信息2室5查询删除分配会议室会议室记录6处理管理员3删除4修改账单7计算费用结账

3.2 名:客别名:描述:客个人信息,于对客确认位置:输入到会议系统管理员端向描述意名:客别名:描述:客个人信息,于对客确认位置:输入到会议系统管理员端别名:描述:已申请会议室客记录位置:输入到会议系统管理员端义位置传输到系统管理员端通知根据义通知=位置传输到系统管理员端已租出出租情况位置输出到打印机记录已在出租公司记录记录=ID+位置输出到系统管理员端称义管到系统管理员端现有资源条件下风险有多大实现。社会会社会、政治引起侵权、破坏或其他责任系统流程图图形符号描述组成系统各个元素及信息这些部件之流动情况。的逻程。数据源形数据流图部实之系。数据说明为系统、维护提供了有关元素详细描述。任务述系统个实会系统信息总会议室管理系统用户管理员删登陆注册申请会议室查询会议室处修改删除社信息系统况各次会议室管理系统用户管理员删登陆注册申请会议室查询会议室处修改删除处除理理用用申户户请信结息账4.1议管系统块图5.1.1E-R图E-R5.1N1N1MN价格5.2.1

5.1E-R图属R间1nnR:室(号类价格状态)预订(号室类时间电话公司名称)主要界面登陆界面首先连接数据库进入登录窗口5.2usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Data.SqlClient;publicpartialclass_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidBtnOk_Click(Objectsender,EventArgse){stringStrYhm=TxtYhm.Text.Trim();stringStrMm=TxtMm.Text.Trim();if(StrYhm==""||StrMm==""){Response.Write"<script>alert(入用户名或密码!');</script>");}else{SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlCommandmycom=mycon.CreateCommand();mycomxmandText="select用户ID,密码from用户表where用户ID='"+StrYhm+"'and密码='"+StrMm+"'";SqlDataReadermyread=mycom.ExecuteReader();boolflag=myread.Read();if(flag){Response.Redirect("main.aspx");}else{Response.Write"<script>alert('登录失败!');</script>");}mycon.Close();mycom.Dispose();}}protectedvoidBtnCancel_Click(Objectsender,EventArgse){TxtYhm.Text="";TxtMm.Text="";}}用户注册界面用户注册如图5.3所示:usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;publicpartialclasszhuce:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidBtnOk_Click(objectsender,EventArgse){SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlCommandmycom=mycon.CreateCommand();mycomxmandText"insertintovalues('TxtYhid.Text.Trim(TxtDh.Text.Trim()+"','"+TxtGsm.Text.Trim()+"','"+TxtMm.Text.Trim()+"')";Int32flag1mycom.ExecuteNonQuery()//sqlif(flag10)//中没有记录或有多条记录则抱错{Response.Redirect("Default.aspx");}else{Label1.Text="添加失败";}mycon.Close();mycom.Dispose();}protectedvoidBtnCancel_Click(objectsender,EventArgse){TxtYhid.Text="";TxtDh.Text="";TxtGsm.Text="";TxtMm.Text="";}}用户申请会议室用户申请会议室5.4用户申请会议室usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;publicpartialclassAddsq:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}publicvoidBtnOk_Click(objectsender,EventArgse){if((Txtyh.Text=="")||(Txtgs.Text=="")||(Txtsj.Text=="")||(Txtlxdh.Text=="")||(Txthyslx.Text=="")){Response.Write("<script>alert('不能为空!')</script>");}else{SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlDataAdapter(编号)asfromnewDataSet();myadapter.Fill(myds,"ydb");Int32li1=Convert.ToInt32(myds.Tables["ydb"].Rows[0][0]);Int32li2=li1+2;mycon.Close();SqlConnectionmycon1=newSqlConnection(Class1.con);mycon1.Open();SqlCommandmycom1=mycon1.CreateCommand();mycom1xmandText"insertintoID,公司名,时间,电话,会议室类型,申请状态)values('" Txthyslx.Text.Trim("','未处理')";Int32flag1mycom1.ExecuteNonQuery();mycon1.Close();SqlConnectionmycon2=newSqlConnection(Class1.con);mycon2.Open();SqlCommandmycom2=mycon2.CreateCommand();mycom2xmandText"insertintoID,公司名,时间,会议室类型,价格,结账状态)values('"++++ "','2000','未结账')";Int32flag2mycom2.ExecuteNonQuery();mycon2.Close();if((flag1>0)&&(flag2>0)){Response.Write("<script>alert('添加申请成功!')</script>");}else{Response.Write"<script>alert('添加申请成功!')</script>");}}}publicvoidBtnCancel_Click(objectsender,EventArgse){Txtyh.Text="";Txtgs.Text="";Txtsj.Text="";Txthyslx.Text="";Txtlxdh.Text="";Label1.Text=Class1.bh;}}主要界面登陆5.55.5登陆usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Data.SqlClient;publicpartialclass_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidBtnOk_Click(Objectsender,EventArgse){stringStrYhm=TxtYhm.Text.Trim();stringStrMm=TxtMm.Text.Trim();if(StrYhm==""||StrMm==""){"}else{SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlCommandmycom=mycon.CreateCommand();mycomxmandText"selectID,fromwhereID='StrYhm"'and='"+StrMm+"'";SqlDataReadermyread=mycom.ExecuteReader();boolflag=myread.Read();if(flag){Response.Redirect("main.aspx");}else{"}mycon.Close();mycom.Dispose();}}protectedvoidBtnCancel_Click(Objectsender,EventArgse){TxtYhm.Text="";TxtMm.Text="";}}会议室5.65.6usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Data.SqlClient;publicpartialclassChaxun:System.Web.UI.Page{publicStringstr,str1,str2;protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){bind1();}}protectedvoidBtnOk_Click(objectsender,EventArgse){str1=TxtHysid.Text.Trim();str2=TxtHyslx.Text.Trim();if((str1=="")&&(str2=="")){"}if((str1!="")&&(str2=="")){str="selectID,,价格,状态from表whereID='"+str1+"'";bind(str);}if((str1=="")&&(str2!="")){ID,fromwhere='"+str2+"'";bind(str);}if((str1!="")&&(str2!="")){str"selectID,,价格,状态from表whereID='"+str2+"'";bind(str);}}protectedvoidBtnCancel_Click(objectsender,EventArgse){TxtHysid.Text="";TxtHyslx.Text="";}//无输入时绑定publicvoidbind1(){mycon);}

SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();//where状态='闲置'SqlDataAdaptermyadapternewSqlDataAdapter("selectID,from,DataSetmyds=newDataSet();myadapter.Fill(myds,"ydb");this.GridView1.DataSource=myds;this.GridView1.DataBind();mycon.Close();//有输入时板顶publicvoidbind(Stringst){SqlConnectionmycon1=newSqlConnection(Class1.con);mycon1.Open();SqlDataAdaptermyadapter1=newSqlDataAdapter(st,mycon1);DataSetmyds1=newDataSet();myadapter1.Fill(myds1,"ydb1");this.GridView1.DataSource=myds1;this.GridView1.DataBind();mycon1.Close();}publicvoidGridView1_PageIndexChanging(objectsender,GridViewPageEventArgse){this.GridView1.PageIndex=e.NewPageIndex;if((TxtHysid.Text.Trim()=="")&&(TxtHyslx.Text.Trim()=="")){bind1();}else{bind(str);}}}5.7图usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;publicpartialclassModifysq:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){bind();}}publicvoidGridView1_RowEditing(objectsender,GridViewEditEventArgse){GridView1.EditIndex=e.NewEditIndex;bind();}publicvoidGridView1_PageIndexChanging(objectsender,GridViewPageEventArgse){GridView1.PageIndex=e.NewPageIndex;bind();}publicvoidGridView1_RowCancelingEdit(objectsender,GridViewCancelEditEventArgse){GridView1.EditIndex=-1;bind();}publicvoidbind(){SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlDataAdaptermyadapternewSqlDataAdapter("select,ID,,,会议室ID,会议室类frommycon);DataSetmyds=newDataSet();myadapter.Fill(myds,"ydb");this.GridView1.DataSource=myds;this.GridView1.DataBind();mycon.Close();}protectedvoidGridView1_RowUpdating(objectsender,GridViewUpdateEventArgse){SqlConnectionsqlcon=newSqlConnection(Class1.con);stringsqlstr="update预定表set会议室ID='"+((TextBox)(GridView1.Rows[e.RowIndex].Cells[4].Controls[0])).Text.ToString().Trim()+"',申请状态='"+((TextBox)(GridView1.Rows[e.RowIndex].Cells[6].Controls[0])).Text.ToString().Trim()+"'where='"+Convert.ToInt16(GridView1.DataKeys[e.RowIndex].Value.ToString())+ SqlCommandsqlcom=newSqlCommand(sqlstr,sqlcon);sqlcon.Open();Int32flag1sqlcom.ExecuteNonQuery();//执行sql语句,并返回获得值sqlcon.Close();SqlConnectionsqlcon1newSqlConnection(Class1.con);stringsqlstr1"updatesetID='"+((TextBox)(GridView1.Rows[e.RowIndex].Cells[4].Controls[0])).Text.ToString().Trim()+"',状态='"+((TextBox)(GridView1.Rows[e.RowIndex].Cells[6].Controls[0])).Text.ToString().Trim()+"'where编号='"+Convert.ToInt16(GridView1.DataKeys[e.RowIndex].Value.ToString())+ SqlCommandsqlcom1=newSqlCommand(sqlstr1,sqlcon1);sqlcon1.Open();Int32flag2=sqlcom1.ExecuteNonQuery();//执行sql语句,并返回获得值sqlcon1.Close();SqlConnectionsqlcon2=newSqlConnection(Class1.con);stringsqlstr2"updatesetwhereID='"+((TextBox)(GridView1.Rows[e.RowIndex].Cells[4].Controls[0])).Text.ToString().Trim()+"'";SqlCommandsqlcom2=newSqlCommand(sqlstr2,sqlcon2);sqlcon2.Open();Int32flag3=sqlcom2.ExecuteNonQuery();//执行sql语句,并返回获得值sqlcon2.Close();if((flag1>0)&&(flag2>0)&&(flag3>0)){Response.Write("<script>alert('处理成功!')</script>");}GridView1.EditIndex=-1;bind();}}删除用户信息删除用户信息如图5.9所示:图5.9删除用户信息usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;publicpartialclassDeleteyh:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){if(!Page.IsPostBack){bind();}}publicvoidbind(){SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlDataAdaptermyadapternewSqlDataAdapter("selectID,,from"mycon);DataSetmyds=newDataSet();myadapter.Fill(myds,"ydb");this.GridView1.DataSource=myds;this.GridView1.DataBind();mycon.Close();}publicvoidChangePage(objectsender,GridViewPageEventArgse){this.GridView1.PageIndex=e.NewPageIndex;bind();}public voiddelete(objectsender,GridViewDeleteEventArgse)//{SqlConnectionconn=newSqlConnection(Class1.con);conn.Open();stringdeleteuserGridView1.DataKeys[e.RowIndex].Value.ToString()//主键stringcmd="deletefromwhereID='"+deleteuser+"'";//SqlCommandcmdtnewSqlCommand(cmdconn);Int32flag1cmdt.ExecuteNonQuery();//执行sql语句,并返回得值conn.Close();SqlConnectionconn1=newSqlConnection(Class1.con);conn1.Open();stringdeleteuser1GridView1.DataKeys[e.RowIndex].Value.ToString()//主键string"deletefromwhereID='"and;//SqlCommandcmdt1newSqlCommand(cmd1conn1);Int32flag2cmdt1.ExecuteNonQuery();//执行sql语句,并返回得值conn1.Close();if((flag1>0)&&(flag2>0)){Response.Write("<script>alert('删除成功!')</script>");}bind();}}处理用户结账处理用户结账如图5.10所示:图5.10处理用户结账usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Data.SqlClient;publicpartialclassJiezhang:System.Web.UI.Page{publicstringyh="";publicstringhh="";publicstringhh1="";protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){bind1();}}publicvoidGridView1_RowEditing(objectsender,GridViewEditEventArgse){GridView1.EditIndex=e.NewEditIndex;if(yh==""){bind1();}else{bind();}}publicvoidGridView1_PageIndexChanging(objectsender,GridViewPageEventArgse){GridView1.PageIndex=e.NewPageIndex;if(yh==""){bind1();}else{bind();}}publicvoidGridView1_RowCancelingEdit(objectsender,GridViewCancelEditEventArgse){GridView1.EditIndex=-1;if(yh==""){bind1();}else{bind();}}protectedvoidBtnOk_Click(objectsender,EventArgse){yh=TxtYh.Text.Trim();bind();}protectedvoidBtnCancel_Click(objectsender,EventArgse){TxtYh.Text="";}publicvoidbind1(){SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlDataAdaptermyadapter=newSqlDataAdapter("select,ID,,ID,,价格,fromwheremycon);DataSetmyds=newDataSet();myadapter.Fill(myds,"ydb");this.GridView1.DataSource=myds;this.GridView1.DataBind();mycon.Close();}publicvoidbind(){SqlConnectionmycon=newSqlConnection(Class1.con);mycon.Open();SqlDataAdaptermyadapter=newSqlDataAdapter("select,ID,,ID,,价格,fromwhereID='yhandmycon);DataSetmyds=newDataSet();myadapter.Fill(myds,"ydb");this.GridView1.DataSource=myds;this.GridView1.DataBind();mycon.Close();}protectedvoidGridView1_RowUpdating(objectsender,GridViewUpdateEventArgse){SqlConnectionsqlcon=newSqlConnection(Class1.con);stringsqlstr="update结账表set价格='"+((TextBox)(GridView1.Rows[e.RowIndex].Cells[5].Controls[0])).Text.ToString().Trim()++((TextBox)(GridView1.Rows[e.RowIndex].Cells[6].Controls[0])).Text.ToString().Trim()+"'where='"+Convert.ToInt16(GridView1.DataKeys[e.RowIndex].Value.ToString())+ SqlCommandsqlcom=newSqlCommand(sqlstr,sqlcon);sqlcon.Open();Int32flag1sqlcom.ExecuteNonQuery();//执行sql语句,并返回获得值sqlcon.Close();SqlConnectionsqlcon1newSqlConnection(Class1.con);hh"updateset;SqlCommandsqlcom1=newSqlCommand(hh,sqlcon1);sqlcon1.Open();Int32flag2=sqlcom1.ExecuteNonQuery();//执行sql语句

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论