From e83354f83321f0037c641ad09f310277cdc80295 Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期五, 12 七月 2024 08:01:26 +0800 Subject: [PATCH] update data total --- jrj/project/total3/FactoryPayment.cpp | 2 + jrj/project/total3/viewex.total.cpp | 21 +++++----- jrj/project/total3/viewex.total2.cpp | 2 jrj/project/total3/ViewTotalWin.cpp | 22 +++++----- jrj/project/total3/GDNItem.GDN.cpp | 2 + jrj/project/analysis/DataVanalysisWin.cpp | 10 ++-- jrj/project/total3/viewex.total1.cpp | 3 + jrj/ext-jrj/ext-jrj.vcxproj | 8 +++- jrj/project/total3/ProductNoOut.SO.cpp | 4 ++ jrj/xframe/xcontrol/xcombobox.hpp | 4 +- 10 files changed, 45 insertions(+), 33 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj index 2d39947..252fb63 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj +++ b/jrj/ext-jrj/ext-jrj.vcxproj @@ -681,13 +681,17 @@ <ClCompile Include="..\project\start.vframe.vbusiness.cpp" /> <ClCompile Include="..\project\total3\FactoryPayment.cpp" /> <ClCompile Include="..\project\total3\GDNItem.GDN.cpp" /> - <ClCompile Include="..\project\total3\ProductNewList.cpp" /> + <ClCompile Include="..\project\total3\ProductNewList.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\project\total3\ProductNoOut.SO.cpp" /> <ClCompile Include="..\project\total3\viewex.total.cpp" /> <ClCompile Include="..\project\total3\viewex.total1.cpp" /> <ClCompile Include="..\project\total3\viewex.total2.cpp" /> <ClCompile Include="..\project\total3\ViewTotalArgWin.cpp" /> - <ClCompile Include="..\project\total3\ViewExTotalWin.cpp" /> + <ClCompile Include="..\project\total3\ViewTotalWin.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\project\tradedocument\DocFileSaveDlg.cpp" /> <ClCompile Include="..\project\tradedocument\DocSelectDlg.cpp" /> <ClCompile Include="..\project\tradedocument\HelpDocWin.cpp" /> diff --git a/jrj/project/analysis/DataVanalysisWin.cpp b/jrj/project/analysis/DataVanalysisWin.cpp index a8ab246..df20830 100644 --- a/jrj/project/analysis/DataVanalysisWin.cpp +++ b/jrj/project/analysis/DataVanalysisWin.cpp @@ -11,14 +11,14 @@ class __declspec(dllexport) DataVanalysisWin : public xwin { public: - DataVanalysisWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} + DataVanalysisWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd),dw_data(0){} static DataVanalysisWin* CreateInstance(void* implPtr, void* hWnd) { return new DataVanalysisWin(implPtr, (HWND)hWnd); } public: xhtml ole_html; - xdwgrid dw_data; + xdwgrid* dw_data; xnode m_agentNode; //Agent Condition xstring htmlStr; xexcel excel; @@ -58,7 +58,7 @@ HCURSOR hCursor = xutil::SetCursorWait(); if (comdid == L"xmConfig") { - xstring str = dw_data.DataAnalysis(L""); + xstring str = dw_data->DataAnalysis(L""); if (str != L"") { ole_html.LoadHtml(str); @@ -117,7 +117,7 @@ int onload() { htmlStr = L""; - ole_html = GetControl(L"ole_html"); + ole_html = GetControl(L"ole_1"); if (!GetWinParam()) return 1; SetArg(); xaserverarg arg = GetArg(); @@ -127,7 +127,7 @@ htmlStr = str; ole_html.LoadHtml(str); } - dw_data = *(xdwgrid*)arg.GetParam(L"obj"); + dw_data = (xdwgrid*)arg.GetParam(L"obj"); OnAttachEvent(); diff --git a/jrj/project/total3/FactoryPayment.cpp b/jrj/project/total3/FactoryPayment.cpp index 1272168..280ed04 100644 --- a/jrj/project/total3/FactoryPayment.cpp +++ b/jrj/project/total3/FactoryPayment.cpp @@ -135,6 +135,8 @@ AttachEvent(L"WM_SETFOCUS", (FEvent)&FactoryPayment::OnSetFocus); AttachEvent(L"cb_report", L"CBN_SELCHANGE", (FEvent)&FactoryPayment::OnCombboChanged); AttachEvent(L"dw_report", L"DWV_CLICKED", (FEvent)&FactoryPayment::OnDWClick); + + return 1; } int OnRetrieve(xstring dataurl, xstring argstr) diff --git a/jrj/project/total3/GDNItem.GDN.cpp b/jrj/project/total3/GDNItem.GDN.cpp index f2730a1..6f6aeb2 100644 --- a/jrj/project/total3/GDNItem.GDN.cpp +++ b/jrj/project/total3/GDNItem.GDN.cpp @@ -136,6 +136,8 @@ AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewGDNItemTotalWin::OnSetFocus); AttachEvent(L"cb_report", L"CBN_SELCHANGE", (FEvent)&ViewGDNItemTotalWin::OnCombboChanged); AttachEvent(L"dw_report", L"DWV_CLICKED", (FEvent)&ViewGDNItemTotalWin::OnDWClick); + + return 1; } int OnRetrieve(xstring dataurl, xstring argstr) diff --git a/jrj/project/total3/ProductNoOut.SO.cpp b/jrj/project/total3/ProductNoOut.SO.cpp index 9f3243b..370b95f 100644 --- a/jrj/project/total3/ProductNoOut.SO.cpp +++ b/jrj/project/total3/ProductNoOut.SO.cpp @@ -92,6 +92,10 @@ } + int SwitchReport(KXMLDOMElement ele) + { + return 1; + } int OnCombboChanged(TEvent* evt, int lParam) { diff --git a/jrj/project/total3/ViewExTotalWin.cpp b/jrj/project/total3/ViewTotalWin.cpp similarity index 94% rename from jrj/project/total3/ViewExTotalWin.cpp rename to jrj/project/total3/ViewTotalWin.cpp index b2c2f14..b5613e5 100644 --- a/jrj/project/total3/ViewExTotalWin.cpp +++ b/jrj/project/total3/ViewTotalWin.cpp @@ -11,14 +11,14 @@ using xml = KXMLDOMDocument; -class __declspec(dllexport) ViewExTotalWin : public xwin +class __declspec(dllexport) ViewTotalWin : public xwin { public: - ViewExTotalWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} + ViewTotalWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} public: - static ViewExTotalWin* CreateInstance(void* implPtr, void* hWnd) + static ViewTotalWin* CreateInstance(void* implPtr, void* hWnd) { - return new ViewExTotalWin(implPtr, (HWND)hWnd); + return new ViewTotalWin(implPtr, (HWND)hWnd); } public: xdwgrid dw_list; @@ -385,13 +385,13 @@ int OnAttachEvent() { //绑定工具条点击事件 - AttachEvent(L"WM_XCOMMAND", (FEvent)&ViewExTotalWin::OnXCommand); + AttachEvent(L"WM_XCOMMAND", (FEvent)&ViewTotalWin::OnXCommand); //获取焦点事件,用于重置工具条 - AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewExTotalWin::OnSetFocus); - AttachEvent(L"cb_report", L"CBN_SELCHANGE", (FEvent)&ViewExTotalWin::OnCombboChanged); - AttachEvent(L"dw_report", L"DWV_CLICKED", (FEvent)&ViewExTotalWin::OnDWClick); - AttachEvent(L"dw_report", L"DWV_ROWFOCUSCHANGED", (FEvent)&ViewExTotalWin::OnRowChanged);//绑定行更改触发事件OnRowChanged - AttachEvent(L"dw_report", xstring(0x400 + 81), (FEvent)&ViewExTotalWin::OnRetrieveFinished); + AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewTotalWin::OnSetFocus); + AttachEvent(L"cb_report", L"CBN_SELCHANGE", (FEvent)&ViewTotalWin::OnCombboChanged); + AttachEvent(L"dw_report", L"DWV_CLICKED", (FEvent)&ViewTotalWin::OnDWClick); + AttachEvent(L"dw_report", L"DWV_ROWFOCUSCHANGED", (FEvent)&ViewTotalWin::OnRowChanged);//绑定行更改触发事件OnRowChanged + AttachEvent(L"dw_report", xstring(0x400 + 81), (FEvent)&ViewTotalWin::OnRetrieveFinished); return 1; } @@ -400,7 +400,7 @@ { if (!rptEle) return 0; if (dataretrieveing) return -1; - //dw_list.Reset(); + dw_list.Reset(); xml x ; xaserverarg arg ; diff --git a/jrj/project/total3/viewex.total.cpp b/jrj/project/total3/viewex.total.cpp index 57e3bd0..7fddd3b 100644 --- a/jrj/project/total3/viewex.total.cpp +++ b/jrj/project/total3/viewex.total.cpp @@ -10,15 +10,14 @@ using xml = KXMLDOMDocument; - class ViewEx111TotalWin : public xwin + class __declspec(dllexport) ViewExTotalWin : public xwin { public: - ViewEx111TotalWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} + ViewExTotalWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} public: - static ViewEx111TotalWin* CreateInstance(void* implPtr, void* hWnd) + static ViewExTotalWin* CreateInstance(void* implPtr, void* hWnd) { - ViewEx111TotalWin* pWin = new ViewEx111TotalWin(implPtr, (HWND)hWnd); - return pWin; + return new ViewExTotalWin(implPtr, (HWND)hWnd); } public: xdwgrid dw_list; @@ -77,7 +76,7 @@ xaserverarg arg ; arg.AddArg(L"html", str); - + arg.SetParam(L"obj", (LPARAM)&dw_list); OpenWindow(L"dev:xpage[data.vanalysis.vx]", arg); xutil::RestoreCursor(hCursor); return 1; @@ -270,11 +269,11 @@ int OnAttachEvent() { //绑定工具条点击事件 - AttachEvent(L"WM_XCOMMAND", (FEvent)&ViewEx111TotalWin::OnXCommand); + AttachEvent(L"WM_XCOMMAND", (FEvent)&ViewExTotalWin::OnXCommand); //获取焦点事件,用于重置工具条 - AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewEx111TotalWin::OnSetFocus); - AttachEvent(L"cb_report", L"CBN_SELCHANGE", (FEvent)&ViewEx111TotalWin::OnCombboChanged); - AttachEvent(L"dw_report", L"DWV_CLICKED", (FEvent)&ViewEx111TotalWin::OnDWClick); + AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewExTotalWin::OnSetFocus); + AttachEvent(L"cb_report", L"CBN_SELCHANGE", (FEvent)&ViewExTotalWin::OnCombboChanged); + AttachEvent(L"dw_report", L"DWV_CLICKED", (FEvent)&ViewExTotalWin::OnDWClick); return 1; } @@ -365,7 +364,7 @@ { KXMLDOMElement rpt = nlist.item(i); xstring name = rpt.getAttribute(L"name"); - + xc.AddItem(name, rpt); if (i == 0) xc.SetText(name); if (i == 0) rptEle = rpt; } diff --git a/jrj/project/total3/viewex.total1.cpp b/jrj/project/total3/viewex.total1.cpp index 1370195..6a85e9e 100644 --- a/jrj/project/total3/viewex.total1.cpp +++ b/jrj/project/total3/viewex.total1.cpp @@ -78,7 +78,7 @@ xaserverarg arg ; arg.AddArg(L"html", str); - + arg.SetParam(L"obj", (LPARAM)&dw_list); OpenWindow(L"dev:xpage[data.vanalysis.vx]", arg ); xutil::RestoreCursor(hCursor); return 1; @@ -346,6 +346,7 @@ { KXMLDOMElement rpt = nlist.item(i); xstring name = rpt.getAttribute(L"name"); + xc.AddItem(name, rpt); if (i == 0) xc.SetText(name); if (i == 0) rptEle = rpt; } diff --git a/jrj/project/total3/viewex.total2.cpp b/jrj/project/total3/viewex.total2.cpp index 8285b34..c4986d4 100644 --- a/jrj/project/total3/viewex.total2.cpp +++ b/jrj/project/total3/viewex.total2.cpp @@ -78,7 +78,7 @@ xaserverarg arg ; arg.AddArg(L"html", str); - + arg.SetParam(L"obj", (LPARAM)&dw_list); OpenWindow(L"dev:xpage[data.vanalysis.vx]", arg); xutil::RestoreCursor(hCursor); return 1; diff --git a/jrj/xframe/xcontrol/xcombobox.hpp b/jrj/xframe/xcontrol/xcombobox.hpp index ca9a725..d7e5447 100644 --- a/jrj/xframe/xcontrol/xcombobox.hpp +++ b/jrj/xframe/xcontrol/xcombobox.hpp @@ -133,7 +133,7 @@ int AddItem(string str, KXMLDOMElement ele) { - AddItem(str, ele.ptr()); + return AddItem(str, ele.ptr()); } int AddItem(string str, LPARAM p) { @@ -271,7 +271,7 @@ return SendMessage(hWnd, CB_GETITEMDATA_, nIndex, 0); } - static int AddItem(HWND hWnd,string str, int p) + static int AddItem(HWND hWnd,string str, LPARAM p) { int CB_ADDSTRING_ = 0x0143; int h = SendMessage(hWnd, CB_ADDSTRING_, 0, (LPARAM)str); -- Gitblit v1.9.3