From 7aef6de88be3e865d9edaa24d76cd47bcda1cfdd Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期三, 05 三月 2025 17:38:14 +0800
Subject: [PATCH] update

---
 jrj/project/business/SystemSettings/CommentaryEx.dialog.cpp |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/jrj/project/business/SystemSettings/CommentaryEx.dialog.cpp b/jrj/project/business/SystemSettings/CommentaryEx.dialog.cpp
index e841c25..de715c6 100644
--- a/jrj/project/business/SystemSettings/CommentaryEx.dialog.cpp
+++ b/jrj/project/business/SystemSettings/CommentaryEx.dialog.cpp
@@ -57,7 +57,7 @@
 		int showAtt()
 		{
 			xnode anode = GetAgentNode(L"att");
-			int s = xcombobox::GetCount(m_cb.GetId());
+			int s = m_cb.GetCount();
 			xml x ;
 			x.loadXML(L"<vbox/>");
 		
@@ -65,7 +65,7 @@
 			int i = 0;
 			for (i = 0; i < s; i++)
 			{
-				xstring tmp = xcombobox::GetLBText(m_cb.GetId(), i);
+				xstring tmp = m_cb.GetLBText(i);
 				KXMLDOMElement e = x.createElement(L"hbox");
 				e.setAttribute(L"height", L"20");
 				KXMLDOMElement l = x.createElement(L"xlabel");
@@ -82,7 +82,7 @@
 				g.setAttribute(L"style", L"background-color:#000000");
 				ele.appendChild(g);
 			}
-			SetAgentNodeContent(anode, ele);
+			SetAgentNode(anode, ele.xml());
 			anode.SetWidthHeight(-1, i * 20 + 1);
 			return 1;
 		}
@@ -99,22 +99,22 @@
 		int delAtt(xstring no)
 		{
 			int nIndex = no.toInt();
-			xcombobox::DeleteItem(m_cb.GetId(), nIndex);
+			m_cb.DeleteItem(nIndex);
 			showAtt();
 			return 1;
 		}
 
 		KXMLDOMElement getAtt()
 		{
-			int s = xcombobox::GetCount(m_cb.GetId());
+			int s = m_cb.GetCount();
 			xml x;
 			x.loadXML(L"<Attachment/>");
-			KXMLDOMElement ele = x.documentElement;
+			KXMLDOMElement ele = x.documentElement();
 			int i = 0;
 			for (i = 0; i < s; i++)
 			{
-				xstring tmp = xcombobox::GetLBText(m_cb.GetId(), i);
-				xstring tmp2 = xcombobox::GetItemData(m_cb.GetId(), i);
+				xstring tmp = m_cb.GetLBText(i);
+				xstring tmp2 = m_cb.GetItemData( i);
 				KXMLDOMElement e = x.createElement(L"item");
 				e.setAttribute(L"name", L"" + tmp);
 				e.setAttribute(L"file", L"" + tmp2);
@@ -150,12 +150,12 @@
 				AppendItem(x, ele, L"CreatorID", xaserver::GetUserId());
 				ele.appendChild(getAtt());
 
-				arg.AddArg(L"content", L"<root>" + ele.xml + L"</root>");
+				arg.AddArg(L"content", (xstring)L"<root>" + ele.xml() + L"</root>");
 
 				if (getUrl(L"/workflow/action/Commentary/bill.update", arg.GetString(), x) == 1)
 				{
 					m_Edit.SetText(L"");
-					xcombobox::ResetContent(m_cb.GetId());
+					m_cb.ResetContent();
 					Init();
 					showAtt();
 					return 1;
@@ -189,7 +189,8 @@
 
 		int OnHtmlClick(TEvent* evt, LPARAM pr)
 		{
-			ref  HTMLNMHDR p = evt.pnmh;
+			/*
+			HTMLNMHDR& p = evt->pnmh;
 			const xstring d = m_Html.GetData(p.object);
 			if (d == L"") return -1;
 			xstring file = d.mid(0, d.find(L"|##@@|", 0));
@@ -216,7 +217,7 @@
 				alert(L"文件打开失败2!");
 				return -1;
 			}
-
+			*/
 			return -1;
 		}
 
@@ -225,6 +226,7 @@
 			//绑定工具条点击事件
 			AttachEvent(L"WM_XCOMMAND", (FEvent)&CommentaryEx::OnXCommand);
 			AttachEvent(L"note", L"HTC_OBJECTCLICKED", (FEvent)&CommentaryEx::OnHtmlClick);
+			return 1;
 		}
 
 		int onload()

--
Gitblit v1.9.3