




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
经典word整理文档,仅参考,双击此处可删除页眉页脚。本资料属于网络整理,如有侵权,请联系删除,谢谢!目录一、设计目的1二、需求分析1三、模块分析及设计2四、数据库设计24.1系统概念结构设计24.1.1数据字典24.1.2系统E-R图34.1.3系统流程图44.2逻辑结构设计5五、制作过程及要点65.1类库建立65.2验证码65.3留言内容界面75.4留言页面75.5登录界面95.6注册页面125.7修改密码界面135.8管理员界面14设计总结15附录15和1三、模块分析及设计登陆留言登陆4.1.1231n4.1.34是否5publicclassdb{publicdb(){}publicstaticSqlConnectionCreateConnection(){SqlConnectioncon=newSqlConnection(@"server=(Local);database=message;Integrated);returncon;}}protectedvoidPage_Load(objectsender,EventArgse){thisthis.GenCode(4));Session[]=this.GenCode(4);}privatestringGenCode(intnum){[]source={,"1",,,,,,,"8",,,"A","B","C","D","E",,"G",,,,,"L",,"N","O","P",,"R",,"T","U","V","W","X",,"Z"};stringcode=;Randomrd=new();for(inti=0;i<num;i++){code+=source[rd.Next(0,source.Length)];}returncode;}privatevoidstringcode){BitmapmyPalette=newBitmap(60,20);Graphicsgh=Graphics.FromImage(myPalette);Rectanglerc=newRectangle(0,0,60,20);gh.FillRectangle(newSolidBrush(.Blue),rc);6gh.DrawString(code,newFont(宋体,16),newSolidBrush(.White),rc);gh.Dispose();myPalette.Dispose();}protectedvoidButton3_Click(objectsender,EventArgse){7protectedvoidPage_Load(objectsender,EventArgse){try{this.Label1.Text=].ToString();SqlConnectioncon=db.CreateConnection();con.Open();stringstrsql="selectcount(*)from;SqlCommandcmd=newSqlCommand(strsql,con);SqlDataReaderrd=cmd.ExecuteReader();while(rd.Read()){this.Label2.Text=rd[0].ToString();}rd.Close();con.Close();}{8}{SqlConnectioncon=db.CreateConnection();con.Open();stringstrsql="insertintomessagesvalues('"+Label1.Text+"','"+TextBox2.Text++TextBox3.Textcon.Close();"<script>alert('留言成功!')</script>");Response.Redirect("messageout.aspx");}protectedvoidButton2_Click(objectsender,EventArgse){9protectedvoidPage_Load(objectsender,EventArgse){this.ImageButton1.ImageUrl="image.aspx";}protectedvoidButton1_Click(objectsender,EventArgse){if(this.TextBox1.Text==){Label1.Text=用户名不能为空!<br>";}if(this.TextBox2.Text==){Label1.Text+="密码不能为空!<br>";}if(this.TextBox3.Text==){Label1.Text+="请输入验证码!<br>";}else{SqlConnectioncon=db.CreateConnection();con.Open();if(RadioButtonList1.SelectedItem.Value.ToString().Trim()==用户){stringstrsql="selectUpassfromloginwhereUname='"+this.TextBox1.Text+"'andUpass='"+this.TextBox2.Text+;SqlCommandcmd=newSqlCommand(strsql,con);DataSetds=newDataSet();SqlDataReaderdr=cmd.ExecuteReader();try{if(dr.Read()){stringaa=this.TextBox3.Text.ToString();if(aa==Convert])){Session[]=this.TextBox1.Text.ToString();Response.Redirect("messageout.aspx");10}else{Label1.Text=验证码错误,注意大小写!;}}else{Label1.Text=用户名或者密码错误!;}}catch{Label1.Text=输入的用户名不存在!;}con.Close();}elseif(RadioButtonList1.SelectedItem.Value.ToString().Trim()==管理员){stringstrsql1="selectUpassfrommanagementwhereUname='"+this.TextBox1.Text+"'andUpass='"+this.TextBox2.Text+;SqlCommandcmd=newSqlCommand(strsql1,con);DataSetds=newDataSet();SqlDataReaderdr=cmd.ExecuteReader();try{if(dr.HasRows){stringaa=this.TextBox3.Text.ToString();if(aa==Convert])){Session[]=this.TextBox1.Text.ToString();Response.Redirect("management.aspx");}else{Label1.Text=验证码错误,注意大小写!;}}else{Label1.Text=用户名或者密码错误!;}}11Label1.Text=输入的用户名不存在!;}protectedvoidButton1_Click(objectsender,EventArgse){try{SqlConnectioncon=db.CreateConnection();con.Open();SqlCommandcmd=con.CreateCommand();=(cmd.ExecuteNonQuery();"<script>alert('注册用户成功!')</script>");}}}protectedvoidButton1_Click1(objectsender,EventArgse){SqlConnectioncon=db.CreateConnection();SqlCommandcmd=con.CreateCommand();con.Open();cmd.CommandText=strsql1;DataSetds=newDataSet();SqlDataReaderdr1=cmd.ExecuteReader();{TextBox1.Text+);cmd2.CommandText=strsql;cmd2.E
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 别墅整体装修合同范本
- 2025届高考生物备考教学设计:课时1 降低化学反应活化能的酶
- 高考动员大会讲话稿
- 股权用工合同范本
- 水泥合同范本
- Module 10 Unit 2 第一课时教学设计 2024-2025学年外研版八年级英语上册
- Module 5 Unit1 Can you run fast?(教学设计)-2024-2025学年外研版(三起)英语四年级上册
- 百尺河小学学校教学工作计划
- 租鸡棚合同范本
- 产品拼装合同范本
- 语文新课标背景下单元整体教学:六下第4单元大单元设计
- 福州地铁公司招聘考试题目
- 小学语文期末质量分析报告
- 口腔医院客服培训课件
- 04G325吊车轨道联结及车挡
- 华为公司员工培训与绩效管理
- 混凝土搅拌站有限空间作业管理制度模版
- 成人住院患者跌倒评估与预防(团体标准)解读
- 石膏固定的护理教学查房
- 孙燕姿所有歌曲歌词大全(11张专辑)
- 高中英语2024届高考复习群文阅读材料1(School Life 校园生活)
评论
0/150
提交评论