| | |
| | | |
| | | #include <wobject/xwin.hpp> |
| | | #include <wobject/xurl.hpp> |
| | | |
| | | #include <memory.h> |
| | | struct PUser |
| | | { |
| | | string id; |
| | |
| | | } |
| | | |
| | | //取当前用户 |
| | | static PUser* GetUser(xstring id) |
| | | static PUser& GetUser(xstring id) |
| | | { |
| | | string userno = xaserver::GetUserNo(); |
| | | //trace(userno); |
| | |
| | | //trace(L"---%s",x.GetXml()); |
| | | KXMLDOMElement e = x.documentElement(); |
| | | PUser& p = *(new PUser); |
| | | ::memset(&p, 0,sizeof(PUser)); |
| | | if (e) |
| | | { |
| | | if (e.selectSingleNode(L"任职")) p.id = e.selectSingleNode(L"任职").text(); |
| | |
| | | |
| | | if (e.selectSingleNode(L"电话")) p.tel = e.selectSingleNode(L"电话").text(); |
| | | } |
| | | return &p; |
| | | return p; |
| | | } |
| | | static PUser* GetUser() |
| | | static PUser& GetUser() |
| | | { |
| | | return GetUser(L""); |
| | | } |
| | |
| | | //xml |
| | | //x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | |
| | | arg.AddArg(L"AssignmentID", sguid); |
| | | if (xaserver::ExecXQuery(L"", L"[getAssignment.xq]", arg.GetString(), x) == 1) |
| | | { |