public void insertBefore(MyTreeNode newNode, MyTreeNode cNode, Project workProject) {
if (cNode.getNodeDepth() < 0)
return;
FuncPoint ccNode = funcPointMaintDao.getFuncPoint(cNode.getNodeid());
MyTreeNode pNode = (MyTreeNode) cNode.getParent();
pNode.addChild(newNode);
newNode.setParent(pNode);
newNode.setOrderNum(ccNode.getOrderNum());
FuncPoint newfp = new FuncPoint();
newfp.setParentid(pNode.getNodeid());
newfp.setName(newNode.getNodeName());
newfp.setOrderNum(newNode.getOrderNum());
newfp.setDepth(pNode.getNodeDepth()+1);
newfp.setProject(workProject);
funcPointMaintDao.insertBefore(newfp);
newNode.setNodeid(newfp.getFpid());
}