|  |  | 
 |  |  | class workflow_actionlog_vd : 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_vd : public xwin | 
 |  |  | { | 
 |  |  | public: | 
 |  |  |    workflow_actionlog_vd(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} | 
 |  |  |    static workflow_actionlog_vd* CreateInstance(void* implPtr, void* hWnd) | 
 |  |  |    { | 
 |  |  |       workflow_actionlog_vd* pWin = new workflow_actionlog_vd(implPtr, (HWND)hWnd); | 
 |  |  |       return pWin; | 
 |  |  |    } | 
 |  |  | public: | 
 |  |  |    //命令发布函数 | 
 |  |  |    int OnCmdDispatch(xstring comdid) | 
 |  |  |    { | 
 |  |  |       CloseWindow(); | 
 |  |  |       return 0; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    //命令处理事件 | 
 |  |  |    int OnXCommand(TEvent* evt, int param) | 
 |  |  |    { | 
 |  |  |       return OnCmdDispatch(evt->xcommand.pStrID); | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int OnAttachEvent() | 
 |  |  |    { | 
 |  |  |       //绑定工具条点击事件 | 
 |  |  |       AttachEvent(L"WM_XCOMMAND", (FEvent)&workflow_actionlog_vd::OnXCommand); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |    int onload() | 
 |  |  |    { | 
 |  |  |       SetArg(); | 
 |  |  |       OnAttachEvent(); | 
 |  |  |  | 
 |  |  |       xdwgrid dw_loglist = GetControl(L"dw_loglist"); | 
 |  |  |       dw_loglist.openUrl(L"/sale/view/workflow.view/template/chkdlg/loglist"); | 
 |  |  |  | 
 |  |  |       if (GetWinParam()) | 
 |  |  |       { | 
 |  |  |          //命令发布函数 | 
 |  |  |          int OnCmdDispatch(string comdid) | 
 |  |  |          { | 
 |  |  |             CloseWindow(); | 
 |  |  |             return 0; | 
 |  |  |          } | 
 |  |  | 			 | 
 |  |  |          //命令处理事件 | 
 |  |  |          int OnXCommand(ref TXCommandEvent evt,int param) | 
 |  |  |          { | 
 |  |  |             return OnCmdDispatch(evt.pStrID); | 
 |  |  |          } | 
 |  |  |          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); | 
 |  |  |  | 
 |  |  |          int OnAttachEvent() | 
 |  |  |          { | 
 |  |  |             //绑定工具条点击事件 | 
 |  |  |             AttachEvent("WM_XCOMMAND",OnXCommand); | 
 |  |  |          } | 
 |  |  | 			 | 
 |  |  | 			 | 
 |  |  |          int onload() | 
 |  |  |          { | 
 |  |  |             OnAttachEvent(); | 
 |  |  | 				 | 
 |  |  | 				 | 
 |  |  |             xdwgrid__ dw_loglist = new xdwgrid__; | 
 |  |  |             dw_loglist.setNativePointer(GetControl("dw_loglist")); | 
 |  |  |             dw_loglist.openUrl("/sale/view/workflow.view/template/chkdlg/loglist"); | 
 |  |  |             if(this.GetParam()) | 
 |  |  |             { | 
 |  |  |          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); | 
 |  |  |  | 
 |  |  | 				 | 
 |  |  |                int iArgs = GetParam(); | 
 |  |  |                xaserverarg__ argx = new xaserverarg__; | 
 |  |  |                argx.setNativePointer(iArgs);						 | 
 |  |  | 				 | 
 |  |  |                argx.AddArg("EntityID",argx.GetArgString("EntityID")); | 
 |  |  | 				 | 
 |  |  |                xml__ x = new xml__; | 
 |  |  |                x.setNativePointer(xml__ ::CreateInstance()); | 
 |  |  |                url::get("/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); | 
 |  |  | 				 | 
 |  |  |                /* | 
 |  |  |                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")); | 
 |  |  |                trace(argx.GetArgString("EntityName")); | 
 |  |  |                im.AddImages("/business/flow/"+argx.GetArgString("EntityName")+".jpg"); | 
 |  |  |             } | 
 |  |  | 				 | 
 |  |  |             return 1; | 
 |  |  |          } | 
 |  |  |          ximageview im = GetControl(L"image"); | 
 |  |  |          im.AddImages((xstring)L"/business/flow/" + arg.GetArgString(L"EntityName") + L".jpg"); | 
 |  |  |       } | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |       } | 
 |  |  | }; |