From de2c61bf0cfef796542a360c2e1ee10a9da64f06 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 18 七月 2024 13:16:26 +0800
Subject: [PATCH] xx

---
 jrj/project/business/BasicCode/FCL.cpp |   28 +++++++++++-----------------
 1 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/jrj/project/business/BasicCode/FCL.cpp b/jrj/project/business/BasicCode/FCL.cpp
index 8116240..afa9bc1 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)
 	{
@@ -85,11 +85,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 +101,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,21 +243,13 @@
 
 		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);
-		dw_list.SetItemString(row, L"modifieddate", TApp::GetCurDate());
+		dw_list.SetItemString(row, L"modifieddate", publiccode::GetCurrentDate());
 		SetPriceBaseEmpty();
 		return 1;
 	}
@@ -266,10 +258,11 @@
 		int row = dw_list.GetRow();
 		if (row < 1) return 0;
 		int newrow = dw_list.InsertRow(row);
-		dw_list.SetItemString(newrow, L"modifieddate", TApp::GetCurDate());
+		dw_list.SetItemString(newrow, L"modifieddate", publiccode::GetCurrentDate());
 		SetPriceBaseEmpty();
 		return 1;
 	}
+
 	int OnDeleteRow()
 	{
 		int row = dw_list.GetRow();
@@ -280,6 +273,7 @@
 		}
 		return 1;
 	}
+
 	int OnCmdDispatch(xstring comdid)
 	{
 		if (comdid.find(L"add", 0) >= 0)

--
Gitblit v1.9.3