From 4f95e70728b6ce95c4902c027b02540e28294093 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 07 十一月 2024 11:07:44 +0800
Subject: [PATCH] update

---
 jrj/project/business/SystemSettings/Flow3.cpp |   52 ++++++++++++++++++++++++----------------------------
 1 files changed, 24 insertions(+), 28 deletions(-)

diff --git a/jrj/project/business/SystemSettings/Flow3.cpp b/jrj/project/business/SystemSettings/Flow3.cpp
index b12854a..e4246a6 100644
--- a/jrj/project/business/SystemSettings/Flow3.cpp
+++ b/jrj/project/business/SystemSettings/Flow3.cpp
@@ -4,6 +4,7 @@
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
 #include <xcontrol/xdatetimepick.hpp>
+#include <xcontrol/xflowchart.hpp>
 
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
@@ -61,18 +62,18 @@
 			if(typ==L"fieldrole") return dw_datafieldright;
 			return 0;
 		}
-		xdwgrid GetSheetDbmap(int index)
+		xstring GetSheetDbmap(int index)
 		{
 			xstring typ = GetSheetType(index);
-			if(typ==L"flowitem") return "flow.dbmap";
-			if(typ==L"actionrole") return "workflow.actionrole.dbmap";
-			if(typ==L"state") return "state.dbmap";
-			if(typ==L"button") return "button.dbmap";
-			if(typ==L"role") return "role.dbmap";
-			if(typ==L"bill") return "bill.dbmap";
-			if(typ==L"scene") return "scene.dbmap";
-			if(typ==L"fieldrole") return "workflow.datarole.dbmap";
-			return 0;
+			if(typ==L"flowitem") return L"flow.dbmap";
+			if(typ==L"actionrole") return L"workflow.actionrole.dbmap";
+			if(typ==L"state") return L"state.dbmap";
+			if(typ==L"button") return L"button.dbmap";
+			if(typ==L"role") return L"role.dbmap";
+			if(typ==L"bill") return L"bill.dbmap";
+			if(typ==L"scene") return L"scene.dbmap";
+			if(typ==L"fieldrole") return L"workflow.datarole.dbmap";
+			return L"";
 		}
 		
 		xstring GetDwname(xstring typ)
@@ -130,18 +131,17 @@
 				{
 					e = ls.item(k).selectSingleNode(L"flowID");
 					e.setAttribute(L"update.modify",L"1");
-					e.text() = flowid;
+					e.settext(flowid);
 				}else
 				{
 					e = x.createElement(L"flowID");
 					e.setAttribute(L"update.modify",L"1");
-					e.text() = flowid;
+					e.settext(flowid);
 					ls.item(k).appendChild(e);
 				}
 			}
 				
 			xaserverarg arg ;
-			;
 			arg.AddArg(L"content",x.xml());
 			arg.AddArg(L"sdbmap",sdbmap);
 			trace(x.xml());
@@ -205,7 +205,6 @@
 			//trace(colname);
 			
 			xaserverarg arg ;
-			;	
 
 			xstring comdid =L"";
 			xstring data=L"";
@@ -270,8 +269,8 @@
 			{
 				data = arg.GetArgString(L"data");
 				display = arg.GetArgString(L"display");
-				dw_list.SetItemDisplayString(row,colname,display); 
-				dw_list.SetItemString(row,colname,data); 
+				dw_list.SetItemDisplayString(row,colname.c_str(), display);
+				dw_list.SetItemString(row,colname.c_str(), data);
 				dw_list.Redraw();
 			}	
 
@@ -284,12 +283,10 @@
 			xdwgrid dw_list = GetSheetDwgrid(i);
 			
 			xaserverarg arg ;
-			;	
 			arg.SetArg(L"stype",GetSheetType(i),L"xstring");
 			arg.SetArg(L"sdata",L"ddd",L"xstring");
 			arg.SetArg(L"flowID",flowid,L"xstring");
-			int obj = cast(dw_list as int);
-			arg.SetArg(L"dwobj",obj.toString(),L"xstring");
+			arg.SetParam(L"dwobj",&dw_list);
 			arg.SetArg(L"dwname",GetDwname(GetSheetType(i)),L"xstring");
 			OpenWindow(L"dev:xpage[FlowTermImport.vx]",arg);
 
@@ -300,10 +297,9 @@
 		{
 			if(flowid==L"") return 1;
 			
-			xml x ;
+			xml x;
 			
-			xaserverarg arg ;
-			;	
+			xaserverarg arg;	
 			
 			//int i = tab_1.GetSheetIndex();
 			for(int i=0;i<7;i++)
@@ -333,7 +329,7 @@
 			NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh;
 			
 			HTREEITEM hItem = nmtv.itemNew.hItem;
-			KXMLDOMElement& e = *(KXMLDOMElement*)tv_1.GetItemData(hItem);
+			KXMLDOMElement e = tv_1.GetItemData(hItem);
 			flowid = e.getAttribute(L"flowID");
 				
 			HCURSOR hCursor = xutil::SetCursorWait();
@@ -359,14 +355,14 @@
 		
 			if(flowUrl != L"")
 			{
-				if(xaserver::FetchXml(flowUrl,L"",f)==1)
+				if(xaserver::FetchXml(GetServerUrl(),flowUrl,L"",f)==1)
 				{
-					flowchart.LoadEx(f.documentElement());
+					flowchart.Load(f.documentElement());
 				}
 			}else
 			{
 				f.loadXML(L"<sheet/>");
-				flowchart.LoadEx(f.documentElement());
+				flowchart.Load(f.documentElement());
 			}
 			return 1;
 		}
@@ -420,14 +416,14 @@
 			{
 				KXMLDOMNodeList nlist = x.selectNodes(L"//item"); 
 				int len = nlist.length();
-				int hItem = 0;
+				HTREEITEM hItem = 0;
 				for (int i = 0; i < len; i++)
 				{	
 					KXMLDOMElement e = nlist.item(i);
 					xstring name = e.getAttribute(L"flowName");
 					xstring no = e.getAttribute(L"flowNo");
 					xstring label = name;//no.trim() + L" " + name;
-					int h= tv_folder.InsertChildItem(hItem,label, trust(e as int),22);				
+					HTREEITEM h= tv_folder.InsertChildItem(hItem,label, e,22);				
 					//tv_folder.SetItemChild(h,1);
 				}
 			}

--
Gitblit v1.9.3