| | |
| | | class workflow_actionlog : public win__ |
| | | #include <wobject/xwin.hpp> |
| | | #include <xcontrol/xdwgrid.hpp> |
| | | #include <xcontrol/xflowchart.hpp> |
| | | #include <xcontrol/ximageview.hpp> |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) workflow_actionlog : public xwin |
| | | { |
| | | public: |
| | | workflow_actionlog(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} |
| | | static workflow_actionlog* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | | workflow_actionlog* pWin = new workflow_actionlog(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | |
| | | public: |
| | | //命令发布函数 |
| | | int OnCmdDispatch(string comdid) |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | CloseWindow(); |
| | | return 0; |
| | | } |
| | | |
| | | //命令处理事件 |
| | | int OnXCommand(ref TXCommandEvent evt,int param) |
| | | int OnXCommand(TEvent* evt, int param) |
| | | { |
| | | return OnCmdDispatch(evt.pStrID); |
| | | return OnCmdDispatch(evt->xcommand.pStrID); |
| | | } |
| | | |
| | | int OnAttachEvent() |
| | | { |
| | | //绑定工具条点击事件 |
| | | AttachEvent("WM_XCOMMAND",OnXCommand); |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)& workflow_actionlog::OnXCommand); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | | OnAttachEvent(); |
| | | |
| | | xdwgrid__ dw_loglist = new xdwgrid__; |
| | | dw_loglist.setNativePointer(GetControl("dw_loglist")); |
| | | dw_loglist.openUrl("/sale/view/workflow.view/template/chkdlg/loglist"); |
| | | xdwgrid dw_loglist = GetControl(L"dw_loglist"); |
| | | dw_loglist.openUrl(L"/sale/view/workflow.view/template/chkdlg/loglist"); |
| | | |
| | | if(this.GetParam()) |
| | | if (GetWinParam()) |
| | | { |
| | | xaserverarg__ argx = new xaserverarg__; |
| | | argx.setNativePointer(argx.CreateInstance()); |
| | | xaserverarg__ arg = this.GetParam(); |
| | | argx.AddArg("EntityID",arg.GetArgString("EntityID")); |
| | | xml__ x = new xml__; |
| | | x.setNativePointer(xml__ ::CreateInstance()); |
| | | url::get("/sale/data/workflow.core/workflow/chk/loglist", argx.GetString(), x); |
| | | xaserverarg argx; |
| | | xaserverarg arg = GetArg(); |
| | | argx.AddArg(L"EntityID", arg.GetArgString(L"EntityID")); |
| | | xml x; |
| | | xurl::get(L"/sale/data/workflow.core/workflow/chk/loglist", argx.GetString(), x); |
| | | dw_loglist.Retrieve(x); |
| | | dw_loglist.SetReadOnly(true); |
| | | |
| | | xflowchart__ dw_chart = new xflowchart__; |
| | | dw_chart.setNativePointer(GetControl("dw_logchart")); |
| | | xml__ xc = new xml__; |
| | | xc.setNativePointer(xml__ ::CreateInstance()); |
| | | url::get("/sale/data/workflow.core/workflow/chk/logchart", argx.GetString(), xc); |
| | | msxml::IXMLDOMElement e = xc.GetXmlDoc().documentElement; |
| | | dw_chart.LoadEx(e); |
| | | xflowchart dw_chart = GetControl(L"dw_logchart"); |
| | | xml xc; |
| | | xurl::get(L"/sale/data/workflow.core/workflow/chk/logchart", argx.GetString(), xc); |
| | | KXMLDOMElement e = xc.documentElement(); |
| | | dw_chart.Load(e); |
| | | |
| | | /* |
| | | string xbox = "<vbox><ximage name='pic' transparent='1' src='/business/flow/"+arg.GetArgString("EntityName")+".jpg'/></vbox>"; |
| | | xnode__ anode = new xnode__; |
| | | anode.setNativePointer(GetAgentNode("flowimage")); |
| | | SetAgentNodeContent (anode,xbox);*/ |
| | | |
| | | imageview__ im = new imageview__; |
| | | im.setNativePointer(GetControl("image")); |
| | | //alert(arg.GetArgString("EntityName")); |
| | | im.AddImages("/business/flow/"+arg.GetArgString("EntityName")+".jpg"); |
| | | ximageview im = GetControl(L"image"); |
| | | im.AddImages((xstring)L"/business/flow/" + arg.GetArgString(L"EntityName") + L".jpg"); |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | }; |