| | |
| | | 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; |
| | |
| | | int OnTreeSelChanged(TEvent* evt, int p) |
| | | { |
| | | NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh; |
| | | HTREEITEM hItem = nmtv.itemNew.hItem; |
| | | //HTREEITEM hItem = nmtv.itemNew.hItem; |
| | | |
| | | //int wid = tv_1.GetId(); |
| | | HTREEITEM hItem = tv_1.GetSelectedItem(); |
| | | HTREEITEM rootItem = tv_1.GetRootItem(); |
| | | if (hItem <= 0 || hItem == rootItem) |
| | | if (!hItem || hItem == rootItem) |
| | | { |
| | | m_type = L"all"; |
| | | } |
| | |
| | | int i = 0, s = list.length(); |
| | | KXMLDOMElement xitem; |
| | | xstring sname; |
| | | xstring sguid; |
| | | //xstring sguid; |
| | | if (s > 0) |
| | | { |
| | | for (i = 0; i < s; i++) |
| | |
| | | tv_org = GetControl(L"tv_org"); |
| | | AttachEvent(L"tv_org", L"TVN_SELCHANGED", (FEvent)&HrOrg::OnTreeSelecded); |
| | | HTREEITEM root = tv_org.GetRootItem(); |
| | | if (root > 0) |
| | | if (!root) |
| | | { |
| | | tv_org.ExpandItemEx(root); |
| | | } |
| | |
| | | |
| | | //OnCreateTree(L"00000000-0000-0000-0000-000000000000", 0); |
| | | HTREEITEM root = tv_org.GetRootItem(); |
| | | if (root > 0) |
| | | if (!root) |
| | | { |
| | | tv_org.ExpandItemEx(root); |
| | | KXMLDOMElement ele = tv_org.GetItemData(root); |
| | |
| | | xstring pUnit; |
| | | pUnit = tv_org.GetItemLabel(hitem) + L"\\"; |
| | | HTREEITEM pitem = tv_org.GetParentItem(hitem); |
| | | while (pitem > 0) |
| | | while (!pitem ) |
| | | { |
| | | pUnit = tv_org.GetItemLabel(pitem) + L"\\" + pUnit; |
| | | pitem = tv_org.GetParentItem(pitem); |
| | |
| | | } |
| | | if(lw !=WA_INACTIVE)m_bCanDestroy = 1; |
| | | return 1;*/ |
| | | return 1; |
| | | } |
| | | |
| | | //焦点激活处理函数 |
| | |
| | | arg = GetArg(); |
| | | arg.AddArg(L"comdid", comdid); |
| | | HTREEITEM hitem = tv_org.GetSelectedItem(); |
| | | if (hitem > 0) |
| | | if (!hitem ) |
| | | { |
| | | KXMLDOMElement ele = tv_org.GetItemData( hitem); |
| | | xstring guid = ele.selectSingleNode(L"@guid").text(); |
| | |
| | | xstring sPersonID = arg.GetArgString(L"sPersonID"); |
| | | //trace(sPersonID); |
| | | xstring sPersonName = arg.GetArgString(L"sPersonName"); |
| | | dw_detail.SetItemDisplayString(1, colname, sPersonName); |
| | | dw_detail.SetItemString(1, colname, sPersonID); |
| | | dw_detail.SetItemDisplayString(1, colname.c_str(), sPersonName); |
| | | dw_detail.SetItemString(1, colname.c_str(), sPersonID); |
| | | dw_detail.Redraw(); |
| | | } |
| | | } |