Пример #1
0
 // 删除
 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, ""));
 }
Пример #2
0
 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)));
 }
Пример #3
0
 public void modify() {
   User.update(this);
   renderJson(Ext.ok(true, ""));
 }
Пример #4
0
 public void doAction() {
   User u = User.get(getParaToInt(0));
   renderJson(Ext.doAction(u));
 }
Пример #5
0
 // 新增用户
 public void save() throws ParseException {
   new User().save(this);
   renderJson(Ext.ok(true, ""));
 }