From 35d07b6e7d26dba5869d298567ef53b75867c258 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期三, 30 十月 2024 12:15:30 +0800
Subject: [PATCH] update

---
 jrj/project/business/Affair/Business5.cpp |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/jrj/project/business/Affair/Business5.cpp b/jrj/project/business/Affair/Business5.cpp
index 0441872..34f9a1d 100644
--- a/jrj/project/business/Affair/Business5.cpp
+++ b/jrj/project/business/Affair/Business5.cpp
@@ -6,6 +6,7 @@
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
+#include "xcontrol/xshtml.hpp"
 
 using xml = KXMLDOMDocument;
 
@@ -20,15 +21,15 @@
 		xnode	m_agentNode;	//Agent Condition
 		xtreeview tv_folder;
 		
-		int		hMessage;
-		int		hTask;
+		HTREEITEM		hMessage;
+		HTREEITEM		hTask;
 	
 		xstring 	agentFor;
 		xstring    selectname;
 		xwin		sheet;
 
 	public:
-		Business5Win(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+		Business5Win(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd),sheet(0) {}
 	public:
 		static Business5Win* CreateInstance(void* implPtr, void* hWnd)
 		{
@@ -418,7 +419,7 @@
 			if(doc.xml() == L"")
 				return -1;
 			//trace(doc.xml());
-			htmlctrl ht = GetControl(L"taskinfo");
+			xshtml ht = GetControl(L"taskinfo");
 			ht.SetContent(doc.xml());
 			ht.Redraw();
 			return 1;
@@ -426,7 +427,7 @@
 		int OnItemAskStyle(TEvent* evt, int p)
 		{
 			int DMS_CSSSTYLE = 0x8;
-			ref DWASKSTYLENMHDR hdr = trust(evt.pnmh as ref DWASKSTYLENMHDR);
+			DWASKSTYLENMHDR& hdr = *(DWASKSTYLENMHDR*)evt->notify.pnmh;
 			int row = hdr.row;
 			int col = hdr.col;
 			xstring colname = hdr.colname;
@@ -444,7 +445,7 @@
 				{
 					hdr.mask =  DMS_CSSSTYLE;
 					//hdr.cssstyle = L"color:#cccccc";
-					hdr.cssstyle = L"font-weight:700";
+					hdr.pCssStyle = (LPTSTR)L"font-weight:700";
 					
 				}
 			}
@@ -513,7 +514,7 @@
 				xstring TaskID = ele.getAttribute(L"guid");
 				xstring Category = dw_message.GetItemString(row,L"Category");
 				if(Category==L"货号申请"){
-					int p1 ;
+					int p1=0 ;
 					OpenWindow(L"dev:xpage[UserProductApply.vx]", p1);
 				}
 				if(Category==L"普通"){
@@ -530,7 +531,7 @@
 				{
 					if(dw_message.GetRowCount() < 1) return 1;
 					xstring No = dw_message.GetItemString(dw_message.GetRow(),L"No");
-					OpenWindow(L"dev:xpage[EnquiryEx.quote.vx]",cast(No as int));
+					OpenWindow(L"dev:xpage[EnquiryEx.quote.vx]",(LPARAM)No.c_str());
 				}
 				if(Category==L"SupplierV3")
 				{
@@ -591,7 +592,7 @@
 			return 1;
 		}
 		
-		int  ExpandChildFolder(int hItem, KXMLDOMElement pElement)
+		int  ExpandChildFolder(HTREEITEM hItem, KXMLDOMElement pElement)
 		{
 			KXMLDOMNodeList nlist = pElement.selectNodes(L"Item");
 			int len = nlist.length();
@@ -603,7 +604,7 @@
 				xstring child = e.getAttribute(L"child");
 				int image = 15;
 				if(sImage) image = sImage.toInt();
-				int h= tv_folder.InsertChildItem(tv_folder.GetId(),hItem,name, trust(e as int),image);
+				HTREEITEM h= tv_folder.InsertChildItem(hItem,name, e,image);
 				if(child !=L"no" ) tv_folder.SetItemChild(h,1);
 				ExpandChildFolder(h,e);
 			}
@@ -616,14 +617,14 @@
 			KXMLDOMNodeList nlist = x.selectNodes(L"/data/Item"); 
 			KXMLDOMNode t = nlist.item(0);
 			xstring informationQuantity =t.selectSingleNode(L"informationQuantity").text();
-			tv_folder.SetItemLabel(hMessage, L"消息"+L"(L"+informationQuantity+L")L");
+			tv_folder.SetItemLabel(hMessage, (xstring)L"消息"+L"("+informationQuantity+L")");
 			
 			xml x1 = ViewObject::RetrieveData(L"/sale/data/business/list/AdjustTipTask");
 			//alert(x1.xml());
 			KXMLDOMNodeList nlist1 = x1.selectNodes(L"/data/Item");
 			KXMLDOMNode t1= nlist1.item(0);
 			xstring informationQuantityTask =t1.selectSingleNode(L"informationQuantityTask").text();
-			tv_folder.SetItemLabel(hTask, L"任务"+L"(L"+informationQuantityTask+L")L");
+			tv_folder.SetItemLabel(hTask, (xstring)L"任务"+L"("+informationQuantityTask+L")");
 			
 			/*select count(*) from bpm_task where typ='notify' and  process='N' 
 			and charindex('|'+'00303'+'|','|' + rtrim(receiver) +'|')>=1*/
@@ -663,9 +664,9 @@
 			tv_folder.SetLineAtRoot(true);
 			sheet = GetChildWin(L"sheet1");
 			
-			int hItem = tv_folder.GetRootItem();
+			HTREEITEM hItem = tv_folder.GetRootItem();
 			tv_folder.ExpandItem(hItem);
-			int hcItem =tv_folder.GetChildItem(hItem);
+			HTREEITEM hcItem =tv_folder.GetChildItem(hItem);
 			hTask = hcItem;
 			tv_folder.ExpandItemAll(hcItem);
 			tv_folder.ItemFocus(tv_folder.GetChildItem(hcItem));

--
Gitblit v1.9.3