From 89c226a7da5ffc6748ff3ef70aacad7625bafa3e Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 05 九月 2024 15:03:11 +0800
Subject: [PATCH] update so payterm
---
jrj/ext-jrj/JPtr.cpp | 1
jrj/jarch.impl/JStringImpl.hpp | 3
jrj/ext-jrj/JFactoryStringImpl.h | 16 +++
jrj/project/business/SO/delivery.base.maint.so.cpp | 26 ++--
jrj/ext-jrj/JFactoryStringImpl.cpp | 1
jrj/project/business/SO/paymentterm.base.maint.so.cpp | 23 ++--
jrj/ext-jrj/JFactory.hpp | 9 +
/dev/null | 7 -
jrj/jarch/JObjectSvr.hpp | 6
jrj/jarch.impl/JStringImpl.cpp | 16 +++
jrj/ext-jrj/ext-jrj.def | 5 +
jrj/ext-jrj/JPtr.hpp | 21 ++++
jrj/ext-jrj/ext-jrj.vcxproj | 46 +++++++--
jrj/project/business/SO3.maint.cpp | 36 ++++++
jrj/ext-jrj/dllmain.cpp | 52 +++++++++
15 files changed, 216 insertions(+), 52 deletions(-)
diff --git a/jrj/ext-jrj/JFactory.hpp b/jrj/ext-jrj/JFactory.hpp
new file mode 100644
index 0000000..dfa799e
--- /dev/null
+++ b/jrj/ext-jrj/JFactory.hpp
@@ -0,0 +1,9 @@
+#pragma once
+#include "jobject.hpp"
+template<class T>
+class JFactory : public JObject
+{
+public:
+ virtual T* make() = 0;
+};
+
diff --git a/jrj/ext-jrj/JFactoryStringImpl.cpp b/jrj/ext-jrj/JFactoryStringImpl.cpp
new file mode 100644
index 0000000..0192e6f
--- /dev/null
+++ b/jrj/ext-jrj/JFactoryStringImpl.cpp
@@ -0,0 +1 @@
+#include "JFactoryStringImpl.h"
diff --git a/jrj/ext-jrj/JFactoryStringImpl.h b/jrj/ext-jrj/JFactoryStringImpl.h
new file mode 100644
index 0000000..31b2df9
--- /dev/null
+++ b/jrj/ext-jrj/JFactoryStringImpl.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "JFactory.hpp"
+#include "JStringImpl.hpp"
+class JFactoryStringImpl :
+ public JFactory<JString>
+{
+ JString* make()
+ {
+ return new JStringImpl();
+ }
+ void Release()
+ {
+ if (this)delete this;
+ }
+};
+
diff --git a/jrj/ext-jrj/JPtr.cpp b/jrj/ext-jrj/JPtr.cpp
new file mode 100644
index 0000000..91b0a66
--- /dev/null
+++ b/jrj/ext-jrj/JPtr.cpp
@@ -0,0 +1 @@
+#include "JPtr.hpp"
diff --git a/jrj/ext-jrj/JPtr.hpp b/jrj/ext-jrj/JPtr.hpp
new file mode 100644
index 0000000..d3f722c
--- /dev/null
+++ b/jrj/ext-jrj/JPtr.hpp
@@ -0,0 +1,21 @@
+#pragma once
+#include "jobject.hpp"
+template<class Ty>
+class JPtr :
+ public JObject
+{
+public:
+ JPtr(Ty* impl) :impl(impl) {}
+ ~JPtr() {
+ ((JObject*)impl)->Release();
+ }
+public:
+ Ty* operator ->() {
+ return impl;
+ }
+public:
+ void Release() {}
+private:
+ Ty* impl;
+};
+
diff --git a/jrj/ext-jrj/dllmain.cpp b/jrj/ext-jrj/dllmain.cpp
index daed8c8..a0816b0 100644
--- a/jrj/ext-jrj/dllmain.cpp
+++ b/jrj/ext-jrj/dllmain.cpp
@@ -1,10 +1,22 @@
锘�// dllmain.cpp : 瀹氫箟 DLL 搴旂敤绋嬪簭鐨勫叆鍙g偣銆�
#include "pch.h"
-BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
+#include "JObject.hpp"
+#include "JFactoryStringImpl.h"
+//#include "JFileStream.hpp"
+//#include "JDataBlock.hpp"
+//#include "JDataStore.hpp"
+//#include "JDataSet.hpp"
+
+extern "C"
+{
+ bool WINAPI CreateJObjectInstance(LPTSTR pStrObject, JObject*& pJObject);
+}
+
+BOOL APIENTRY DllMain(HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+)
{
switch (ul_reason_for_call)
{
@@ -17,3 +29,35 @@
return TRUE;
}
+
+bool WINAPI CreateJObjectInstance(LPTSTR pStrObject, JObject*& pJObject)
+{
+ pJObject = nullptr;
+ if (wcscmp(pStrObject, L"JFactoryString") == 0)
+ {
+ pJObject = new JFactoryStringImpl();
+ return true;
+ }
+ if (wcscmp(pStrObject, L"JString") == 0)
+ {
+ pJObject = new JStringImpl();
+ return true;
+ }
+ /*
+ else if (wcscmp(pStrObject, L"JDataStore")==0)
+ {
+ pJObject = new JDataStore();
+ return true;
+ }
+ else if (wcscmp(pStrObject, L"JDataBlock")==0)
+ {
+ pJObject = new JDataBlock();
+ return true;
+ }
+ else if (wcscmp(pStrObject, L"JDataSet")==0)
+ {
+ pJObject = new JDataSet();
+ return true;
+ }*/
+ return false;
+}
diff --git a/jrj/ext-jrj/ext-jrj.def b/jrj/ext-jrj/ext-jrj.def
new file mode 100644
index 0000000..ac085c7
--- /dev/null
+++ b/jrj/ext-jrj/ext-jrj.def
@@ -0,0 +1,5 @@
+LIBRARY "ext-jrj.dll"
+
+EXPORTS
+ ; 此处可以是显式导出
+CreateJObjectInstance
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index 974209d..d441f91 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj
+++ b/jrj/ext-jrj/ext-jrj.vcxproj
@@ -91,6 +91,7 @@
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
+ <ModuleDefinitionFile>ext-jrj.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -110,17 +111,18 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
+ <ModuleDefinitionFile>ext-jrj.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
- <PreprocessorDefinitions>_DEBUG;EXTJRJ_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_XWIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;EXTJRJ_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_XWIN;_XKEYCHECK_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\xframe;..\xframe\system;..\project;..\jarch</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>.;..;..\xframe;..\xframe\system;..\project;..\jarch;..\jarch.impl;../ext-jrj</AdditionalIncludeDirectories>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
@@ -130,6 +132,7 @@
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>xarch.shape.lib;xarch.base.lib;xarch.util.lib;xarch.network.lib;xarch.xframe.lib;xarch.xcontrol.lib;xoffice.xcell.lib;xoffice.xgrid.lib;xoffice.xreport.lib;xoffice.frame.lib;shlwapi.lib;xoffice.xflow.lib;comsuppw.lib;tsclib.lib;jarch.object.lib;%(AdditionalDependencies);$(CoreLibraryDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>D:\xclient64</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>ext-jrj.def</ModuleDefinitionFile>
</Link>
<PostBuildEvent>
<Command>copy $(OutDirFullPath)ext-jrj.dll D:\xclient64\ext\ext-jrj.dll</Command>
@@ -141,11 +144,11 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
- <PreprocessorDefinitions>NDEBUG;EXTJRJ_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_XWIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;EXTJRJ_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_XWIN;_XKEYCHECK_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\xframe;..\xframe\system;..\project;..\jarch</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\xframe;..\xframe\system;..\project;..\jarch;..\jarch.impl;.;..\ext-jrj;..</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -155,15 +158,29 @@
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>D:\xclient64r\sdk\lib</AdditionalLibraryDirectories>
<AdditionalDependencies>xarch.shape.lib;xarch.base.lib;xarch.util.lib;xarch.network.lib;xarch.xframe.lib;xarch.xcontrol.lib;xoffice.xcell.lib;xoffice.xgrid.lib;xoffice.xreport.lib;xoffice.frame.lib;shlwapi.lib;xoffice.xflow.lib;comsuppw.lib;tsclib.lib;jarch.object.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ <ModuleDefinitionFile>ext-jrj.def</ModuleDefinitionFile>
</Link>
<PostBuildEvent>
<Command>copy $(OutDirFullPath)ext-jrj.dll D:\xclient64r\ext\ext-jrj.dll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
- <ClInclude Include="..\jarch\factory\JObjectSvr.hpp" />
+ <ClInclude Include="..\jarch.impl\JStringImpl.hpp" />
+ <ClInclude Include="..\jarch\JByteStream.hpp" />
+ <ClInclude Include="..\jarch\JCharStream.hpp" />
+ <ClInclude Include="..\jarch\JConnect.hpp" />
+ <ClInclude Include="..\jarch\JDataSet.hpp" />
+ <ClInclude Include="..\jarch\JDataSource.hpp" />
+ <ClInclude Include="..\jarch\JDataStore.hpp" />
+ <ClInclude Include="..\jarch\JDouble.hpp" />
+ <ClInclude Include="..\jarch\JInt.hpp" />
<ClInclude Include="..\jarch\JObject.hpp" />
+ <ClInclude Include="..\jarch\JObjectSvr.hpp" />
+ <ClInclude Include="..\jarch\JSession.hpp" />
+ <ClInclude Include="..\jarch\JStream.hpp" />
<ClInclude Include="..\jarch\JString.hpp" />
+ <ClInclude Include="..\jarch\JWin.hpp" />
+ <ClInclude Include="..\jarch\JXPage.hpp" />
<ClInclude Include="..\project\business\SystemSettings\SysUser.hpp" />
<ClInclude Include="..\project\viewobject\custom.view.hpp" />
<ClInclude Include="..\project\viewobject\customer.view.hpp" />
@@ -249,9 +266,13 @@
<ClInclude Include="..\xframe\xcontrol\xshtml.hpp" />
<ClInclude Include="..\xframe\xcontrol\xtreeview.hpp" />
<ClInclude Include="framework.h" />
+ <ClInclude Include="JFactory.hpp" />
+ <ClInclude Include="JFactoryStringImpl.h" />
+ <ClInclude Include="JPtr.hpp" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="..\jarch.impl\JStringImpl.cpp" />
<ClCompile Include="..\project\analysis\DataVanalysisWin.cpp" />
<ClCompile Include="..\project\business\AP\APBank.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
@@ -469,7 +490,7 @@
<ClCompile Include="..\project\business\Customer\XmShare.Custumer.v3.cpp" />
<ClCompile Include="..\project\business\Enquiry.list.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\EnquiryEx3.list.cpp" />
<ClCompile Include="..\project\business\Enquiry\Enquiry.maint.cpp">
@@ -871,16 +892,16 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SO\delivery.base.maint.so.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SO\maint.Document.SO3.v3.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SO\paymentterm.base.maint.so.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SO\Product.FetchNo.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
@@ -1098,6 +1119,8 @@
<ClCompile Include="..\xframe\src\nstring.cpp" />
<ClCompile Include="..\xframe\src\xstring.cpp" />
<ClCompile Include="dllmain.cpp" />
+ <ClCompile Include="JFactoryStringImpl.cpp" />
+ <ClCompile Include="JPtr.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
@@ -1105,6 +1128,9 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <None Include="ext-jrj.def" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/jrj/jarch.impl/JStringImpl.cpp b/jrj/jarch.impl/JStringImpl.cpp
new file mode 100644
index 0000000..884165f
--- /dev/null
+++ b/jrj/jarch.impl/JStringImpl.cpp
@@ -0,0 +1,16 @@
+#include "pch.h"
+#include "JStringImpl.hpp"
+#include <stdio.h>
+JStringImpl::JStringImpl()
+{
+ printf("hit here");
+}
+JStringImpl::~JStringImpl()
+{
+
+}
+
+void JStringImpl::Release()
+{
+ if (this)delete this;
+}
diff --git a/jrj/jarch/JStringImpl.hpp b/jrj/jarch.impl/JStringImpl.hpp
similarity index 69%
rename from jrj/jarch/JStringImpl.hpp
rename to jrj/jarch.impl/JStringImpl.hpp
index 34a174c..baade6a 100644
--- a/jrj/jarch/JStringImpl.hpp
+++ b/jrj/jarch.impl/JStringImpl.hpp
@@ -4,6 +4,9 @@
public JString
{
public:
+ JStringImpl();
+ ~JStringImpl();
+public:
void Release();
};
diff --git a/jrj/jarch/factory/JObjectSvr.hpp b/jrj/jarch/JObjectSvr.hpp
similarity index 78%
rename from jrj/jarch/factory/JObjectSvr.hpp
rename to jrj/jarch/JObjectSvr.hpp
index 938140d..b1a9f19 100644
--- a/jrj/jarch/factory/JObjectSvr.hpp
+++ b/jrj/jarch/JObjectSvr.hpp
@@ -1,7 +1,5 @@
#pragma once
#include "jobject.hpp"
-#include <tchar.h>
-#include <wtypes.h>
#ifdef JARCHOBJECT_EXPORTS
#define JOBJECT_API __declspec(dllexport)
@@ -18,9 +16,9 @@
static JObjectSvr* get();
public:
template<class Ty>
- static Ty* CreateInstance(LPWSTR pStrObject)
+ static Ty* CreateInstance(LPCWSTR pStrObject)
{
- return (Ty*)get()->CreateInstance(nullptr,pStrObject);
+ return (Ty*)get()->CreateInstance(nullptr,(LPWSTR)pStrObject);
}
JObject* CreateInstance(LPWSTR pStrUri, LPWSTR pStrObject);
void RegisterObjectsByXmlFile(LPWSTR pStrFile);
diff --git a/jrj/jarch/JStringImpl.cpp b/jrj/jarch/JStringImpl.cpp
deleted file mode 100644
index a0af576..0000000
--- a/jrj/jarch/JStringImpl.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "pch.h"
-#include "JStringImpl.hpp"
-
-void JStringImpl::Release()
-{
- if (this)delete this;
-}
diff --git a/jrj/project/business/SO/delivery.base.maint.so.cpp b/jrj/project/business/SO/delivery.base.maint.so.cpp
index a464f22..8edfda2 100644
--- a/jrj/project/business/SO/delivery.base.maint.so.cpp
+++ b/jrj/project/business/SO/delivery.base.maint.so.cpp
@@ -1,4 +1,4 @@
-#include <wobject/xstring.hpp>
+锘�#include <wobject/xstring.hpp>
#include <xcontrol/xtreeview.hpp>
#include <xcontrol/xdwgrid.hpp>
#include <xcontrol/xcell.hpp>
@@ -12,8 +12,6 @@
{
public:
xdwtable dw_1;
-
- xvcontrol vc;
xcell dw_cell;
public:
@@ -27,7 +25,7 @@
xstring OnCreateTxt()
{
- //dw_1.AcceptText(); //不能加会报错
+ //dw_1.AcceptText(); //涓嶈兘鍔犱細鎶ラ敊
xstring sType;
xstring sDeliveryRule;
xstring sDeliveryDays;
@@ -73,8 +71,11 @@
int OnOk()
{
+ xml x;
dw_1.AcceptText();
-
+ dw_1.DwUpdateAllTo(x);
+ GetArg().SetArg(L"content", x.xml());
+ GetArg().SetArg(L"process",L"ok");
CloseWindow();
return 1;
@@ -88,7 +89,7 @@
if (colname == L"DeliveryRule")
{
- xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>";
+ xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='淇濇姢' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>";
xstring sUp = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>";
if (value == L"1" || value == L"2" || value == L"3")
@@ -110,7 +111,7 @@
}
- //生成交货期
+ //鐢熸垚浜よ揣鏈�
if (colname == L"DeliveryRule" || colname == L"DeliveryDays" || colname == L"ScheduleShipDate")
{
xstring sTxt = OnCreateTxt();
@@ -144,6 +145,7 @@
int OnInit()
{
+ /*
int iArgs = GetArg();
XXmlContentSvr xdoc = new XXmlContentSvr;
@@ -153,16 +155,14 @@
vbind bind = new vbind;
bind.bind(dw_1, vc);
-
+ */
xml x;
- x ;
-
- x.loadXML(vc.GetContent());
-
+ xstring xs = GetArg().GetArgString(L"content");
+ x.loadXML(xs.c_str());
dw_1.Retrieve(x);
xstring sDeliveryRule = dw_1.GetItemString(1, L"DeliveryRule");
- xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>";
+ xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='淇濇姢' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>";
if (sDeliveryRule != L"1" && sDeliveryRule != L"2" && sDeliveryRule != L"3")
dw_cell.SetCellProps(3, 3, sP);
if (sDeliveryRule != L"5")
diff --git a/jrj/project/business/SO/paymentterm.base.maint.so.cpp b/jrj/project/business/SO/paymentterm.base.maint.so.cpp
index dd42b0b..bbf2ade 100644
--- a/jrj/project/business/SO/paymentterm.base.maint.so.cpp
+++ b/jrj/project/business/SO/paymentterm.base.maint.so.cpp
@@ -1,4 +1,4 @@
-#include <wobject/xstring.hpp>
+锘�#include <wobject/xstring.hpp>
#include <xcontrol/xtreeview.hpp>
#include <xcontrol/xdwgrid.hpp>
#include <xcontrol/xcell.hpp>
@@ -16,8 +16,6 @@
xdwtable dw_p;
xcell dw_cell;
- vcontrol vc;
-
xstring sCryno;
public:
@@ -187,6 +185,11 @@
xstring sTxt = OnCreateTxt();
dw_1.SetItemString(1, L"PaymentTermEx", sTxt);
+ xml x;
+ dw_1.DwUpdateAllTo(x);
+ GetArg().SetArg(L"content", x.xml());
+ GetArg().SetArg(L"process", L"ok");
+
CloseWindow();
return 1;
@@ -347,8 +350,8 @@
int OnInit()
{
- xaserver Args = GetArg();
-
+ xaserverarg Args = GetArg();
+ /*
XXmlContentSvr xdoc = new XXmlContentSvr;
xdoc.setNativePointer(Args);
vc = new vcontrol;
@@ -356,13 +359,13 @@
vbind bind = new vbind;
bind.bind(dw_1, vc);
-
- xml x;
-
+ xml x;
x.loadXML(vc.GetContent());
-
+ */
//alert(x.GetXml());
-
+ xml x;
+ xstring xs = GetArg().GetArgString(L"content");
+ x.loadXML(xs.c_str());
dw_1.Retrieve(x);
//if (x.GetXmlDoc().documentElement.selectSingleNode(L"CurrencyCode"))
diff --git a/jrj/project/business/SO3.maint.cpp b/jrj/project/business/SO3.maint.cpp
index 5bb3ca6..5057518 100644
--- a/jrj/project/business/SO3.maint.cpp
+++ b/jrj/project/business/SO3.maint.cpp
@@ -9,6 +9,11 @@
#include "viewobject/saleorder.view.hpp"
#include "viewobject/quote.view.hpp"
+#include "jstring.hpp"
+#include "JFactory.hpp"
+#include "jobjectsvr.hpp"
+#include <memory>
+#include "JPtr.hpp"
class __declspec(dllexport) BaseMaintSOWin : public maint
{
xdwtable dw_props;
@@ -223,17 +228,34 @@
xstring colname = hdr->colname;
if (value == L"支付条款")
{
- //int p1 = vc.xdoc.getNativePointer();
- //openUrl(L"/sale/view/SaleOrder/xpage/payment", p1);
+ xaserverarg arg;
+ xml x;
+ dw_base.DwUpdateAllTo(x);
+ arg.SetArg(L"content", x.xml());
+ openUrl(L"/sale/view/SaleOrder/xpage/payment", (LPARAM)arg);
+ if (arg.GetArgString(L"process") == L"ok")
+ {
+ x.loadXML(arg.GetArgString(L"content"));
+ dw_base.Retrieve(x);
+ }
dw_base.AcceptText();
+ dw_base.Redraw();
return 1;
}
//交货期维护
if (value == L"交货期")
{
- //int p2 = vc.xdoc.getNativePointer();
- //openUrl(L"/sale/view/SaleOrder/xpage/delivery1", p2);
+ xaserverarg arg;
+ xml x;
+ dw_base.DwUpdateAllTo(x);
+ arg.SetArg(L"content", x.xml());
+ openUrl(L"/sale/view/SaleOrder/xpage/delivery1", (LPARAM)arg);
+ if (arg.GetArgString(L"process") == L"ok")
+ {
+ x.loadXML(arg.GetArgString(L"content"));
+ dw_base.Retrieve(x);
+ }
dw_base.AcceptText();
dw_base.Redraw();
return 1;
@@ -939,8 +961,14 @@
return 1;
}
+
int onload()
{
+ using JFString = JFactory<JString>;
+ JPtr<JFString> jfString(JObjectSvr::CreateInstance<JFString>(L"JFactoryString"));
+ //auto jfString = JObjectSvr::CreateInstance<JFString>(L"JFactoryString");
+ JPtr<JString> pStr(jfString->make());
+
dw_props = GetControl(L"dw_props");
/*KXMLDOMDocument x = SaleOrderView::GetMaintFormForBase();
dw_props.SetDataObject(x);
--
Gitblit v1.9.3