第一范文网 - 专业文章范例文档资料分享平台

小区物业管理信息系统毕业论文

来源:用户分享 时间:2025/5/23 19:55:34 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

信息科学与技术学院学士学位论

4.2.2 用户信息修改的实现

系统用的是Frameset布局,总体分为上中下三块,中间一块又分为左右两块。上面一块为Top.jsp,主要是用来显示系统当前用户,系统时间,查看个人信息、实现系统刷新,回退等功能。下面一块则用来显示系统的Logo。功能主要分布在中间一块,中间的左边是用来显示系统功能操作的入口,我用了一颗JS数来把功能进行了一个分层。右边则用来进行功能的操作。用户信息修改如图4-3所示。

图4-3管理员信息修改模块

说明:管理员信息修改,如果是管理员,他可以修改所有的信息,但是不管他修改说明信息,他都要符合该信息的格式,如用户名必须是2-10位字符,密码必须是4-16位字母或数字,邮件要是邮件的格式,电话必须是11位手机号码等,这些我都是通过页面的JS代码进行了控制。

实现代码如下:

public void doGet(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

UserBeanBO ubb=new UserBeanBO(); response.setContentType(\

28

信息科学与技术学院学士学位论

response.setCharacterEncoding(\PrintWriter out = response.getWriter(); //得到当前登录用户名

String loginname=request.getParameter(\request.setAttribute(\//得到登录用户的信息

UserBean ub1=ubb.getUserBean(loginname); UserBean ub=new UserBean(); //得到要修改信息用户的用户ID

String userid1=request.getParameter(\//把String型的userid转为long型 long userid=Long.parseLong(userid1); //得到页面传过来的值

String u=request.getParameter(\String p=request.getParameter(\String email=request.getParameter(\String phone1=request.getParameter(\//string转long

long phone=Long.parseLong(phone1); String adress=request.getParameter(\String privilige1=request.getParameter(\//string转int

int privilige=Integer.valueOf(privilige1); //判断用户信息修改是否成功

if(ubb.ModefyUser(userid, u, p, email, phone, adress, privilige)){

//用户信息修改成功,并且登录用户是管理员

if(ub1.getPrivilige()==1){

29

信息科学与技术学院学士学位论

//跳转到userInfo.jsp页面

request.getRequestDispatcher(\

}else{

//用户信息修改成功,并且登录用户是普通用户,跳转到selfInfo.jsp页面 }

request.getRequestDispatcher(\

}

}else{

//不成功,跳转到modify.jsp页面

request.getRequestDispatcher(\}

/**

* The doPost method of the servlet.

*

* This method is called when a form has its tag value method equals to post. *

* @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred

*/ public void doPost(HttpServletRequest request, HttpServletResponse

response)

throws ServletException, IOException {

this.doGet(request, response); }

}

30

信息科学与技术学院学士学位论

4.2.3用户注册的实现

住户信息包括户主名称、联系电话、邮件、地址等基本信息,当填写信息完成后,点击页面下方的提交,如果信息格式正确,则系统提示添加成功。通过系统左边的住户资料管理管理可查看用户的基本信息。如图4-4所示。

图4-4新建住户信息模块

实现代码如下:

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(\response.setCharacterEncoding(\PrintWriter out = response.getWriter(); UserBean ub=new UserBean();

31

搜索更多关于: 小区物业管理信息系统毕业论文 的文档
小区物业管理信息系统毕业论文.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c2d3pn5svu283uyx977c3_10.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top