| | |
| | | public: |
| | | |
| | | |
| | | SysUser lw_obj; |
| | | SysUser* lw_obj; |
| | | xdwgrid dw_list; |
| | | xtreeview tv_org; |
| | | xnode m_agentNode; //Agent Condition |
| | |
| | | xstring m_sTxt; |
| | | xstring is_orgid; |
| | | public: |
| | | UserImport(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} |
| | | UserImport(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd), lw_obj(nullptr) {} |
| | | public: |
| | | static UserImport* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | |
| | | { |
| | | if (GetWinParam()) |
| | | { |
| | | lw_obj = new SysUser; |
| | | lw_obj.setNativePointer(GetParam()); |
| | | lw_obj = GetParam(); |
| | | lw_obj = (SysUser*)GetWinParam(); |
| | | } |
| | | else |
| | | return 0; |
| | |
| | | xstring sJobID, sJobName; |
| | | //int wid = lw_obj.tv_usergroup.GetId(); |
| | | HTREEITEM hitem = tv_org.GetSelectedItem(); |
| | | KXMLDOMElement ele = tv_org.GetItemData(hitem); |
| | | //KXMLDOMElement ele = tv_org.GetItemData(hitem); |
| | | |
| | | |
| | | while (row > 0) |
| | |
| | | } |
| | | }*/ |
| | | |
| | | int nRow = lw_obj.dw_user.InsertRow(0); |
| | | lw_obj.dw_user.SetItemString(nRow, L"EmployeeNo", sEmployeeNo); |
| | | lw_obj.dw_user.SetItemString(nRow, L"UserName", sOldEmpNo); |
| | | lw_obj.dw_user.SetItemString(nRow, L"PassWord", sPassWord); |
| | | lw_obj.dw_user.SetItemString(nRow, L"PersonID", sPersonID); |
| | | lw_obj.dw_user.SetItemDisplayString(nRow, L"PersonID", sPersonName); |
| | | lw_obj.dw_user.SetItemString(nRow, L"Status", L"Y"); |
| | | lw_obj.dw_user.SetItemDisplayString(nRow, L"Status", L"有效"); |
| | | lw_obj.dw_user.SetItemString(nRow, L"OldEmpNo", sOldEmpNo); |
| | | int nRow = lw_obj->dw_user.InsertRow(0); |
| | | lw_obj->dw_user.SetItemString(nRow, L"EmployeeNo", sEmployeeNo); |
| | | lw_obj->dw_user.SetItemString(nRow, L"UserName", sOldEmpNo); |
| | | lw_obj->dw_user.SetItemString(nRow, L"PassWord", sPassWord); |
| | | lw_obj->dw_user.SetItemString(nRow, L"PersonID", sPersonID); |
| | | lw_obj->dw_user.SetItemDisplayString(nRow, L"PersonID", sPersonName); |
| | | lw_obj->dw_user.SetItemString(nRow, L"Status", L"Y"); |
| | | lw_obj->dw_user.SetItemDisplayString(nRow, L"Status", L"有效"); |
| | | lw_obj->dw_user.SetItemString(nRow, L"OldEmpNo", sOldEmpNo); |
| | | /* |
| | | lw_obj.dw_user.SetItemString(nRow,L"PositionID",sPositionID); |
| | | lw_obj.dw_user.SetItemDisplayString(nRow,L"PositionID",sPositionName); |
| | |
| | | int OnSubTree(xstring id, HTREEITEM parentitem) |
| | | { |
| | | //int wid = tv_org.GetId(); |
| | | if (tv_org.GetChildItem( parentitem) > 0) return 1; |
| | | if (tv_org.GetChildItem( parentitem)) return 1; |
| | | xml x; |
| | | |
| | | xaserverarg arg; |
| | |
| | | return -1; |
| | | } |
| | | //trace(x.xml()); |
| | | var list = x.selectNodes(L"//item"); |
| | | int i = 0, s = list.length; |
| | | auto list = x.selectNodes(L"//item"); |
| | | int i = 0, s = list.length(); |
| | | KXMLDOMElement xitem; |
| | | xstring sName; |
| | | xstring sguid; |
| | |
| | | sguid = xitem.selectSingleNode(L"id").text(); |
| | | stype = xitem.selectSingleNode(L"typ").text(); |
| | | //int curItem = tv_org.InsertChildItemEx(wid,parentitem,sName,xitem,15,4); |
| | | int curItem = 0; |
| | | HTREEITEM curItem = 0; |
| | | if (stype == L"Org") |
| | | { |
| | | curItem = tv_org.InsertChildItemEx(wid, parentitem, sName, xitem, 15, 4); |
| | | tv_org.SetItemChild1(wid, curItem, 1); |
| | | curItem = tv_org.InsertChildItemEx( parentitem, sName, xitem, 15, 4); |
| | | tv_org.SetItemChild1(curItem, 1); |
| | | } |
| | | else |
| | | { |
| | | curItem = tv_org.InsertChildItemEx(wid, parentitem, sName, xitem, 21, 21); |
| | | curItem = tv_org.InsertChildItemEx(parentitem, sName, xitem, 21, 21); |
| | | } |
| | | //OnSubTree(sguid,curItem); |
| | | } |
| | |
| | | //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.InsertChildItem( 0, L"凤凰集团", ele, 15, 4); |
| | | HTREEITEM hItem = tv_org.InsertChildItemEx( (HTREEITEM)0, L"组织结构", ele, 15, 4); |
| | | tv_org.SetItemChild1(hItem, 1); |
| | | return 1; |
| | | |
| | |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | if (comdid == L"cb_import") |
| | | { |
| | | OnOK(); |
| | | return 1; |
| | | } |
| | | else if (comdid == L"cb_close") |
| | | { |
| | | CloseWindow(); |
| | | return 1; |
| | | } |
| | | return 0; |
| | | } |
| | | |