|  |  | 
 |  |  |             int OnSubTree(xstring id, HTREEITEM parentitem) | 
 |  |  |             { | 
 |  |  |                //int wid = tv_org.GetId(); | 
 |  |  |                if (!tv_org.GetChildItem(parentitem)) return 1; | 
 |  |  |                if (tv_org.GetChildItem(parentitem)) return 1; | 
 |  |  |  | 
 |  |  |                xml x; | 
 |  |  | 					 | 
 |  |  |                xaserverarg arg; | 
 |  |  |  | 
 |  |  |                arg.AddArg(L"sguid", id); | 
 |  |  | 
 |  |  |                //int wid = tv_org.GetId(); | 
 |  |  |                xml x; | 
 |  |  |                 | 
 |  |  |                x.loadXML(L"<item><id>" + id + L"</id><no/><name>宁波家尔佳</name><typ>Org</typ></item>"); | 
 |  |  |                x.loadXML(L"<item><id>" + id + L"</id><no/><name>任职管理</name><typ>Org</typ></item>"); | 
 |  |  |                //KXMLDOMDocument root = x; | 
 |  |  |                //KXMLDOMElement RDoc = x.documentElement; | 
 |  |  |                //KXMLDOMElement ele = RDoc.selectSingleNode(L"//Org"); | 
 |  |  |                KXMLDOMElement ele = x.selectSingleNode(L"//item"); | 
 |  |  |                HTREEITEM hItem = tv_org.InsertChildItemEx(0, L"宁波家尔佳", ele, 15, 4); | 
 |  |  |                HTREEITEM hItem = tv_org.InsertChildItemEx(0, L"任职管理", ele, 15, 4); | 
 |  |  |                tv_org.SetItemChild1(hItem, 1); | 
 |  |  |                return 1; | 
 |  |  |  | 
 |  |  | 
 |  |  |                xml x; | 
 |  |  |  | 
 |  |  |                xaserverarg args; | 
 |  |  |                args.setNativePointer(args.CreateInstance()); | 
 |  |  |                args.AddArg(L"guid", empid); | 
 |  |  |                //if(xaserver::ExecXAction(GetServerUrl(),L"[MSSqlHrEmployeeDel.xq]",args.GetString(),x) !=1) | 
 |  |  |                if (xurl::post(L"OrganizationStruct/delete.Employee", args.GetString(), x) != 1) | 
 |  |  | 
 |  |  |  | 
 |  |  |             int OnInitial() | 
 |  |  |             { | 
 |  |  |                m_agentNode = new xnode; | 
 |  |  |                SetAgent(); | 
 |  |  |                OnAttachEvent(); | 
 |  |  |  | 
 |  |  | 
 |  |  |             int onload() | 
 |  |  |             { | 
 |  |  |                tv_org = GetControl(L"tv_org"); | 
 |  |  |                dw_emp = new xdwgrid; | 
 |  |  |                dw_emp.setNativePointer(GetControl(L"dw_emp")); | 
 |  |  |                dw_emp = GetControl(L"dw_emp"); | 
 |  |  |                dw_emp.openUrl(L"组织架构.vface/template/HrEmployee/list"); | 
 |  |  |                //dw_emp.SetReadOnly(true);       | 
 |  |  |                //dw_emp.SetSelectionMode(1); |