예제 #1
0
	// 添加文件分类
	public String addClassNodes() {
		ClassDao cd = new ClassDao();

		if (cd.addClass(this.getClassNodes())) {
			return SUCCESS;
		} else {
			return INPUT;
		}
	}
예제 #2
0
	//文档管理
	public String classAdmin() {
		ClassDao cd = new ClassDao();
		subclassMap = new LinkedHashMap<Integer, List<ClassNodes>>();
		classList = cd.getSubclassNodes(1);
		for(ClassNodes node : classList)
		{
			subclassMap.put(node.getId(), cd.getSubclassNodes(node.getId()));
		}
		return SUCCESS;
	}
예제 #3
0
	//编辑分类
	public String editClassNodes() throws IOException {
		ClassDao cd = new ClassDao();
		if(subclass_id == 0){
			classNodes.setId(class_id);
		}else{
			classNodes.setId(subclass_id);
		}
		PrintWriter out = CommonMethod.getWriter();
		if(cd.editClass(classNodes)){			
			out.print("<script>alert('修改成功!')</script>");
			out.print("<script>window.location='" + CommonMethod.getBasePath() + "admin/classAdmin.action'</script>");
			out.close();
		}else{
			out.print("<script>alert('修改失败!')</script>");
			out.print("<script>history.go(-1);</script>");
			out.close();
		}
		return NONE;
	}