From a4d2315ee4ca3f6177b4fb2526bed2feff3d89be Mon Sep 17 00:00:00 2001
From: lifan <2308045698@qq.com>
Date: 星期三, 22 十月 2025 16:52:58 +0800
Subject: [PATCH] update
---
jrj/project/business/BasicCode/FCL.cpp | 33 ++++++++++++---------------------
1 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/jrj/project/business/BasicCode/FCL.cpp b/jrj/project/business/BasicCode/FCL.cpp
index c612560..a1ae4e1 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)
{
@@ -55,8 +55,7 @@
{
xaserverarg arg;
- xdwpages zz = new xdwpages;
- zz.setNativePointer(GetControl(L"pages"));
+ xdwpages zz = GetControl(L"pages");
xml x;
getUrl(L"/sale/data/FCL/entity/list", arg.GetString(), x);
@@ -85,11 +84,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 +100,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 +242,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 +261,7 @@
SetPriceBaseEmpty();
return 1;
}
+
int OnDeleteRow()
{
int row = dw_list.GetRow();
@@ -280,6 +272,7 @@
}
return 1;
}
+
int OnCmdDispatch(xstring comdid)
{
if (comdid.find(L"add", 0) >= 0)
@@ -327,11 +320,9 @@
}
int OnInit()
{
- dw_list = new xdwgrid;
- dw_list.setNativePointer(GetControl(L"dw_list"));
+ dw_list = GetControl(L"dw_list");
dw_list.openUrl(L"/sale/view/FCL/template/FCL/List");
- dw_base = new xdwtable;
- dw_base.setNativePointer(GetControl(L"dw_base"));
+ dw_base = GetControl(L"dw_base");
dw_base.openUrl(L"/sale/view/FCL/template/FCL/pricebase");
dw_list.SetReadOnlyColumn(L"shipthread", true);
dw_list.SetReadOnlyColumn(L"price20", true);
--
Gitblit v1.9.3