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

📄 userform.java

📁 客户关系管理系统主要管理新老客户的一些信息并可以发现潜在客户
💻 JAVA
字号:
/**
 * 
 */
package com.qrsx.qrsxcrm.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;


/**
 * 用户实体FORM
 * @author Administrator
 *
 */
@SuppressWarnings("serial")
public class UserForm extends ActionForm
{
	private String id;		//主键
	private String userName;		//用户姓名
	private String password;		//用户密码
	private String employeeId;//用户所对应的职工(一对一)
	private String roleId;		//用户角色
	private String remark;//备注
	
	/**
	 * FORM表单验证
	 */
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
		
		ActionErrors errors = new ActionErrors();
		if((userName == null)||(userName.length()<1)){
			errors.add("userName",new ActionMessage("system.user.userName"));
		}
		if((password == null)||(password.length()<1)){
			errors.add("password",new ActionMessage("system.user.password"));
		}
		if((employeeId == null)||(employeeId.length()<1)){
			errors.add("employeeId",new ActionMessage("system.user.employeeId"));
		}
		if((roleId == null)||(roleId.length()<1)){
			errors.add("roleId",new ActionMessage("system.user.roleId"));
		}
		 
		return errors;
	}
	
	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	/**
	 * @return the reamrk
	 */
	public String getRemark() {
		return remark;
	}
	/**
	 * @param reamrk the reamrk to set
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}
	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}
	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	/**
	 * @return the employeeId
	 */
	public String getEmployeeId() {
		return employeeId;
	}
	/**
	 * @param employeeId the employeeId to set
	 */
	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}
	/**
	 * @return the roleId
	 */
	public String getRoleId() {
		return roleId;
	}
	/**
	 * @param roleId the roleId to set
	 */
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	
}

⌨️ 快捷键说明

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