From 3a3137b405af9728f9a7e4d7ee725498d0e8ecb7 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 18 七月 2024 09:25:10 +0800
Subject: [PATCH] system module

---
 jrj/project/business/BasicCode/SKUItem.categoryselect.cpp |   15 +
 jrj/project/business/BasicCode/ForwarderList.cpp          |   27 +-
 jrj/project/business/BasicCode/PaymentTerm.maint.cpp      |   11 
 jrj/project/business/BasicCode/SKUTemplate.cpp            |   17 
 jrj/project/business/SystemSettings/view.assignadjust.cpp |   12 
 jrj/project/business/BasicCode/TestingCompanyMaint.cpp    |   15 
 jrj/project/business/BasicCode/ShipcompanyList.cpp        |    8 
 jrj/project/business/BasicCode/FCL.cpp                    |   24 -
 jrj/project/business/SystemSettings/FlowTermImport.cpp    |   13 
 jrj/xframe/wobject/xcontrol.hpp                           |    6 
 jrj/project/business/BasicCode/QuickCode_Tree.cpp         |   81 +++-----
 jrj/project/business/SystemSettings/AddUser.cpp           |    6 
 jrj/project/business/SystemSettings/level.Customer.v3.cpp |    4 
 jrj/project/business/BasicCode/ForwarderMaint.cpp         |   19 -
 jrj/project/business/BasicCode/QuickCode.cpp              |   95 ++++-----
 jrj/xframe/xcontrol/xdwgrid.hpp                           |    7 
 jrj/project/business/SystemSettings/SysUser.cpp           |    9 
 jrj/project/business/BasicCode/TestingCompanyList.cpp     |    8 
 jrj/project/business/BasicCode/Simple.Menu.Config.cpp     |   10 
 jrj/project/business/SystemSettings/LogList.cpp           |    2 
 jrj/project/business/BasicCode/ShipcompanyMaint.cpp       |   15 
 jrj/project/business/BasicCode/ExpressMaint.cpp           |   20 -
 jrj/xframe/wobject/xpage.hpp                              |    2 
 jrj/project/business/SystemSettings/Flow3.cpp             |   42 ++--
 jrj/project/business/SystemSettings/UserPassDlg.cpp       |    9 
 jrj/xframe/xcontrol/xtreeview.hpp                         |    5 
 jrj/project/business/BasicCode/SKUItem.cpp                |   12 
 jrj/project/business/SystemSettings/ProcessManagement.cpp |    1 
 jrj/xframe/wobject/xwin.hpp                               |    5 
 jrj/ext-jrj/ext-jrj.vcxproj                               |   48 ++--
 jrj/project/business/BasicCode/PaymentTerm.list.cpp       |   13 
 31 files changed, 269 insertions(+), 292 deletions(-)

diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index 6fb6257..87c8ac8 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj
+++ b/jrj/ext-jrj/ext-jrj.vcxproj
@@ -325,58 +325,58 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\ExpressMaint.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\FCL.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\ForwarderList.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\ForwarderMaint.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\FreightExpenseType.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\PaymentTerm.list.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\PaymentTerm.maint.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\ProfitParam.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\QuickCode.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\QuickCode_Tree.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\SetUpRemarks.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\ShipcompanyList.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\ShipcompanyMaint.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\Simple.Menu.Config.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\SKUItem.categoryselect.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\SKUItem.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\SKUItem.select.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\SKUTemplate.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\SKUTemplate.select.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -388,10 +388,10 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\TestingCompanyList.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\TestingCompanyMaint.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\BasicCode\TypeList.maint.supplier.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
@@ -840,29 +840,29 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\Flow3.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\FlowTermImport.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\FlowTermSelect.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\level.Customer.v3.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\LogList.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\maint.Level.Customer3.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\Organization.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\OrganizationBase.cpp" />
     <ClCompile Include="..\project\business\SystemSettings\ProcessManagement.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\Resource.select.data.config.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -874,7 +874,7 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\SysUser.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\TestRetrieveing.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
@@ -883,10 +883,10 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\UserPassDlg.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\SystemSettings\view.assignadjust.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
     <ClCompile Include="..\project\business\VATNotify\list.vatnotify.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
diff --git a/jrj/project/business/BasicCode/ExpressMaint.cpp b/jrj/project/business/BasicCode/ExpressMaint.cpp
index ade086e..59bc7d6 100644
--- a/jrj/project/business/BasicCode/ExpressMaint.cpp
+++ b/jrj/project/business/BasicCode/ExpressMaint.cpp
@@ -5,11 +5,12 @@
 #include <xcontrol/xlayersheet.hpp>
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
 #include "xcontrol/xcell.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) ExpressMaint : public xframe
+class __declspec(dllexport) ExpressMaint : public maint
 {
 public:
 	KXMLDOMDocument m_configDoc;
@@ -20,25 +21,18 @@
 	xcell dw_cell;
 	xstring m_EntityID = L"";
 public:
-	ExpressMaint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+	ExpressMaint(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
 public:
 	static ExpressMaint* CreateInstance(void* implPtr, void* hWnd)
 	{
 		ExpressMaint* pWin = new ExpressMaint(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int alert(xstring str)
-	{
-		//win::MessageBox(GetHWND(),str,L"提示22:",0);
-		TApp::alert(this, str);
-		return 0;
-	}
+
 	int setCellReadOnly()
 	{
-		dw_base = new xdwtable;
-		dw_base.setNativePointer(GetControl(L"dw_base"));
-		dw_cell = new xcell;
-		dw_cell.setNativePointer(dw_base.QueryItem(L"ixcell"));
+		dw_base = GetControl(L"dw_base");
+		dw_cell = dw_base.QueryItem(L"ixcell");
 		xstring strnew = L"<cellprop celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellvalid='' cellinitial=''/>";
 		dw_cell.SetCellProps(2, 2, strnew);
 		return 0;
@@ -342,7 +336,7 @@
 
 		maint::onload();
 		OnClear();
-
+		return 1;
 	}
 
 };
\ No newline at end of file
diff --git a/jrj/project/business/BasicCode/FCL.cpp b/jrj/project/business/BasicCode/FCL.cpp
index c612560..afa9bc1 100644
--- a/jrj/project/business/BasicCode/FCL.cpp
+++ b/jrj/project/business/BasicCode/FCL.cpp
@@ -8,7 +8,7 @@
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) FCL : public xframe
+class __declspec(dllexport) FCL : public listwin
 {
 public:
 	xcombobox ddlb_1;
@@ -23,7 +23,7 @@
 	xstring m_config;
 	xstring m_spec;
 public:
-	FCL(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+	FCL(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {}
 public:
 	static FCL* CreateInstance(void* implPtr, void* hWnd)
 	{
@@ -85,11 +85,11 @@
 	}
 	int SetCellEdit(int row, xstring name, xstring value, xstring display)
 	{
-		dw_base.SetItemString(row, name, value);
+		dw_base.SetItemString(row, name.c_str(), value);
 		dw_base.Redraw();
 		if (display != L"")
 		{
-			dw_base.SetItemDisplayString(row, name, display);
+			dw_base.SetItemDisplayString(row, name.c_str(), display);
 		}
 		dw_base.AcceptText();
 		dw_base.ResetUpdateStatus();
@@ -101,10 +101,10 @@
 		dw_base.AcceptText();
 		SetPriceBaseEmpty();
 		KXMLDOMElement e = dw_list.GetRowElement(row);
-		var list = e.selectNodes(L"*");
+		auto list = e.selectNodes(L"*");
 		if (list)
 		{
-			int s = list.length;
+			int s = list.length();
 			int i;
 			for (i = 0; i < s; i++)
 			{
@@ -243,17 +243,9 @@
 
 		dw_list.DwUpdateAllToEx(x);
 		trace(x.xml());
+		return 1;
 	}
-	int OnDeleteRow()
-	{
-		int row = dw_list.GetRow();
-		if (row<1 || row>dw_list.GetRowCount())
-		{
-			return -1;
-		}
-		dw_list.DeleteRow(row);
 
-	}
 	int OnAddrow()
 	{
 		int row = dw_list.InsertRow(0);
@@ -270,6 +262,7 @@
 		SetPriceBaseEmpty();
 		return 1;
 	}
+
 	int OnDeleteRow()
 	{
 		int row = dw_list.GetRow();
@@ -280,6 +273,7 @@
 		}
 		return 1;
 	}
+
 	int OnCmdDispatch(xstring comdid)
 	{
 		if (comdid.find(L"add", 0) >= 0)
diff --git a/jrj/project/business/BasicCode/ForwarderList.cpp b/jrj/project/business/BasicCode/ForwarderList.cpp
index 5d58f1e..983b40a 100644
--- a/jrj/project/business/BasicCode/ForwarderList.cpp
+++ b/jrj/project/business/BasicCode/ForwarderList.cpp
@@ -8,7 +8,7 @@
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) ForwarderList : public xwin
+class __declspec(dllexport) ForwarderList : public listwin
 {
 
 public:
@@ -22,7 +22,7 @@
 	int m_pageNumber;
 	xdwgrid	dw_list;
 public:
-	ForwarderList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+	ForwarderList(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {}
 public:
 	static ForwarderList* CreateInstance(void* implPtr, void* hWnd)
 	{
@@ -39,14 +39,14 @@
 
 		getUrl(L"/sale/data/LogisticsCode/entity/list", arg.GetString(), x);
 		KXMLDOMElement e = x.documentElement();
-		if (e)
+		/*if (e)
 		{
-			if (list::dw_pages.nativept && e.selectSingleNode(L"@TotalPage"))
+			if (listwin::dw_pages && e.selectSingleNode(L"@TotalPage"))
 			{
 				xstring s = e.selectSingleNode(L"@TotalPage").text(); //总数量				
-				list::dw_pages.SetMaxPage(s.toInt());
+				listwin::dw_pages.SetMaxPage(s.toInt());
 			}
-		}
+		}*/
 		dw_list.Retrieve(x);
 		dw_list.Redraw();
 		dw_list.SetReadOnly(true);
@@ -63,14 +63,14 @@
 		arg.AddArg(L"pageindex", xstring(m_pageIndex)); //第几页
 		arg.AddArg(L"pagenumber", xstring(m_pageNumber)); //每页数量
 		//trace(list::m_QueryTxt);
-		arg.AddArg(L"QueryTxt", list::m_QueryTxt); //每页数量					
+		arg.AddArg(L"QueryTxt", listwin::m_QueryTxt); //每页数量					
 		return SetEntityData(arg);
 	}
 	int OnTreeSelChanged(TEvent* evt, LPARAM p)
 	{
 		NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh;
 		HTREEITEM hItem = nmtv.itemNew.hItem;
-		list::m_QueryTxt = L"";
+		listwin::m_QueryTxt = L"";
 
 		HTREEITEM hitem = tv_1.GetSelectedItem();
 		//c_type=dw_type.GetItemLabel(hitem);
@@ -93,7 +93,7 @@
 		return 1;
 	}
 
-	int ViewUpdate(param pr, xstring updateItem, xaserverarg   arg)
+	int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg   arg)
 	{
 		if (updateItem == L"del")
 		{
@@ -114,22 +114,21 @@
 
 	int onload()
 	{
-		list::m_QueryTxt = L"";
+		listwin::m_QueryTxt = L"";
 		m_pageIndex = 1;
 		m_pageNumber = 30;
 		sType = L"0";
-		list::onload();
+		listwin::onload();
 
 		OnAttachEvent();
 
 
 
-		tv_1 = new treeview;
-		tv_1.setNativePointer(GetControl(L"tv_1"));
+		tv_1 = GetControl(L"tv_1");
 
 		HTREEITEM root = tv_1.GetRootItem();
 		tv_1.ExpandItem(root);
-		dw_list.SetColumnStaus(L"ForwarderID", false);
+		dw_list.SetColumnState(L"ForwarderID", false);
 		return 1;
 	}
 };
\ No newline at end of file
diff --git a/jrj/project/business/BasicCode/ForwarderMaint.cpp b/jrj/project/business/BasicCode/ForwarderMaint.cpp
index cf41bc5..53e1d61 100644
--- a/jrj/project/business/BasicCode/ForwarderMaint.cpp
+++ b/jrj/project/business/BasicCode/ForwarderMaint.cpp
@@ -3,12 +3,14 @@
 #include <xcontrol/xdwgrid.hpp>
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xcell.hpp>
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) ForwarderMaint : public xframe
+class __declspec(dllexport) ForwarderMaint : public maint
 {
 public:
 	KXMLDOMDocument m_configDoc;
@@ -20,19 +22,14 @@
 	xcell dw_cell;
 	xstring m_EntityID = L"";
 public:
-	ForwarderMaint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+	ForwarderMaint(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
 public:
 	static ForwarderMaint* CreateInstance(void* implPtr, void* hWnd)
 	{
 		ForwarderMaint* pWin = new ForwarderMaint(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int alert(xstring str)
-	{
-		//win::MessageBox(GetHWND(),str,L"提示22:",0);
-		TApp::alert(this, str);
-		return 0;
-	}
+
 	int setCellReadOnly()
 	{
 		dw_base = new xdwtable;
@@ -49,7 +46,6 @@
 	}
 	int OnClear() {
 		if (m_EntityID == L"") {
-			trace(1);
 			m_userid = publiccode::GetUser().id;
 			m_username = publiccode::GetUser().name;
 			dw_base = new xdwtable;
@@ -300,8 +296,8 @@
 		//主联系人
 		xstring spGuid;
 		KXMLDOMElement e;
-		var list = x.selectNodes(L"//item");
-		int nlen = list.length;
+		auto list = x.selectNodes(L"//item");
+		int nlen = list.length();
 		int i;
 		for (i = 0; i < nlen; i++)
 		{
@@ -462,6 +458,7 @@
 		maint::onload();
 
 		OnClear();
+		return 1;
 	}
 
 };
\ No newline at end of file
diff --git a/jrj/project/business/BasicCode/PaymentTerm.list.cpp b/jrj/project/business/BasicCode/PaymentTerm.list.cpp
index d21425f..9cb895a 100644
--- a/jrj/project/business/BasicCode/PaymentTerm.list.cpp
+++ b/jrj/project/business/BasicCode/PaymentTerm.list.cpp
@@ -8,13 +8,13 @@
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class  __declspec(dllexport) PaymentTermlist111 : public xwin
+class  __declspec(dllexport) PaymentTermlist111 : public listwin
 {
 public:
 
 	xdwgrid  dw_list;
 public:
-	PaymentTermlist111(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+	PaymentTermlist111(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {}
 public:
 	static PaymentTermlist111* CreateInstance(void* implPtr, void* hWnd)
 	{
@@ -39,7 +39,7 @@
 		if (arg.GetArgString(L"ret") == L"Ok")
 		{
 			alert(L"OK");
-			list::onloaded();
+			listwin::onloaded();
 		}				
 		return 1;
 	}	
@@ -98,7 +98,7 @@
 	}
 	int OnRefresh()
 	{
-		list::onloaded();
+		listwin::onloaded();
 		return 0;
 	}
 	//按钮事件
@@ -128,15 +128,16 @@
 	int onload()
 	{
 		
-		list::onload();
+		listwin::onload();
 		OnAttachEvent();
+		return 1;
 	}
 	
 	int onloaded()
 	{
 		//OnRetrieve();
 		//alert(L"12");
-		list::onloaded();
+		listwin::onloaded();
 			
 			
 		return -1; 
diff --git a/jrj/project/business/BasicCode/PaymentTerm.maint.cpp b/jrj/project/business/BasicCode/PaymentTerm.maint.cpp
index 3604cc8..c54e92e 100644
--- a/jrj/project/business/BasicCode/PaymentTerm.maint.cpp
+++ b/jrj/project/business/BasicCode/PaymentTerm.maint.cpp
@@ -1,14 +1,17 @@
 #include <wobject/xstring.hpp>
 #include <xcontrol/xtreeview.hpp>
 #include <xcontrol/xdwgrid.hpp>
+#include <xcontrol/xdwtable.hpp>
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xcell.hpp>
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
-#include "viewobject/view.base.hpp"
+#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
+#include <xcontrol/xlayersheet.hpp>
 
 using xml = KXMLDOMDocument;
-class  __declspec(dllexport) PaymentTermEdit : public xframe
+class  __declspec(dllexport) PaymentTermEdit : public maint
 {
 public:
 	xdwtable dw_base;
@@ -16,7 +19,7 @@
 	xcell dw_cell;
 	xstring sCryno;
 public:
-	PaymentTermEdit(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+	PaymentTermEdit(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
 public:
 	static PaymentTermEdit* CreateInstance(void* implPtr, void* hWnd)
 	{
@@ -413,7 +416,7 @@
 		OnRetrieve();
 		OnAttachEvent();
 		//dw_base = GetControl(L"dw_base");
-		
+		return 1;
 	}
 	
 	int onloaded()
diff --git a/jrj/project/business/BasicCode/QuickCode.cpp b/jrj/project/business/BasicCode/QuickCode.cpp
index ffc66cf..1fd2885 100644
--- a/jrj/project/business/BasicCode/QuickCode.cpp
+++ b/jrj/project/business/BasicCode/QuickCode.cpp
@@ -3,12 +3,13 @@
 #include <xcontrol/xdwgrid.hpp>
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
+#include <wobject/xpage.hpp>
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) QuickCode : public xwin
+class __declspec(dllexport) QuickCode : public xframe
 {
 public:
 	xdwgrid	dw_list;
@@ -22,19 +23,14 @@
 	KXMLDOMDocument m_configDoc;
 	xnode	m_agentNode;
 public:
-	QuickCode(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+	QuickCode(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
 public:
 	static QuickCode* CreateInstance(void* implPtr, void* hWnd)
 	{
 		QuickCode* pWin = new QuickCode(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int alert(xstring str)
-	{
-		//win::MessageBox(GetHWND(),str,L"提示:",0);
-		TApp::alert(this, str);
-		return 0;
-	}
+
 	int SetAgent()
 	{
 		xstring xfNodeAgentArea = L"agentarea";
@@ -183,8 +179,8 @@
 			{
 				xstring CategoryID = arg.GetArgString(L"CategoryID");
 				xstring CName = arg.GetArgString(L"CName");
-				dw_list.SetItemDisplayString(row, colname, CName);
-				dw_list.SetItemString(row, colname, CategoryID);
+				dw_list.SetItemDisplayString(row, colname.c_str(), CName);
+				dw_list.SetItemString(row, colname.c_str(), CategoryID);
 				dw_list.Redraw();
 			}
 		}
@@ -196,8 +192,8 @@
 			{
 				xstring OrgName = arg.GetArgString(L"OrgName");
 				xstring OrgId = arg.GetArgString(L"OrgId");
-				dw_list.SetItemDisplayString(row, colname, OrgName);
-				dw_list.SetItemString(row, colname, OrgId);
+				dw_list.SetItemDisplayString(row, colname.c_str(), OrgName);
+				dw_list.SetItemString(row, colname.c_str(), OrgId);
 				dw_list.Redraw();
 			}
 		}
@@ -210,8 +206,8 @@
 				xstring sPersonID = arg.GetArgString(L"sPersonID");
 				trace(sPersonID);
 				xstring sPersonName = arg.GetArgString(L"sPersonName");
-				dw_list.SetItemDisplayString(row, colname, sPersonName);
-				dw_list.SetItemString(row, colname, sPersonID);
+				dw_list.SetItemDisplayString(row, colname.c_str(), sPersonName);
+				dw_list.SetItemString(row, colname.c_str(), sPersonID);
 				dw_list.Redraw();
 			}
 		}
@@ -227,14 +223,14 @@
 
 		//xstring str = hdr.data;
 		xstring colname = hdr.colname;
-		xstring str = dw_list.GetItemString(row, colname);
+		xstring str = dw_list.GetItemString(row, colname.c_str());
 		arg.AddArg(L"value", str);
 		openUrl(L"/sale/view/view.dlg/xpage/memo/edit", arg);
 		xstring comdid = arg.GetArgString(L"comdid");
 		if (comdid == L"xmOK")
 		{
 			xstring value = arg.GetArgString(L"value");
-			dw_list.SetItemString(row, colname, value);
+			dw_list.SetItemString(row, colname.c_str(), value);
 			dw_list.Redraw();
 		}
 
@@ -242,7 +238,7 @@
 	}
 	int ItemOutput()
 	{
-		xstring d = xaserver::GetCurrentDate();
+		xstring d = publiccode::GetCurrentDate();
 		d = d.left(10) + L"";
 		dw_list.SaveAs(d);
 		return 1;
@@ -292,10 +288,10 @@
 		while (row > 0)
 		{
 			xstring tmp;
-			if (dw_list.GetItemDisplayString(row, col))
-				tmp = dw_list.GetItemDisplayString(row, col);
+			if (dw_list.GetItemDisplayString(row, col.c_str()))
+				tmp = dw_list.GetItemDisplayString(row, col.c_str());
 			else
-				tmp = dw_list.GetItemString(row, col);
+				tmp = dw_list.GetItemString(row, col.c_str());
 			str += tmp + L"\r\n";
 			row = dw_list.GetNextSelectRow(row + 1);
 		}
@@ -308,25 +304,25 @@
 		DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
 		int row = hdr.row;
 
-		int m = win::CreatePopupMenu();
+		HMENU m = CreatePopupMenu();
 		int MF_STRING = 0x00000000;
 		int MF_DISABLED = 0x00000002;
 		int TPM_RIGHTBUTTON = 0x0002;
 		int TPM_RETURNCMD = 0x0100;
 		int MF_CHECKED = 0x8;
 		int MF_SEPARATOR = 0x0800;
-		win::AppendMenu(m, MF_STRING, 1, L"复制行");
-		win::AppendMenu(m, MF_STRING, 101, L"复制列");
-		win::AppendMenu(m, MF_SEPARATOR, -1, L"");
-		win::AppendMenu(m, MF_STRING, 2, L"全选");
-		win::AppendMenu(m, MF_SEPARATOR, -1, L"");
-		win::AppendMenu(m, MF_STRING, 4, L"导出到Excel");
-		win::AppendMenu(m, MF_SEPARATOR, -1, L"");
-		win::AppendMenu(m, MF_STRING, 6, L"显示列设置");
-		xrect xr;
+		AppendMenu(m, MF_STRING, 1, L"复制行");
+		AppendMenu(m, MF_STRING, 101, L"复制列");
+		AppendMenu(m, MF_SEPARATOR, -1, L"");
+		AppendMenu(m, MF_STRING, 2, L"全选");
+		AppendMenu(m, MF_SEPARATOR, -1, L"");
+		AppendMenu(m, MF_STRING, 4, L"导出到Excel");
+		AppendMenu(m, MF_SEPARATOR, -1, L"");
+		AppendMenu(m, MF_STRING, 6, L"显示列设置");
+		RECT xr;
 		xpoint pt;
-		win::GetCursorPos(pt);
-		int ret = win::TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), xr);
+		GetCursorPos(pt);
+		int ret = TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), &xr);
 
 		//trace(ret);
 		HCURSOR hCursor = xutil::SetCursorWait();
@@ -414,26 +410,15 @@
 				p = p.mid(p.find(L"&", 0) + 1, p.length());
 			}
 		}
-		return "";
+		return L"";
 	}
 	int getURLParam()
 	{
 		if (GetWinParam())
 		{
-			xpage xp = new xpage;
-			xp.setNativePointer(GetXPage());
+			xpage xp = GetXPage();
 			xstring aurl = xp.GetWkUrl();
-			xaserverarg arg;
-			if (aurl && aurl.find(L"native=true", 0) > 0)
-			{
-				int p = GetParam();
-				arg;
-				arg.setNativePointer(p);
-			}
-			else
-			{
-				arg = GetParam();
-			}
+			xaserverarg arg = GetArg();
 			xstring config = arg.GetArgString(L"config");
 			xml x;
 
@@ -457,7 +442,7 @@
 		getURLParam();
 		KXMLDOMDocument	 ee = m_configDoc;
 		xstring id = m_id;
-		var n = ee.selectSingleNode(L"//list/dwview[@type='dwgrid'][@id='" + id + L"']");
+		auto n = ee.selectSingleNode(L"//list/dwview[@type='dwgrid'][@id='" + id + L"']");
 		xstring vface = m_configDoc.selectSingleNode(L"//vface[1]").text();
 		xstring dwname = L"";//e.selectsingleNode(L"@name").text();
 		xstring tpl = L"";//e.selectsingleNode(L"@url").text();
@@ -474,7 +459,7 @@
 		}
 		else
 		{
-			var m = ee.selectSingleNode(L"//list");
+			auto m = ee.selectSingleNode(L"//list");
 			KXMLDOMElement e1 = m;
 			//trace(e.xml());
 			if (e1.selectSingleNode(L"@name")) dwname = e1.selectSingleNode(L"@name").text();
@@ -487,7 +472,7 @@
 		dw_list.setNativePointer(GetControl(dwname));
 		dw_list.openUrl(vface + L"/" + tpl);
 		//dw_list.SetSelectionMode(4);							
-
+		return 1;
 	}
 	int Onital()
 	{
@@ -503,9 +488,9 @@
 			return -1;
 		}
 
-		var list = x1.selectNodes(L"root/item");
+		auto list = x1.selectNodes(L"root/item");
 		int i;
-		int s = list.length;
+		int s = list.length();
 		if (s > 0)
 		{
 			xstring str = L"<cellprop celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellvalid='' cellinitial=''><edit edittype='ddlb' ddlbxml='&lt;data>";
@@ -538,9 +523,9 @@
 			return -1;
 		}
 
-		var list1 = x2.selectNodes(L"root/item");
+		auto list1 = x2.selectNodes(L"root/item");
 		int j;
-		int s1 = list1.length;
+		int s1 = list1.length();
 		if (s1 > 0)
 		{
 			xstring str1 = L"<cellprop celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellvalid='' cellinitial=''><edit edittype='ddlb' ddlbxml='&lt;data>";
@@ -573,9 +558,9 @@
 			return -1;
 		}
 
-		var list2 = x3.selectNodes(L"root/item");
+		auto list2 = x3.selectNodes(L"root/item");
 		int k;
-		int s2 = list2.length;
+		int s2 = list2.length();
 		if (s2 > 0)
 		{
 			xstring str2 = L"<cellprop celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellvalid='' cellinitial=''><edit edittype='ddlb' ddlbxml='&lt;data>";
diff --git a/jrj/project/business/BasicCode/QuickCode_Tree.cpp b/jrj/project/business/BasicCode/QuickCode_Tree.cpp
index b8b99b0..334fe69 100644
--- a/jrj/project/business/BasicCode/QuickCode_Tree.cpp
+++ b/jrj/project/business/BasicCode/QuickCode_Tree.cpp
@@ -8,7 +8,7 @@
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) QuickCode_Tree : public xwin
+class __declspec(dllexport) QuickCode_Tree : public listwin
 {
 public:
 	xdwgrid	dw_list;
@@ -25,19 +25,14 @@
 	xstring m_QueryTxt;
 	xnode	m_agentNode;
 public:
-	QuickCode_Tree(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+	QuickCode_Tree(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {}
 public:
 	static QuickCode_Tree* CreateInstance(void* implPtr, void* hWnd)
 	{
 		QuickCode_Tree* pWin = new QuickCode_Tree(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int alert(xstring str)
-	{
-		TApp::alert(this, str);
-		//win::MessageBox(GetHWND(),str,L"提示:",0);
-		return 0;
-	}
+
 	int SetAgent()
 	{
 		xstring xfNodeAgentArea = L"agentarea";
@@ -289,14 +284,14 @@
 		//trace(x.xml());
 		//trace(strtpl);
 		xstring aa = strtpl;
-		var doc = x;
-		var n = doc.selectSingleNode(L"//resource[@url='" + aa + L"']/@src");
+		auto doc = x;
+		auto n = doc.selectSingleNode(L"//resource[@url='" + aa + L"']/@src");
 		//trace(n.text());			
 
 		xaserverarg arg;
 
 		arg.AddArg(L"sheet", n.text());
-		arg.AddArg(L"search", list::m_QueryTxt);
+		arg.AddArg(L"search", listwin::m_QueryTxt);
 		openUrl(L"view.dlg.vface/xpage/grid/column/search", arg);
 		xstring ok = arg.GetArgString(L"return");
 		if (ok == L"ok") {
@@ -331,9 +326,9 @@
 
 				kp.loadXML(L"<root></root>");
 				KXMLDOMElement ele = kp.documentElement();
-				var list = e.selectNodes(L"item[@update.modify='1' or @update.delete='1' ]");
+				auto list = e.selectNodes(L"item[@update.modify='1' or @update.delete='1' ]");
 				int j;
-				int k = list.length;
+				int k = list.length();
 				for (j = 0; j < k; j++)
 				{
 					KXMLDOMElement ele1 = list.item(j);
@@ -409,8 +404,7 @@
 	int OnSetFocus(TEvent* evt, LPARAM p)
 	{
 		SetAgent();
-		tv_1 = new treeview;
-		tv_1.setNativePointer(GetControl(L"tv_1"));
+		tv_1 = GetControl(L"tv_1");
 
 		HTREEITEM root = tv_1.GetRootItem();
 		tv_1.ExpandItem(root);
@@ -426,14 +420,14 @@
 
 		//xstring str = hdr.data;
 		xstring colname = hdr.colname;
-		xstring str = dw_list.GetItemString(row, colname);
+		xstring str = dw_list.GetItemString(row, colname.c_str());
 		arg.AddArg(L"value", str);
 		openUrl(L"/sale/view/view.dlg/xpage/memo/edit", arg);
 		xstring comdid = arg.GetArgString(L"comdid");
 		if (comdid == L"xmOK")
 		{
 			xstring value = arg.GetArgString(L"value");
-			dw_list.SetItemString(row, colname, value);
+			dw_list.SetItemString(row, colname.c_str(), value);
 			dw_list.Redraw();
 		}
 
@@ -441,7 +435,7 @@
 	}
 	int ItemOutput()
 	{
-		xstring d = xaserver::GetCurrentDate();
+		xstring d = publiccode::GetCurrentDate();
 		d = d.left(10) + L"";
 		dw_list.SaveAs(d);
 		return 1;
@@ -491,10 +485,10 @@
 		while (row > 0)
 		{
 			xstring tmp;
-			if (dw_list.GetItemDisplayString(row, col))
-				tmp = dw_list.GetItemDisplayString(row, col);
+			if (dw_list.GetItemDisplayString(row, col.c_str()))
+				tmp = dw_list.GetItemDisplayString(row, col.c_str());
 			else
-				tmp = dw_list.GetItemString(row, col);
+				tmp = dw_list.GetItemString(row, col.c_str());
 			str += tmp + L"\r\n";
 			row = dw_list.GetNextSelectRow(row + 1);
 		}
@@ -507,25 +501,25 @@
 		DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
 		int row = hdr.row;
 
-		int m = win::CreatePopupMenu();
+		HMENU m = CreatePopupMenu();
 		int MF_STRING = 0x00000000;
 		int MF_DISABLED = 0x00000002;
 		int TPM_RIGHTBUTTON = 0x0002;
 		int TPM_RETURNCMD = 0x0100;
 		int MF_CHECKED = 0x8;
 		int MF_SEPARATOR = 0x0800;
-		win::AppendMenu(m, MF_STRING, 1, L"复制行");
-		win::AppendMenu(m, MF_STRING, 101, L"复制列");
-		win::AppendMenu(m, MF_SEPARATOR, -1, L"");
-		win::AppendMenu(m, MF_STRING, 2, L"全选");
-		win::AppendMenu(m, MF_SEPARATOR, -1, L"");
-		win::AppendMenu(m, MF_STRING, 4, L"导出到Excel");
-		win::AppendMenu(m, MF_SEPARATOR, -1, L"");
-		win::AppendMenu(m, MF_STRING, 6, L"显示列设置");
-		xrect xr;
+		AppendMenu(m, MF_STRING, 1, L"复制行");
+		AppendMenu(m, MF_STRING, 101, L"复制列");
+		AppendMenu(m, MF_SEPARATOR, -1, L"");
+		AppendMenu(m, MF_STRING, 2, L"全选");
+		AppendMenu(m, MF_SEPARATOR, -1, L"");
+		AppendMenu(m, MF_STRING, 4, L"导出到Excel");
+		AppendMenu(m, MF_SEPARATOR, -1, L"");
+		AppendMenu(m, MF_STRING, 6, L"显示列设置");
+		RECT xr;
 		xpoint pt;
-		win::GetCursorPos(pt);
-		int ret = win::TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), xr);
+		GetCursorPos(pt);
+		int ret = TrackPopupMenu(m, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, GetHWND(), &xr);
 
 		//trace(ret);
 		HCURSOR hCursor = xutil::SetCursorWait();
@@ -577,20 +571,7 @@
 	{
 		if (GetWinParam())
 		{
-			xpage xp = new xpage;
-			xp.setNativePointer(GetXPage());
-			xstring aurl = xp.GetWkUrl();
-			xaserverarg arg;
-			if (aurl && aurl.find(L"native=true", 0) > 0)
-			{
-				int p = GetParam();
-				arg;
-				arg.setNativePointer(p);
-			}
-			else
-			{
-				arg = GetParam();
-			}
+			xaserverarg arg = GetArg();
 			xstring config = arg.GetArgString(L"config");
 			xml x;
 
@@ -614,7 +595,7 @@
 		getURLParam();
 		KXMLDOMDocument	 ee = m_configDoc;
 		xstring id = m_id;
-		var n = ee.selectSingleNode(L"//list/dwview[@type='dwgrid'][@id='" + id + L"']");
+		auto n = ee.selectSingleNode(L"//list/dwview[@type='dwgrid'][@id='" + id + L"']");
 		if (n)
 		{
 			KXMLDOMElement e = n;
@@ -639,6 +620,7 @@
 			trace(tpl);
 
 		}
+		return 1;
 	}
 	int onload()
 	{
@@ -684,8 +666,7 @@
 		stree += L"</xtree></vbox>";
 		SetAgentNode(tnode, stree);
 
-		tv_1 = new treeview;
-		tv_1.setNativePointer(GetControl(L"tv_1"));
+		tv_1 = GetControl(L"tv_1");
 		
 		HTREEITEM root = tv_1.GetRootItem();
 		tv_1.ExpandItem( root);
diff --git a/jrj/project/business/BasicCode/SKUItem.categoryselect.cpp b/jrj/project/business/BasicCode/SKUItem.categoryselect.cpp
index 4b62ed7..8246a91 100644
--- a/jrj/project/business/BasicCode/SKUItem.categoryselect.cpp
+++ b/jrj/project/business/BasicCode/SKUItem.categoryselect.cpp
@@ -1,8 +1,13 @@
-use"lang.vl"
-use "win.vl"
-use "treeview.vm"
-use "file.vl"
-use "dev:vm[xdwtable.vm]"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
 
 unit vbusiness.vpage
 [
diff --git a/jrj/project/business/BasicCode/SKUItem.cpp b/jrj/project/business/BasicCode/SKUItem.cpp
index ec0c200..babeec5 100644
--- a/jrj/project/business/BasicCode/SKUItem.cpp
+++ b/jrj/project/business/BasicCode/SKUItem.cpp
@@ -127,8 +127,8 @@
 					return 0;
 				}
 				//trace(x.xml());
-				var list = x.selectNodes(L"root/SKUItem");
-				int i = 0, s = list.length;
+				auto list = x.selectNodes(L"root/SKUItem");
+				int i = 0, s = list.length();
 				KXMLDOMElement xitem;
 				KXMLDOMNode d;
 				for (i = 0; i < s; i++) {
@@ -175,7 +175,7 @@
 		KXMLDOMElement ele = tv_1.GetItemData(hitem);
 
 		HTREEITEM firstChild = tv_1.GetChildItem(hitem);
-		while (firstChild > 0) {
+		while (firstChild) {
 			tv_1.DeleteItem(firstChild);
 			firstChild = tv_1.GetChildItem(hitem);
 		}
@@ -296,10 +296,8 @@
 	int onload()
 	{
 		m_type = L"all";
-		tv_1 = new treeview;
-		tv_1.setNativePointer(GetControl(L"tv_1"));
-		dw_list = new xdwgrid;
-		dw_list.setNativePointer(GetControl(L"dw_list"));
+		tv_1 = GetControl(L"tv_1");
+		dw_list = GetControl(L"dw_list");
 		dw_list.openUrl(L"其他设置.vface/template/other/SKUItem");
 
 		OnInitial();
diff --git a/jrj/project/business/BasicCode/SKUTemplate.cpp b/jrj/project/business/BasicCode/SKUTemplate.cpp
index 9c410fb..f3c4149 100644
--- a/jrj/project/business/BasicCode/SKUTemplate.cpp
+++ b/jrj/project/business/BasicCode/SKUTemplate.cpp
@@ -140,11 +140,11 @@
 	int RemoveAttribute(xml x, xstring nodename)//根据名称删除属性节点
 	{
 		KXMLDOMElement e;
-		var list = x.getElementsByTagName(L"" + nodename + L"");
+		auto list = x.getElementsByTagName(L"" + nodename + L"");
 		if (list)
 		{
 
-			int nlen = list.length;
+			int nlen = list.length();
 			int i;
 			for (i = 0; i < nlen; i++)
 			{
@@ -159,6 +159,7 @@
 				//trace(e.xml);				
 			}
 		}
+		return 1;
 	}
 	int setMaint()
 	{
@@ -243,19 +244,20 @@
 	int RemoveChild(xml x, xstring nodename)//根据名称删除节点
 	{
 		KXMLDOMElement e;
-		var list = x.selectNodes(L"//Item[@update.delete='1']");
+		auto list = x.selectNodes(L"//Item[@update.delete='1']");
 		if (list)
 		{
-			int nlen = list.length;
+			int nlen = list.length();
 			int i;
 			for (i = 0; i < nlen; i++)
 			{
 				e = list.item(i);
 				//trace(e.xml);
-				e.parentNode.removeChild(e);
+				e.parentNode().removeChild(e);
 				//trace(e.xml);				
 			}
 		}
+		return 1;
 	}
 	int setMaint_removeChild()
 	{
@@ -329,8 +331,7 @@
 	int SKUItem()
 	{
 		xaserverarg arg;
-
-		arg.AddArg(L"dw_maint", dw_maint.nativept.toString());
+		arg.SetParam(L"dw_maint", &dw_maint);
 		openUrl(L"其他设置.vface/xpage/SKUItem/select", arg);
 		return 1;
 	}
@@ -338,7 +339,7 @@
 	{
 		xaserverarg arg;
 
-		arg.AddArg(L"dw_category", dw_category.nativept.toString());
+		arg.SetParam(L"dw_category", &dw_category);
 		openUrl(L"其他设置.vface/xpage/SKUItemcategory/select", arg);
 		return 1;
 	}
diff --git a/jrj/project/business/BasicCode/ShipcompanyList.cpp b/jrj/project/business/BasicCode/ShipcompanyList.cpp
index fc49f1e..84edb6b 100644
--- a/jrj/project/business/BasicCode/ShipcompanyList.cpp
+++ b/jrj/project/business/BasicCode/ShipcompanyList.cpp
@@ -8,13 +8,13 @@
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) ShipcompanyList : public xwin
+class __declspec(dllexport) ShipcompanyList : public listwin
 {
 public:
 
 	xdwgrid  dw_list;
 public:
-	ShipcompanyList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+	ShipcompanyList(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {}
 public:
 	static ShipcompanyList* CreateInstance(void* implPtr, void* hWnd)
 	{
@@ -23,11 +23,11 @@
 	}
 	int onload()
 	{
-		list::onload();
+		listwin::onload();
 		return -1;
 	}
 
-	int ViewUpdate(param pr, xstring updateItem, xaserverarg   arg)
+	int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg   arg)
 	{
 		if (updateItem == L"del")
 		{
diff --git a/jrj/project/business/BasicCode/ShipcompanyMaint.cpp b/jrj/project/business/BasicCode/ShipcompanyMaint.cpp
index bf9d254..8763d38 100644
--- a/jrj/project/business/BasicCode/ShipcompanyMaint.cpp
+++ b/jrj/project/business/BasicCode/ShipcompanyMaint.cpp
@@ -3,12 +3,14 @@
 #include <xcontrol/xdwgrid.hpp>
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xcell.hpp>
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) ShipcompanyMaint : public xframe
+class __declspec(dllexport) ShipcompanyMaint : public maint
 {
 public:
 	KXMLDOMDocument m_configDoc;
@@ -19,19 +21,14 @@
 	xstring m_EntityID = L"";
 	xcell dw_cell;
 public:
-	ShipcompanyMaint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+	ShipcompanyMaint(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
 public:
 	static ShipcompanyMaint* CreateInstance(void* implPtr, void* hWnd)
 	{
 		ShipcompanyMaint* pWin = new ShipcompanyMaint(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int alert(xstring str)
-	{
-		//win::MessageBox(GetHWND(),str,L"提示22:",0);
-		TApp::alert(this, str);
-		return 0;
-	}
+
 	int setCellReadOnly()
 	{
 		dw_base = new xdwtable;
@@ -316,6 +313,6 @@
 		maint::onload();
 
 		OnClear();
-
+		return 1;
 	}
 };
\ No newline at end of file
diff --git a/jrj/project/business/BasicCode/Simple.Menu.Config.cpp b/jrj/project/business/BasicCode/Simple.Menu.Config.cpp
index d201903..196ac87 100644
--- a/jrj/project/business/BasicCode/Simple.Menu.Config.cpp
+++ b/jrj/project/business/BasicCode/Simple.Menu.Config.cpp
@@ -81,13 +81,12 @@
 				dw_list.ResetUpdateStatus();
 				dw_list.DwUpdateAllToEx(x);
 				HTREEITEM hItem =tv_gs.GetSelectedItem();
-				if(hItem > 0)
+				if(hItem)
 				{
 					KXMLDOMElement e =  x.documentElement();
-					int p = trust(e);
-					tv_gs.SetItemData(hItem, p);
+					tv_gs.SetItemData(hItem, e);
 				
-					while(tv_gs.GetChildItem( hItem) > 0)
+					while(tv_gs.GetChildItem( hItem))
 						tv_gs.DeleteItem(tv_gs.GetChildItem( hItem));
 				
 					KXMLDOMNodeList li =  x.selectNodes(L"item/item");
@@ -95,9 +94,8 @@
 					for(i=0;i<s;i++)
 					{
 						KXMLDOMElement ele =  li.item(i);
-						int pa = trust(ele);
 						xstring name = ele.selectSingleNode(L"Name").text();
-						HTREEITEM cItem =tv_gs.InsertChildItem( hItem, name, pa, 15);
+						HTREEITEM cItem =tv_gs.InsertChildItem( hItem, name, ele, 15);
 						if(ele.selectSingleNode(L"item"))
 							tv_gs.SetItemChild1(cItem, 1);
 					}
diff --git a/jrj/project/business/BasicCode/TestingCompanyList.cpp b/jrj/project/business/BasicCode/TestingCompanyList.cpp
index 50c7dd3..993656f 100644
--- a/jrj/project/business/BasicCode/TestingCompanyList.cpp
+++ b/jrj/project/business/BasicCode/TestingCompanyList.cpp
@@ -8,13 +8,13 @@
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) TestingCompanyList : public xwin
+class __declspec(dllexport) TestingCompanyList : public listwin
 {
 public:
 
 	xdwgrid  dw_list;
 public:
-	TestingCompanyList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+	TestingCompanyList(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {}
 public:
 	static TestingCompanyList* CreateInstance(void* implPtr, void* hWnd)
 	{
@@ -23,11 +23,11 @@
 	}
 	int onload()
 	{
-		list::onload();
+		listwin::onload();
 		return -1;
 	}
 
-	int ViewUpdate(param pr, xstring updateItem, xaserverarg   arg)
+	int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg   arg)
 	{
 		if (updateItem == L"del")
 		{
diff --git a/jrj/project/business/BasicCode/TestingCompanyMaint.cpp b/jrj/project/business/BasicCode/TestingCompanyMaint.cpp
index c511fff..7e213d1 100644
--- a/jrj/project/business/BasicCode/TestingCompanyMaint.cpp
+++ b/jrj/project/business/BasicCode/TestingCompanyMaint.cpp
@@ -3,12 +3,14 @@
 #include <xcontrol/xdwgrid.hpp>
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xcell.hpp>
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) TestingCompanyMaint : public xframe
+class __declspec(dllexport) TestingCompanyMaint : public maint
 {
 public:
 	KXMLDOMDocument m_configDoc;
@@ -19,19 +21,14 @@
 	xcell dw_cell;
 	xstring m_EntityID = L"";
 public:
-	TestingCompanyMaint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+	TestingCompanyMaint(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
 public:
 	static TestingCompanyMaint* CreateInstance(void* implPtr, void* hWnd)
 	{
 		TestingCompanyMaint* pWin = new TestingCompanyMaint(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int alert(xstring str)
-	{
-		//win::MessageBox(GetHWND(),str,L"提示22:",0);
-		TApp::alert(this, str);
-		return 0;
-	}
+
 	int setCellReadOnly()
 	{
 		dw_base = new xdwtable;
@@ -317,6 +314,6 @@
 		maint::onload();
 
 		OnClear();
-
+		return 1;
 	}
 };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/AddUser.cpp b/jrj/project/business/SystemSettings/AddUser.cpp
index 2e215c3..ad1f6aa 100644
--- a/jrj/project/business/SystemSettings/AddUser.cpp
+++ b/jrj/project/business/SystemSettings/AddUser.cpp
@@ -45,10 +45,10 @@
 		return 1;
 	}
 	int AppendItem(xml x, KXMLDOMElement r, xstring item) {
-		var e = x.createElement(item);
+		auto e = x.createElement(item);
 		//xcontrol xc = GetControl(item);
 		xcontrol xc = GetControl(item);
-		e.text() = xc.GetText();
+		e.settext(xc.GetText());
 		r.appendChild(e);
 		return 1;
 	}
@@ -73,7 +73,7 @@
 		xaserverarg arg;
 
 		x.loadXML(L"<SysUser/>");
-		var r = x.documentElement();
+		auto r = x.documentElement();
 		xstring guid;
 		xstring guid1;
 		if (p.note == L"修改")
diff --git a/jrj/project/business/SystemSettings/Flow3.cpp b/jrj/project/business/SystemSettings/Flow3.cpp
index b12854a..4ec66de 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,12 +131,12 @@
 				{
 					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);
 				}
 			}
@@ -270,8 +271,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();
 			}	
 
@@ -288,8 +289,7 @@
 			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);
 
@@ -359,14 +359,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 +420,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);
 				}
 			}
diff --git a/jrj/project/business/SystemSettings/FlowTermImport.cpp b/jrj/project/business/SystemSettings/FlowTermImport.cpp
index 13cdf5c..38723d6 100644
--- a/jrj/project/business/SystemSettings/FlowTermImport.cpp
+++ b/jrj/project/business/SystemSettings/FlowTermImport.cpp
@@ -19,7 +19,7 @@
 		xstring flowid;
 		xstring datacolumn;
 		xstring displaycolumn;
-		xdwgrid dw_obj;
+		xdwgrid* dw_obj;
 	
 		xnode	m_agentNode;	//Agent Condition
 	public:
@@ -71,14 +71,14 @@
 			
 			while (row>0)
 			{
-				int nrow = dw_obj.InsertRow(0);
-				int columnCount = dw_obj.GetColumnCount();
+				int nrow = dw_obj->InsertRow(0);
+				int columnCount = dw_obj->GetColumnCount();
 				for(int i=1;i<=columnCount;i++)
 				{
 					if(dw_list.GetColumnName(i)==L"guid") continue;
-					dw_obj.SetItemString(nrow,i,dw_list.GetItemString(row,i));
+					dw_obj->SetItemString(nrow,i,dw_list.GetItemString(row,i));
 					if(dw_list.GetItemDisplayString(row,i)!=L"")
-						dw_obj.SetItemDisplayString(nrow,i,dw_list.GetItemDisplayString(row,i));
+						dw_obj->SetItemDisplayString(nrow,i,dw_list.GetItemDisplayString(row,i));
 				}
 				row = dw_list.GetNextSelectRow(row + 1);
 			}
@@ -155,8 +155,7 @@
 				flowid = arg.GetArgString(L"flowid");
 			
 				xstring dwname = arg.GetArgString(L"dwname");
-				int dwobj = arg.GetArgString(L"dwobj").toInt();
-				dw_obj = cast(dwobj as xdwgrid);
+				dw_obj = (xdwgrid*)arg.GetParam(L"dwobj");
 			
 				dw_list.openUrl(dwname);
 				OnRetrieve();
diff --git a/jrj/project/business/SystemSettings/LogList.cpp b/jrj/project/business/SystemSettings/LogList.cpp
index 07f77fb..21945f4 100644
--- a/jrj/project/business/SystemSettings/LogList.cpp
+++ b/jrj/project/business/SystemSettings/LogList.cpp
@@ -4,6 +4,8 @@
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
 #include <xcontrol/xdatetimepick.hpp>
+#include <xcontrol/xoffice.hpp>
+#include <xcontrol/xcell.hpp>
 
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
diff --git a/jrj/project/business/SystemSettings/ProcessManagement.cpp b/jrj/project/business/SystemSettings/ProcessManagement.cpp
index 5239d23..3d3a119 100644
--- a/jrj/project/business/SystemSettings/ProcessManagement.cpp
+++ b/jrj/project/business/SystemSettings/ProcessManagement.cpp
@@ -101,6 +101,7 @@
 			//alert(FobUnitPriceEx.find(L"$").toString());
 			if (FobUnitPriceEx.find(L"$") >= 0) FobUnitPriceEx = FobUnitPriceEx.right(FobUnitPriceEx.length() - 1);
 			trace(FobUnitPriceEx);
+			return 1;
 		}
 		//触发鼠标离开后tran事件,通过查找某个参数得到对应的列			
 		int OnBaseItemChanged(TEvent* evt, int p)
diff --git a/jrj/project/business/SystemSettings/SysUser.cpp b/jrj/project/business/SystemSettings/SysUser.cpp
index 02abbcf..a3b66d8 100644
--- a/jrj/project/business/SystemSettings/SysUser.cpp
+++ b/jrj/project/business/SystemSettings/SysUser.cpp
@@ -52,7 +52,7 @@
 		return 1;
 	}
 
-	int SetEntityData(param p)
+	int SetEntityData(LPARAM p)
 	{
 		xml x;
 
@@ -236,8 +236,8 @@
 			if (comdid == L"ok")
 			{
 				xstring strxml = arg.GetArgString(L"xml");
-				dw_user.SetItemDisplayString(row, colname, strxml);
-				dw_user.SetItemString(row, colname, strxml);
+				dw_user.SetItemDisplayString(row, colname.c_str(), strxml);
+				dw_user.SetItemString(row, colname.c_str(), strxml);
 				dw_user.Redraw();
 			}
 		}
@@ -310,8 +310,7 @@
 	{
 		m_agentNode = new xnode;
 
-		tv_usergroup = new treeview;
-		tv_usergroup.setNativePointer(GetControl(L"tv_usergroup"));
+		tv_usergroup = GetControl(L"tv_usergroup");
 		dw_user = new xdwgrid;
 		dw_user.setNativePointer(GetControl(L"dw_user"));
 		dw_user.SetDataObject(GetServerUrl(), L"dev:sheet[SysUser.tpl/UserList]");
diff --git a/jrj/project/business/SystemSettings/UserPassDlg.cpp b/jrj/project/business/SystemSettings/UserPassDlg.cpp
index 2dc14b5..10d6ab1 100644
--- a/jrj/project/business/SystemSettings/UserPassDlg.cpp
+++ b/jrj/project/business/SystemSettings/UserPassDlg.cpp
@@ -17,7 +17,6 @@
 
 		xnode	m_agentNode;	//Agent Condition
 
-		static xstring MD5(xstring) native from "XUtil.dll" alias "?MD5@IXFUtil@XFrame@Hxsoft@@SAPA_WPA_W@Z";
 	public:
 		UserPassDlg(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
 	public:
@@ -68,7 +67,7 @@
 				if(xcontrol(GetControl(L"old_pass")).GetText()==L"")
 				{
 					alert(L"请输入旧口令!");
-					SetFocus(xcontrol(GetControl(L"old_pass")).GetId());
+					SetFocus(GetControl(L"old_pass")->GetHWND());
 					return 1;
 				}
 				
@@ -78,12 +77,12 @@
 				if(str1 != str2)
 				{
 					alert(L"两遍新口令不一致!");
-					SetFocus(xcontrol(GetControl(L"new_pass1")).GetId());
+					SetFocus(GetControl(L"new_pass1")->GetHWND());
 					return 1;
 				}
 				
-				xstring oldpass = MD5(ostr);
-				xstring newpass = MD5(str1);
+				xstring oldpass = xutil::MD5(ostr);
+				xstring newpass = xutil::MD5(str1);
 				
 				xml x;
 				
diff --git a/jrj/project/business/SystemSettings/level.Customer.v3.cpp b/jrj/project/business/SystemSettings/level.Customer.v3.cpp
index 9326ae6..f7be604 100644
--- a/jrj/project/business/SystemSettings/level.Customer.v3.cpp
+++ b/jrj/project/business/SystemSettings/level.Customer.v3.cpp
@@ -52,7 +52,7 @@
 		}else	
 		{
 			KXMLDOMElement e=x.documentElement();
-			if(listwin::dw_pages.ptr_native_ && e.selectSingleNode(L"@TotalPage"))
+			if(listwin::dw_pages && e.selectSingleNode(L"@TotalPage"))
 			{
 				xstring s=e.selectSingleNode(L"@TotalPage").text(); //总数量				
 				listwin::dw_pages.SetMaxPage(s.toInt());
@@ -129,7 +129,7 @@
 	int OnCreateTree(xstring sType)
 	{
 		
-		while (tv_1.GetRootItem()>0)
+		while (tv_1.GetRootItem())
 			tv_1.DeleteItem(tv_1.GetRootItem());
 		
 		xml x ;
diff --git a/jrj/project/business/SystemSettings/view.assignadjust.cpp b/jrj/project/business/SystemSettings/view.assignadjust.cpp
index 326e9c8..8969135 100644
--- a/jrj/project/business/SystemSettings/view.assignadjust.cpp
+++ b/jrj/project/business/SystemSettings/view.assignadjust.cpp
@@ -18,7 +18,7 @@
 		KXMLDOMElement rptEle;
 		xstring argStr;
 		xstring	searchStr;
-		int      hWndRetrieveTip;
+		HWND      hWndRetrieveTip;
 		bool    dataretrieveing;
 	public:
 		AssignAdjustWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
@@ -105,6 +105,8 @@
 						
 				}
 				dw_list.Redraw();
+
+				return 1;
 			}
 				
 				
@@ -209,7 +211,7 @@
 		int ShowList(int h)
 		{
 			KXMLDOMElement xframeElement =  GetElement();
-			KXMLDOMElement e =  xframeElement.selectSingleNode(L"//xcombobox[@name='cb_report']/item["+(h+1).toString()+L"]");
+			KXMLDOMElement e =  xframeElement.selectSingleNode(L"//xcombobox[@name='cb_report']/item["+xstring(h+1)+L"]");
 			if(e)	SwitchReport(e);
 			PostMessage(GetHWND(),0x401,(LPARAM)L"xmQuery",0);
 			return 1;
@@ -218,8 +220,8 @@
 				int ShowRetrieveingTip()
 		{
 			dataretrieveing = true;
-			xwin pwin = OpenWindow(L"dev:xpage[TestRetrieveing.vx]",0);
-			hWndRetrieveTip =pwin.GetHWND();
+			xwin* pwin = OpenWindow(L"dev:xpage[TestRetrieveing.vx]");
+			hWndRetrieveTip = pwin->GetHWND();
 			return 1;
 		}
 		int CloseRetrieveTip()
@@ -259,7 +261,7 @@
 		
 		int onload()
 		{
-			rptEle = 0;
+			rptEle = nullptr;
 			dw_list = GetControl(L"dw_list");
 			OnAttachEvent();	
 			
diff --git a/jrj/xframe/wobject/xcontrol.hpp b/jrj/xframe/wobject/xcontrol.hpp
index 4bd5f02..02c03d1 100644
--- a/jrj/xframe/wobject/xcontrol.hpp
+++ b/jrj/xframe/wobject/xcontrol.hpp
@@ -5,6 +5,7 @@
 #include "kobject/kwin.hpp"
 #include "win32/win.hpp"
 #include "wobject/xstring.hpp"
+
 using kwin=Hxsoft::XFrame::IXFWin;
 using kcontrol = Hxsoft::XFrame::IXFControl;
 
@@ -62,4 +63,9 @@
 	{
 		return ((kcontrol*)this->getNativePointer())->GetElement();
 	}
+
+	Hxsoft::XFrame::xbObject* QueryItem(xstring pItem)
+	{
+		return ((kcontrol*)this->getNativePointer())->QueryItem((LPTSTR)pItem.c_str());
+	}
 };
diff --git a/jrj/xframe/wobject/xpage.hpp b/jrj/xframe/wobject/xpage.hpp
index e838411..d46dc36 100644
--- a/jrj/xframe/wobject/xpage.hpp
+++ b/jrj/xframe/wobject/xpage.hpp
@@ -14,6 +14,8 @@
 class xpage : public xnative
 {
 public:
+    xpage(void* impl) :xnative(impl) {}
+public:
     kpage* getKPage()
     {
         return (kpage*)this->GetNativePtr();
diff --git a/jrj/xframe/wobject/xwin.hpp b/jrj/xframe/wobject/xwin.hpp
index 15de5fc..011b1d2 100644
--- a/jrj/xframe/wobject/xwin.hpp
+++ b/jrj/xframe/wobject/xwin.hpp
@@ -122,6 +122,11 @@
 		return xnode(getKWin()->SetAgentNodeContent((knode*)node.getNativePointer(), (knode*)val.getNativePointer()));
 	}
 
+	Hxsoft::XFrame::IXPage* GetXPage()
+	{
+		return getKWin()->GetXPage();
+	}
+
 	LPARAM GetWinParam()
 	{
 		return (LPARAM)getKWin()->GetParam();
diff --git a/jrj/xframe/xcontrol/xdwgrid.hpp b/jrj/xframe/xcontrol/xdwgrid.hpp
index 3191a40..9436db8 100644
--- a/jrj/xframe/xcontrol/xdwgrid.hpp
+++ b/jrj/xframe/xcontrol/xdwgrid.hpp
@@ -102,6 +102,11 @@
 public:
 	int	Reset() { return getKReport()->Reset_(); }
 	int	ResetUpdateStatus() { return getKReport()->ResetUpdateStatus_(); }
+public:
+	LPTSTR GetColumnProps(LPCTSTR pColName) { return getKReport()->GetColumnProps_(pColName); } //寰楀埌鍒楁暣浣揦ML灞炴��
+	int SetColumnProps(LPCTSTR pColName, LPCTSTR pXmlProp) { return getKReport()->SetColumnProps_(pColName, pXmlProp); } //璁剧疆鍒楁暣浣揦ML灞炴��
+	LPTSTR GetColumnProp(LPCTSTR pColName, LPCTSTR pItem) { return getKReport()->GetColumnProp_(pColName, pItem); } //寰楀埌鍒楀睘鎬�
+	int SetColumnProp(LPCTSTR pColName, LPCTSTR pItem, LPCTSTR pProp) { return getKReport()->SetColumnProp_(pColName, pItem, pProp); }//璁剧疆鍒楀睘鎬�
 
 public:
 	int event_ItemFocusChanged(int nRow, int nCol) { return getKReport()->event_ItemFocusChanged_(nRow, nCol); }
@@ -340,6 +345,7 @@
 		getKReport()->ShowEditor();
 	}
 public:
+	/*
 	LPCTSTR GetColumnProp(int nCol, LPCTSTR pItem)
 	{
 		return L"";
@@ -351,6 +357,7 @@
 		return L"";
 		//return getKReport()->GetColumnProp(pColName, pItem);
 	}
+	*/
 
 	int GetItemInt(int row, int col)
 	{
diff --git a/jrj/xframe/xcontrol/xtreeview.hpp b/jrj/xframe/xcontrol/xtreeview.hpp
index f0601aa..85ca898 100644
--- a/jrj/xframe/xcontrol/xtreeview.hpp
+++ b/jrj/xframe/xcontrol/xtreeview.hpp
@@ -172,6 +172,11 @@
             return  tvi.lParam;
     }
     
+    int SetItemData(HTREEITEM hItem, KXMLDOMElement value)
+    {
+        return  SetItemData(hItem, (LPARAM)value.ptr());
+    }
+
     int SetItemData(HTREEITEM hItem,LPARAM value)
     {
             int TVM_SETITEM = TV_FIRST + 63;

--
Gitblit v1.9.3