#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(string comdid)
|
{
|
if (GetWinParam())
|
{
|
xaserverarg arg = GetArg();
|
if (comdid == L"xmOK")
|
{
|
xcontrol xc = GetControl(L"content");
|
arg.AddArg(L"content", xc.GetText());
|
}
|
arg.AddArg(L"comdid", comdid);
|
}
|
CloseWindow();
|
return 0;
|
}
|
|
//ÃüÁî´¦Àíʼþ
|
int OnXCommand(TEvent* evt, int param)
|
{
|
return OnCmdDispatch(evt->xcommand.pStrID);
|
}
|
|
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;
|
}
|
};
|