⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysaction.java

📁 本源码为教学管理信息系统
💻 JAVA
字号:
package com.wygl.xtgl.action;import com.hibernate.action.AbstractAction;import com.wygl.taglib.ManageDate;import com.wygl.xtgl.domain.Role;import com.wygl.xtgl.domain.User;import com.wygl.xtgl.service.SysDao;/** * @author Administrator * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */public class SysAction extends AbstractAction {	private SysDao          sysDao;	private Role   			currentRole;	private User			currentUser;	private String			loginName;	private String			loginPassword;		private String          systime;		public String execute() throws Exception {		return SUCCESS;	}	public String login() throws Exception {		if(loginName==null||loginName.equals("")){			this.addActionError("用户名不能为空!");			return ERROR;		}		sysDao=(SysDao)getServiceBean("sysDao");		currentUser = sysDao.searchUser(loginName);		if(currentUser == null||currentUser.getName().equals("")) {			this.addActionError("用户名不存在!请重新输入");			return ERROR;		}				else if(!currentUser.getPassword().equals(loginPassword)){			this.addActionError("密码错误!");				return ERROR;		}		if(loginName.equals("system")){			currentUser.getEmployee().getDepartment().setDwdm("%");		}//		currentCk = sysDao.getCkxx(currentUser.getEmployee().getDepartment().getDwdm());		this.set("currentUser",currentUser);	//		this.set("currentCk",currentCk);		return "login";	}	public String getLoginName() {		return loginName;	}	public void setLoginName(String loginName) {		this.loginName = loginName;	}	public String getLoginPassword() {		return loginPassword;	}	public void setLoginPassword(String loginPassword) {		this.loginPassword = loginPassword;	}	public SysDao getSysDao() {		return sysDao;	}	public void setSysDao(SysDao sysDao) {		this.sysDao = sysDao;	}	public Role getCurrentRole() {		return currentRole;	}	public void setCurrentRole(Role currentRole) {		this.currentRole = currentRole;	}	public User getCurrentUser() {		return currentUser;	}	public void setCurrentUser(User currentUser) {		this.currentUser = currentUser;	}	public String getSystime() {		systime=ManageDate.getYear()+"年"+ManageDate.getMonth()+"月"+ManageDate.getDay()+"日"+" "+ManageDate.getWeek(ManageDate.DTFormat(new java.util.Date(),"yyyy-MM-dd"),"yyyy-MM-dd");		return systime;	}	public void setSystime(String systime) {		this.systime = systime;	}	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -