已阅读5页,还剩54页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
网上科研申报系统一:系统开发平台本系统对操作系统的要求为英特尔32/64位处理器,Microsoft vs2013,Microsoft SQL SERVER 2012。二:需求分析本系统为网上在线科研申报系统,提供用户注册登录,项目申报,项目查询,项目修改等功能,提供系统管理员查询删除用户,查询修改项目,添加删除修改新闻等功能。三:系统结构设计本系统采用两层架构,B/S模式设计数据库用户四:总体架构设计登录普通用户管理员项目申报项目查询项目修改用户管理项目管理新闻管理记录管理五:系统详细设计登录注册普通用户项目申报项目查询项目修改管理员用户管理删除用户修改用户权限普通用户管理员删除用户修改用户权限项目管理未审核项目已经审核项目删除项目改为审核状态删除项目改为未审核状态新闻管理添加新闻删除新闻修改新闻记录管理删除记录六:数据库设计数据库设计中本系统只涉及到表设计,没有用到存储过程。本系统共有用户信息表(UserInfo),项目信息表(ProjectInfo),新闻信息表(News),管理记录表(adminaction).1:UserInfo表列名数据类型约束用户编号UserIdint主键用户名UserNamenvarchar(20)Not null,unique真实姓名UserRelNamenvarchar(20)Not null密码Pwdnvarchar(20)Not null身份证号UserRelIdnvarchar(30)Not null性别Sexnchar(1)Not null出生日期BirthdatetimeNot null学位XueWeinvarchar(2)Not null电话Telephonenvarchar(15)Not null通讯地址TeleAdrnvarchar(50)Not null邮编Postalnvarchar(6)null电子信箱Emailnvarchar(30)null权限authoritynvarchar(6)Not null2:ProjectInfo表列名数据类型约束项目编号projectIdint主键项目名ShenBaoNamenvarchar(20)Not null 用户名UserNamenvarchar(20)Not null申报时间ShenBaoTimedatetimeNot null电话Telephonenvarchar(15)Not null申请费用CostfloatNot null预期成果形式Resultnvarchar(20)Not null项目简介proContentnvarchar(MAX)Not null所在单位Damweinvarchar(20)Not null通讯地址Addrnvarchar(50)Not null邮编Postnchar(6)null电子信箱Emailnvarchar(30)null审核状态ProstatusbitNot null3:News表列名数据类型约束新闻编号NewsIdint主键新闻标题NewsTitlenvarchar(20)Not null新闻来源NewsWriternvarchar(20)Not null新闻内容NewsContentnvarchar(4000)Not null新闻发布时间NewsTimedatetimeNot null4:adminaction表列名数据类型约束记录编号actionIdint主键记录内容adminactionnvarchar(50)Not null七:代码实现1:系统主页前台代码: 重要提示 1:如果是首次使用,请先注册! 2:本网站正处于测试期,如果发现问题,请及时和网站开发人员联系,以免造成不必要的损失! 用户使用指南 1:使用指南1- 后台代码:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace xiangmu public partial class index : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) /下载代码 protected void Button1_Click(object sender, EventArgs e) Response.ContentType = application/octet-string; Response.AddHeader(Content-Disposition, attachment;filename=readme.txt); String filename = Server.MapPath(files/readme.txt); Response.TransmitFile(filename); 其中登录代码using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Web.Security;namespace xiangmu public partial class login : System.Web.UI.UserControl protected string strcon; protected string sqlcmd; protected void Page_Load(object sender, EventArgs e) strcon = ConfigurationManager.AppSettingsconn; if (HttpContext.Current.User.Identity.IsAuthenticated) loginfooter.InnerText = 用户已经登录成功,你可以使用系统提供的服务!; Button1.Visible = false; Button2.Visible = false; protected void Button1_Click(object sender, EventArgs e) string username=TextBox1.Text.Trim().ToString(); string pwd=TextBox2.Text.Trim().ToString(); sqlcmd = select * from UserInfo where UserName= + username + and Pwd= + pwd + ; if (Authentied(username, pwd) loginfooter.InnerText = username + 登录成功,你可以使用系统提供的服务!; TextBox1.Text = ; TextBox2.Text = ; Button1.Visible = false; Button2.Visible = false; else TextBox2.Text = ; loginfooter.InnerHtml = username + 登录失败,用户名或密码错误+如果还没注册请先注册=点击注册=; /SessionUser = TextBox1.Text.Trim().ToString(); public bool Authentied(string username, string pwd) SqlConnection con = new SqlConnection(strcon); con.Open(); SqlCommand cmd = new SqlCommand(sqlcmd, con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() FormsAuthentication.SetAuthCookie(username, false); /Sessionuser = username; return true; else return false; protected void Button3_Click(object sender, EventArgs e) System.Web.Security.FormsAuthentication.SignOut(); Response.Redirect(index.aspx); protected void Button2_Click(object sender, EventArgs e) string username = TextBox1.Text.Trim().ToString(); string pwd = TextBox2.Text.Trim().ToString(); sqlcmd = select * from UserInfo where UserName= + username + and Pwd= + pwd + and authority=admin; if (Authentied(username, pwd) Response.Redirect(adminIndex.aspx); else TextBox2.Text = ; loginfooter.InnerHtml = username + 登录失败,用户名或密码错误 + 如果还没注册请先注册=点击注册=; 其中新闻显示代码using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Configuration;using System.Data;using System.Data.SqlClient;namespace xiangmu public partial class news : System.Web.UI.UserControl private string strcon; protected void Page_Load(object sender, EventArgs e) strcon = ConfigurationManager.AppSettingsconn; NewsBind(); public void NewsBind() SqlConnection con = new SqlConnection(strcon); SqlDataAdapter da = new SqlDataAdapter(select * from News, con); DataSet ds = new DataSet(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); con.Close(); protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) GridView1.PageIndex = e.NewPageIndex; NewsBind(); 2:注册界面前台代码 .auto-style1 border-bottom: 1px solid white; vertical-align: bottom; height: 60px; 用户注册 用户名: 真实姓名: 密码: 身份证号: 性别: 男 女 出生日期: 年 月 日 学位: 学士 硕士 博士 联系电话: 通讯地址: 邮编: 电子信箱: function requierd(e, str, n) var value = document.getElementById(e).value; if (value = ) alert(str + 必须填写!); return false; if (value.length n) alert(str + 不能超过 + n + 个字); return false; function isnan(e, str) var value = document.getElementById(e).value; if (isNaN(value) alert(str); document.getElementById(e).innerText = ; return false; function tele(e, str) var value = document.getElementById(e).value; if (isNaN(value) alert(str); return false; function validEmail(id, str) var va = document.getElementById(id).value; var posa = va.indexOf(); var pospoint = va.lastIndexOf(.); if (posa 1 | pospoint - posa 0 & t6.length = number) return true; function Validation() if (requierd(Text1, 用户名, 10) != false) if (requierd(Text2, 真实姓名, 10) != false) if (requierd(Text3, 密码, 15) != false) if (requierd(Text4, 身份证号, 20) != false) if (requierd(Text5, 联系电话, 11) != false & isnan(Text5, 联系电话) != true) if (requierd(Text6, 通讯地址, 25) != false) if (requierd(Text7, 邮编, 6) != false & isnan(Text7, 邮编) != true) if (requierd(Text8, 电子信箱, 20) != false & validEmail(Text8, 电子信箱) != false) return true; else return false; else return false; else return false; else return false; else return false; else return false; else return false; else return false; 后台代码using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using System.Data.SqlClient;using System.Configuration;namespace xiangmu public partial class Register : System.Web.UI.Page private string username; /private string userpic; private string userrelname; private string pwd; private string userrelid; private string sex; private DateTime birth; private string xuewei; private string telephone; private string address; private string post; private string email; / protected string strcon; protected void Page_Load(object sender, EventArgs e) strcon = ConfigurationManager.AppSettingsconn; pic.Visible = false; if (IsPostBack) if (!IsNotUnick() UserInfoBind(); else Response.Write(alert(该用户名已经注册);); public void Opt(int x, int y,string e) Response.Write(); for (int i = x; i y; i+) Response.Write(+i+); Response.Write(); protected void Button1_Click(object sender, EventArgs e) Response.Redirect(index.aspx); public bool IsNotUnick() SqlConnection con = new SqlConnection(strcon); con.Open(); SqlCommand cmd = new SqlCommand(select * from UserInfo where UserName= + Request.FormText1.Trim() + , con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() return true; else return false; protected void UserInfoBind() username = Request.FormText1.Trim(); userrelname = Request.FormText2.Trim(); pwd = Request.FormText3.Trim(); userrelid = Request.FormText4.Trim(); telephone = Request.FormText5.Trim(); address = Request.FormText6.Trim(); post = Request.FormText7.Trim(); email = Request.FormText8.Trim(); sex = RadioButtonList1.SelectedValue; birth = new DateTime(int.Parse(Request.Formyear), int.Parse(Request.Formmonth), int.Parse(Request.Formday); xuewei = DropDownList1.SelectedValue; /* if (File1.PostedFile.FileName.Length0) string filename = File1.PostedFile.FileName; userpic = username + filename.Substring(filename.LastIndexOf(.); File1.PostedFile.SaveAs(Server.MapPath(/images) + userpic);
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026浙江海发建设发展有限公司招聘1人备考题库(第二号)及答案详解(典优)
- 高二物理选择性必修二 8.1功与功率第5课时
- 2026江苏无锡市惠山区教育局招聘教师41人备考题库附答案详解(综合题)
- 2026浙江宁波东方人力资源服务有限公司招聘外包业务助理岗备考题库及答案详解(夺冠系列)
- 2026柳州银行春季招聘40人备考题库及完整答案详解1套
- 2026浙江温州市苍南县人才发展有限公司招聘市场化工作人员1人备考题库含答案详解(能力提升)
- 2026陕西咸阳市第一人民医院、市中心医院招聘56人备考题库及答案详解一套
- 2026浙江省山区海岛县机关单位专项招录公务员324人备考题库及参考答案详解
- 2026年温州榕园学校(温州大学附属学校) 面向全国引进教育人才3人备考题库及一套答案详解
- 2026河南郑州市第九十九中学公益性岗位招聘13人备考题库及答案详解(考点梳理)
- 浙江高职单招职业适应性测试真题及参考答案
- GB/T 5506.1-2026小麦和小麦粉面筋含量第1部分:手洗法测定湿面筋
- 高效会议组织与管理技巧培训材料
- 中国水产科学研究院东海水产研究所2026年度第一批统一公开招聘备考题库及1套完整答案详解
- 2024年秋国开(河北)《中外政治思想史》形考任务1-4(答案)
- 公司资产管理培训课件
- 叩背排痰与有效咳嗽的护理配合
- 第三十二届“YMO”青少年数学思维研学数学竞赛六年级初选试卷(含答案)
- 污水处理系统设备维护保养合同范本
- 食品安全 答题竞赛题库及答案解析
- 四川省宜宾市2025年中考化学真题(含答案)
评论
0/150
提交评论