// 删除 public void del() { User u = User.get(getParaToInt(0)); List ps = u.getProject(); if (ps != null && ps.size() != 0) throw new XmglException("该用户关联项目,不允许删除"); u.delete(); renderJson(Ext.ok(true, "")); }
public void grid() { String order = getPara("DeptId"); boolean under = getParaToBoolean("under"); String unsearch = getPara("unseach"); String where = Where.userBulider(under, unsearch, order); renderJson( Ext.grid( User.count(where), User.selectByPage(getParaToInt("start"), getParaToInt("limit"), where))); }
public void modify() { User.update(this); renderJson(Ext.ok(true, "")); }
public void doAction() { User u = User.get(getParaToInt(0)); renderJson(Ext.doAction(u)); }
// 新增用户 public void save() throws ParseException { new User().save(this); renderJson(Ext.ok(true, "")); }