From 9b43e4edb9c5ebc065d6af4810ae66690fdc50df Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期二, 15 四月 2025 16:55:43 +0800
Subject: [PATCH] update

---
 jrj/project/business/BasicCode/ShipcompanyMaint.cpp |   41 ++++++++++++++++++++++++-----------------
 1 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/jrj/project/business/BasicCode/ShipcompanyMaint.cpp b/jrj/project/business/BasicCode/ShipcompanyMaint.cpp
index 5d399ae..3147264 100644
--- a/jrj/project/business/BasicCode/ShipcompanyMaint.cpp
+++ b/jrj/project/business/BasicCode/ShipcompanyMaint.cpp
@@ -3,12 +3,14 @@
 #include <xcontrol/xdwgrid.hpp>
 #include <wobject/xdouble.hpp>
 #include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xcell.hpp>
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
 
 using xml = KXMLDOMDocument;
-class __declspec(dllexport) ShipcompanyMaint : public xframe
+class __declspec(dllexport) ShipcompanyMaint : public maint
 {
 public:
 	KXMLDOMDocument m_configDoc;
@@ -16,21 +18,17 @@
 	xstring m_username;
 	xstring ContactID;
 	xdwtable dw_base;
+	xstring m_EntityID = L"";
 	xcell dw_cell;
 public:
-	ShipcompanyMaint(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+	ShipcompanyMaint(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
 public:
 	static ShipcompanyMaint* CreateInstance(void* implPtr, void* hWnd)
 	{
 		ShipcompanyMaint* pWin = new ShipcompanyMaint(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int alert(xstring str)
-	{
-		//win::MessageBox(GetHWND(),str,L"提示22:",0);
-		TApp::alert(this, str);
-		return 0;
-	}
+
 	int setCellReadOnly()
 	{
 		dw_base = new xdwtable;
@@ -46,15 +44,17 @@
 		SetAgent(L"maint");
 		return 1;
 	}
-	xstring GetGuid() {
-		return TApp::GetGuid();
+	xstring GetGuid() 
+	{
+		return publiccode::GetGuid();
 	}
 	int OnClear() {
 		if (m_EntityID == L"") {
-			m_userid = TApp::GetUserInfo().id;
-			m_username = TApp::GetUserInfo().name;
-			dw_base = new xdwtable;
-			dw_base.setNativePointer(GetControl(L"dw_base"));
+			m_userid = publiccode::GetUser().personid;
+			m_username = publiccode::GetUser().name;
+			/*dw_base = new xdwtable;
+				dw_base.setNativePointer(GetControl(L"dw_base"));*/
+			dw_base = GetControl(L"dw_base");
 			dw_base.SetItemString(1, L"PartyID", GetGuid());
 			dw_base.SetItemString(1, L"PStatus", L"1");
 			dw_base.SetItemDisplayString(1, L"PStatus", L"有效");
@@ -66,7 +66,8 @@
 			dw_base.SetItemString(1, L"PrimaryFlag", L"Y");
 			dw_base.SetItemString(1, L"EnterName", m_userid);
 			dw_base.SetItemDisplayString(1, L"EnterName", m_username);
-			dw_base.SetItemString(1, L"CreateDate", TApp::GetCurDate());
+			dw_base.SetItemString(1, L"CreateDate", publiccode::GetCurrentDate());
+			return 0;
 		}
 		else
 		{
@@ -307,13 +308,19 @@
 
 	int onload()
 	{
-
+		SetArg();
 		OnAttachEvent();
 		//if(!m_configDoc) return -1;
 
 		maint::onload();
 
 		OnClear();
-
+		return 1;
 	}
+
+	int onloaded()
+	{
+		return maint::onloaded();
+	}
+
 };
\ No newline at end of file

--
Gitblit v1.9.3