From 3ae6fded83ac8ef5cec50b402ec046268329027f Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期三, 17 七月 2024 20:56:30 +0800 Subject: [PATCH] update code --- jrj/xframe/kobject/kdwgrid.hpp | 2 +- jrj/project/business/BasicCode/CartermList.cpp | 6 ++++++ jrj/project/business/BasicCode/ExpressList.cpp | 8 ++++---- jrj/project/business/BasicCode/ExpressMaint.cpp | 1 + jrj/project/business/BasicCode/CustomerMarketMaint.cpp | 19 ++++++++----------- jrj/xframe/xcontrol/xdwgrid.hpp | 1 + jrj/ext-jrj/ext-jrj.vcxproj | 8 ++++---- jrj/project/business/BasicCode/CustomerMarketList.cpp | 8 ++++---- 8 files changed, 29 insertions(+), 24 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj index 8541279..877b05c 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj +++ b/jrj/ext-jrj/ext-jrj.vcxproj @@ -306,22 +306,22 @@ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\BasicCode\CartermList.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\BasicCode\ColorCardNew.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\BasicCode\CustomerMarketList.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\BasicCode\CustomerMarketMaint.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\BasicCode\ExchangeRate.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\BasicCode\ExpressList.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\BasicCode\ExpressMaint.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> diff --git a/jrj/project/business/BasicCode/CartermList.cpp b/jrj/project/business/BasicCode/CartermList.cpp index bea3f5c..f32a093 100644 --- a/jrj/project/business/BasicCode/CartermList.cpp +++ b/jrj/project/business/BasicCode/CartermList.cpp @@ -6,6 +6,7 @@ #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" #include "viewobject/view.base.hpp" +#include "adt/xarray.hpp" using xml = KXMLDOMDocument; class __declspec(dllexport) CartermList : public listwin @@ -42,6 +43,7 @@ dw_list.SetItemString(rows, L"PStatus", L"1"); dw_list.SetItemString(rows, L"PCStatus", L"1"); dw_list.SetItemString(rows, L"Type", L"7"); + return 1; } int OnInsertRow() { @@ -54,6 +56,7 @@ dw_list.SetItemString(row, L"PStatus", L"1"); dw_list.SetItemString(row, L"PCStatus", L"1"); dw_list.SetItemString(row, L"Type", L"7"); + return 1; } int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg arg) @@ -71,12 +74,15 @@ int OnDeleteRow() { int rows = dw_list.GetRowCount(); + int row2 = dw_list.GetPrevSelectRow(rows); while (row2 > 0) { dw_list.DeleteRow(row2); row2 = dw_list.GetPrevSelectRow(row2 - 1); } + dw_list.SelectRow(0, false); + return 1; } int OnSave() diff --git a/jrj/project/business/BasicCode/CustomerMarketList.cpp b/jrj/project/business/BasicCode/CustomerMarketList.cpp index cf794b4..37d391c 100644 --- a/jrj/project/business/BasicCode/CustomerMarketList.cpp +++ b/jrj/project/business/BasicCode/CustomerMarketList.cpp @@ -8,12 +8,12 @@ #include "viewobject/view.base.hpp" using xml = KXMLDOMDocument; -class __declspec(dllexport) CustomerMarketList : public xwin +class __declspec(dllexport) CustomerMarketList : public listwin { public: xdwgrid dw_list; public: - CustomerMarketList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} + CustomerMarketList(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {} public: static CustomerMarketList* CreateInstance(void* implPtr, void* hWnd) { @@ -21,7 +21,7 @@ return pWin; } - int ViewUpdate(param pr, xstring updateItem, xaserverarg arg) + int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg arg) { if (updateItem == L"del") { int DelRow = dw_list.GetRow(); @@ -31,7 +31,7 @@ } int onload() { - list::onload(); + listwin::onload(); return -1; } diff --git a/jrj/project/business/BasicCode/CustomerMarketMaint.cpp b/jrj/project/business/BasicCode/CustomerMarketMaint.cpp index c220d4d..852cbc7 100644 --- a/jrj/project/business/BasicCode/CustomerMarketMaint.cpp +++ b/jrj/project/business/BasicCode/CustomerMarketMaint.cpp @@ -5,10 +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) CustomerMarketMaint : public xframe +class __declspec(dllexport) CustomerMarketMaint : public maint { public: KXMLDOMDocument m_configDoc; @@ -19,20 +21,15 @@ xcell dw_cell; xstring m_EntityID = L""; public: - CustomerMarketMaint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} + CustomerMarketMaint(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {} public: static CustomerMarketMaint* CreateInstance(void* implPtr, void* hWnd) { CustomerMarketMaint* pWin = new CustomerMarketMaint(implPtr, (HWND)hWnd); return pWin; } - int alert(xstring str) - { - //win::MessageBox(GetHWND(),str,L"提示22:",0); - TApp::alert(this, str); - return 0; - } - int ViewUpdate(param pr, xstring updateItem, xaserverarg arg) + + int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg arg) { if (updateItem == L"update") { @@ -41,7 +38,7 @@ return 1; } } - xstring GetEntityData(param pr) + xstring GetEntityData(LPARAM pr) { xml x; @@ -72,7 +69,7 @@ if (xaserver::ExecXQuery(L"", L"[OrgInfo.xq]", arg.GetString(), x) != 1) { trace(x.xml()); - return nil; + return 0; } //alert(x.xml()); KXMLDOMElement e = x.documentElement(); diff --git a/jrj/project/business/BasicCode/ExpressList.cpp b/jrj/project/business/BasicCode/ExpressList.cpp index 7f16177..f525706 100644 --- a/jrj/project/business/BasicCode/ExpressList.cpp +++ b/jrj/project/business/BasicCode/ExpressList.cpp @@ -8,12 +8,12 @@ #include "viewobject/view.base.hpp" using xml = KXMLDOMDocument; -class __declspec(dllexport) ExpressList : public xwin +class __declspec(dllexport) ExpressList : public listwin { public: xdwgrid dw_list; public: - ExpressList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} + ExpressList(void* implPtr, HWND hWnd) : listwin(implPtr, hWnd) {} public: static ExpressList* CreateInstance(void* implPtr, void* hWnd) { @@ -22,11 +22,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/ExpressMaint.cpp b/jrj/project/business/BasicCode/ExpressMaint.cpp index 440ba75..ade086e 100644 --- a/jrj/project/business/BasicCode/ExpressMaint.cpp +++ b/jrj/project/business/BasicCode/ExpressMaint.cpp @@ -6,6 +6,7 @@ #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" #include "viewobject/view.base.hpp" +#include "xcontrol/xcell.hpp" using xml = KXMLDOMDocument; class __declspec(dllexport) ExpressMaint : public xframe diff --git a/jrj/xframe/kobject/kdwgrid.hpp b/jrj/xframe/kobject/kdwgrid.hpp index 702d8cc..e983c66 100644 --- a/jrj/xframe/kobject/kdwgrid.hpp +++ b/jrj/xframe/kobject/kdwgrid.hpp @@ -55,6 +55,7 @@ int SelectRow_(int nRow, bool bSelect = true) ;//选中单行 int SelectRow_(int sRow, int eRow, bool bSelect = true) ;//选中多行 int GetNextSelectRow_(int nStartRow) ; //得到下拉修改行 + int GetPrevSelectRow(int nStartRow); bool IsRowSelected_(int nRow) ; //判断行是否被选种 int SetSelectBkColor_(COLORREF color) ; //设置选择的背景颜色 int SetSelectionMode_(int nMode) ; //设置选择的模式//0 unselection 1 singleSelection 2 multiselection 3 multiselectionex @@ -240,7 +241,6 @@ void AddRepeats(wchar_t* colName); public: void ShowEditor(); - }; }} }} diff --git a/jrj/xframe/xcontrol/xdwgrid.hpp b/jrj/xframe/xcontrol/xdwgrid.hpp index e32e3a1..3191a40 100644 --- a/jrj/xframe/xcontrol/xdwgrid.hpp +++ b/jrj/xframe/xcontrol/xdwgrid.hpp @@ -71,6 +71,7 @@ int SelectRow(int nRow, bool bSelect = true) { return getKReport()->SelectRow_(nRow, bSelect); } int SelectRow(int sRow, int eRow, bool bSelect = true) { return getKReport()->SelectRow_(sRow, eRow, bSelect); } int GetNextSelectRow(int nStartRow) { return getKReport()->GetNextSelectRow_(nStartRow); } + int GetPrevSelectRow(int nStartRow) { return getKReport()->GetPrevSelectRow(nStartRow); } bool IsRowSelected(int nRow) { return getKReport()->IsRowSelected_(nRow); } //int SetSelectBkColor(COLORREF color){return getKReport()->SetSelectBkColor_(color);} int SetSelectionMode(int nMode) { return getKReport()->SetSelectionMode_(nMode); } //0 unselection 1 singleSelection 2 multiselection 3 multiselectionex -- Gitblit v1.9.3