From 9b3b2eb20b09e13da837a28f16e552ba70a090c4 Mon Sep 17 00:00:00 2001 From: LiFan <2308045698@qq.com> Date: 星期四, 24 四月 2025 14:48:21 +0800 Subject: [PATCH] update --- jrj/project/business/BasicCode/CartermList.cpp | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/jrj/project/business/BasicCode/CartermList.cpp b/jrj/project/business/BasicCode/CartermList.cpp index dc1585c..c59a607 100644 --- a/jrj/project/business/BasicCode/CartermList.cpp +++ b/jrj/project/business/BasicCode/CartermList.cpp @@ -6,35 +6,31 @@ #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" #include "viewobject/view.base.hpp" +#include "adt/xarray.hpp" using xml = KXMLDOMDocument; -class __declspec(dllexport) CartermList : public xwin +class __declspec(dllexport) CartermList : public listwin { public: - xdwgrid dw_list; - xdwpages dw_pages; - xstring m_QueryTxt; - KXMLDOMDocument m_configDoc; - static int dw_hWnd; + //xdwgrid dw_list; + //xdwpages dw_pages; + //xstring m_QueryTxt; + //KXMLDOMDocument m_configDoc; + //static int dw_hWnd; public: - CartermList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} + CartermList(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {} public: static CartermList* CreateInstance(void* implPtr, void* hWnd) { CartermList* pWin = new CartermList(implPtr, (HWND)hWnd); return pWin; } - int alert(xstring str) - { - //win::MessageBox(GetHWND(),str,L"提示22:",0); - TApp::alert(this, str); - return 0; - } + xstring GetGuid() { - return TApp::GetGuid(); + return publiccode::GetGuid(); } int OnAddrow() { @@ -47,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() { @@ -59,9 +56,10 @@ 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(param pr, xstring updateItem, xaserverarg arg) + int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg arg) { if (updateItem == L"del") { @@ -76,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() @@ -161,8 +162,9 @@ int onload() { + SetAgent(); OnAttachEvent(); - list::onload(); + listwin::onload(); dw_list.SetReadOnly(false); return -1; } -- Gitblit v1.9.3