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.cpp |  135 ++++++++++++++++++++++++---------------------
 1 files changed, 72 insertions(+), 63 deletions(-)

diff --git a/jrj/project/workflow/workflow.chkdlg.cpp b/jrj/project/workflow/workflow.chkdlg.cpp
index 5b60cd1..145cdda 100644
--- a/jrj/project/workflow/workflow.chkdlg.cpp
+++ b/jrj/project/workflow/workflow.chkdlg.cpp
@@ -1,68 +1,77 @@
-class workflow_chkdlg : 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 : public xwin
+{
+public:
+	workflow_chkdlg(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+	static workflow_chkdlg* CreateInstance(void* implPtr, void* hWnd)
+	{
+		workflow_chkdlg* pWin = new workflow_chkdlg(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);
-						xaserverarg__ arg = this.GetParam();
-						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()
-			{
-				OnAttachEvent();
-				xaserverarg__ arg;
-				if(this.GetParam())
-				{
-					arg = this.GetParam();
-					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())
-				{
-					xaserverarg__ argx = new xaserverarg__;
-					argx.setNativePointer(argx.CreateInstance());		
-					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);
-					dw_loglist.Retrieve(x);
-					dw_loglist.SetReadOnly(true);
-				}
-				
-				return 1;
-			}
+	//命令处理事件
+	int OnXCommand(TEvent* evt, int param)
+	{
+		return OnCmdDispatch(evt->xcommand.pStrID);
+	}
 
-		}
\ No newline at end of file
+	int OnAttachEvent()
+	{
+		//绑定工具条点击事件
+		AttachEvent(L"WM_XCOMMAND", (FEvent)&workflow_chkdlg::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;
+	}
+};
\ No newline at end of file

--
Gitblit v1.9.3