| | |
| | | |
| | | #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(); |
| | |
| | | } |
| | | return p; |
| | | } |
| | | static PUser GetUser() |
| | | static PUser& GetUser() |
| | | { |
| | | return GetUser(L""); |
| | | } |
| | |
| | | { |
| | | /* |
| | | if (sOrgID == "") return "4.2"; |
| | | xml x = new xml; |
| | | xml |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg args=new xaserverarg; |
| | | args.setNativePointer(args.CreateInstance()); |
| | |
| | | |
| | | static KXMLDOMDocument getAssignment(string sguid, KXMLDOMDocument x) |
| | | { |
| | | //xml x = new xml; |
| | | //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) |
| | | { |