systemroleaction.java

来自「EasyJF官网(www.easyjf.com)全站系统源码使用说明 全站源码」· Java 代码 · 共 48 行

JAVA
48
字号
package com.easyjf.news.action;


import com.easyjf.news.business.ActiveUser;
import com.easyjf.news.business.SystemRole;
import com.easyjf.util.CommUtil;
import com.easyjf.web.Module;
import com.easyjf.web.Page;
import com.easyjf.web.WebForm;

import com.easyjf.web.tools.DbPageList;
import com.easyjf.web.tools.IPageList;

public class SystemRoleAction extends BaseAction {
	public Object doBefore(WebForm form, Module module) {		
		ActiveUser u=(ActiveUser)this.getCurrentUser(form);
		if(u==null)return new Page("popedomError","/nologin.htm","page");		
		return null;
	}
	
	public IPageList doQuery(WebForm form, int currentPage, int pageSize) {
		//ActiveUser u=(ActiveUser)user;		
		String scope="1=1";
		//Collection paras=new ArrayList();
		//paras.add(u.getDept());
		DbPageList pList=new DbPageList(SystemRole.class,scope);
		pList.doList(currentPage,pageSize);
		return pList;
	}
	public Object form2Obj(WebForm form) {
		String cid=CommUtil.null2String(form.get("cid"));		
		//String method=CommUtil.null2String(form.get("easyJWebCommand"));
		SystemRole obj=null;
		if(cid.equals(""))
		{
			obj=(SystemRole)form.toPo(SystemRole.class);
			obj.setStatus(new Integer(0));
		}
		else
		{
			obj=SystemRole.read(cid);
			form.toPo(obj);
		}		
		return obj;
	}

}

⌨️ 快捷键说明

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