From 50a37dbe8b73033a6295c9794c0f2f1b8db2b469 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期五, 28 六月 2024 18:03:04 +0800
Subject: [PATCH] update check dlg

---
 jrj/project/workflow/workflow.chkdlg_vd.cpp |  141 +++++++++++++++++++++++-----------------------
 1 files changed, 71 insertions(+), 70 deletions(-)

diff --git a/jrj/project/workflow/workflow.chkdlg_vd.cpp b/jrj/project/workflow/workflow.chkdlg_vd.cpp
index c6d51e8..8e86760 100644
--- a/jrj/project/workflow/workflow.chkdlg_vd.cpp
+++ b/jrj/project/workflow/workflow.chkdlg_vd.cpp
@@ -1,76 +1,77 @@
-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(string 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");
+				arg.AddArg(L"content", xc.GetText());
 			}
-			
-			//命令处理事件
-			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;
+	}
 
-		}
\ No newline at end of file
+
+	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;
+	}
+};
\ No newline at end of file

--
Gitblit v1.9.3