|  |  | 
 |  |  | class workflow_chkdlg_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_chkdlg_vd : public xwin | 
 |  |  | { | 
 |  |  | public: | 
 |  |  |    workflow_chkdlg_vd(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} | 
 |  |  |    static workflow_chkdlg_vd* CreateInstance(void* implPtr, void* hWnd) | 
 |  |  |    { | 
 |  |  |       workflow_chkdlg_vd* pWin = new workflow_chkdlg_vd(implPtr, (HWND)hWnd); | 
 |  |  |       return pWin; | 
 |  |  |    } | 
 |  |  | public: | 
 |  |  |  | 
 |  |  |    //命令发布函数 | 
 |  |  |    int OnCmdDispatch(xstring comdid) | 
 |  |  |    { | 
 |  |  |       if (GetWinParam()) | 
 |  |  |       { | 
 |  |  |          //命令发布函数 | 
 |  |  |          int OnCmdDispatch(string comdid) | 
 |  |  |          xaserverarg arg = GetArg(); | 
 |  |  |          if (comdid == L"xmOK") | 
 |  |  |          { | 
 |  |  |             if(this.GetParam()) | 
 |  |  |             { | 
 |  |  |                if(comdid=="xmOK") | 
 |  |  |                { | 
 |  |  |                   control__ xc = new control__; | 
 |  |  |                   xc.setNativePointer(GetControl("content")); | 
 |  |  |                   string str = ""+xc.GetText(); | 
 |  |  |                   //trace(str); | 
 |  |  |                   int iArgs = GetParam(); | 
 |  |  |                   xaserverarg__ arg = new xaserverarg__; | 
 |  |  |                   arg.setNativePointer(iArgs);						 | 
 |  |  |                   arg.AddArg("content",str); | 
 |  |  |                } | 
 |  |  |                arg.AddArg("comdid",comdid); | 
 |  |  |             } | 
 |  |  |             CloseWindow(); | 
 |  |  |             return 0; | 
 |  |  |             xcontrol xc = GetControl(L"content"); | 
 |  |  |             xstring str = xc.GetText(); | 
 |  |  |             if (str == L"")str = L"."; | 
 |  |  |             arg.AddArg(L"content", str); | 
 |  |  |          } | 
 |  |  | 			 | 
 |  |  |          //命令处理事件 | 
 |  |  |          int OnXCommand(ref TXCommandEvent evt,int param) | 
 |  |  |          { | 
 |  |  |             return OnCmdDispatch(evt.pStrID); | 
 |  |  |          } | 
 |  |  |          arg.AddArg(L"comdid", comdid); | 
 |  |  |       } | 
 |  |  |       CloseWindow(); | 
 |  |  |       return 0; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |          int OnAttachEvent() | 
 |  |  |          { | 
 |  |  |             //绑定工具条点击事件 | 
 |  |  |             AttachEvent("WM_XCOMMAND",OnXCommand); | 
 |  |  |          } | 
 |  |  | 			 | 
 |  |  | 			 | 
 |  |  |          int onload() | 
 |  |  |          { | 
 |  |  |             //alert("新的"); | 
 |  |  |             OnAttachEvent(); | 
 |  |  |             xaserverarg__ arg; | 
 |  |  |             if(this.GetParam()) | 
 |  |  |             { | 
 |  |  |                int iArgsx = this.GetParam(); | 
 |  |  |                arg = new xaserverarg__;				 | 
 |  |  |                arg.setNativePointer(iArgsx); | 
 |  |  |                //trace(iArgsx); | 
 |  |  |                control__ xc = new control__; | 
 |  |  |                xc.setNativePointer(GetControl("content")); | 
 |  |  |                xc.SetText(""+arg.GetArgString("content")); | 
 |  |  |             } | 
 |  |  | 				 | 
 |  |  |             xdwgrid__ dw_loglist = new xdwgrid__; | 
 |  |  |             dw_loglist.setNativePointer(GetControl("dw_loglist")); | 
 |  |  |             dw_loglist.openUrl("/sale/view/workflow.view/template/chkdlg/loglist"); | 
 |  |  | 				 | 
 |  |  |             if(this.GetParam()) | 
 |  |  |             { | 
 |  |  |    //命令处理事件 | 
 |  |  |    int OnXCommand(TEvent* evt, int param) | 
 |  |  |    { | 
 |  |  |       return OnCmdDispatch(evt->xcommand.pStrID); | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |                int iArgs = GetParam(); | 
 |  |  |                xaserverarg__ argx = new xaserverarg__; | 
 |  |  |                argx.setNativePointer(iArgs);					 | 
 |  |  | 				 | 
 |  |  |                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); | 
 |  |  |                dw_loglist.Retrieve(x); | 
 |  |  |                dw_loglist.SetReadOnly(true); | 
 |  |  |             } | 
 |  |  | 				 | 
 |  |  |             return 1; | 
 |  |  |          } | 
 |  |  |    int OnAttachEvent() | 
 |  |  |    { | 
 |  |  |       //绑定工具条点击事件 | 
 |  |  |       AttachEvent(L"WM_XCOMMAND", (FEvent)&workflow_chkdlg_vd::OnXCommand); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |    int onload() | 
 |  |  |    { | 
 |  |  |       SetArg(); | 
 |  |  |       OnAttachEvent(); | 
 |  |  |       xaserverarg arg; | 
 |  |  |       if (GetWinParam()) | 
 |  |  |       { | 
 |  |  |          arg = GetArg(); | 
 |  |  |          xcontrol xc = GetControl(L"content"); | 
 |  |  |          xc.SetText(arg.GetArgString(L"content")); | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       xdwgrid dw_loglist = GetControl(L"dw_loglist"); | 
 |  |  |       dw_loglist.openUrl(L"/sale/view/workflow.view/template/chkdlg/loglist"); | 
 |  |  |  | 
 |  |  |       if (GetWinParam()) | 
 |  |  |       { | 
 |  |  |          xaserverarg argx; | 
 |  |  |          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); | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  | }; |