From ce8c2dcc959fab3ff4a3d103db8d7950d77eb614 Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期三, 17 七月 2024 19:21:56 +0800
Subject: [PATCH] update

---
 jrj/project/business/SystemSettings/AddUser.cpp |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/jrj/project/business/SystemSettings/AddUser.cpp b/jrj/project/business/SystemSettings/AddUser.cpp
index 4f10945..2e215c3 100644
--- a/jrj/project/business/SystemSettings/AddUser.cpp
+++ b/jrj/project/business/SystemSettings/AddUser.cpp
@@ -1,8 +1,3 @@
-use "win.vl"
-use "treeview.vm"
-use "dev:vm[xdwgrid.vm]"
-use "dev:vm[xdwtable.vm]"
-use "pref.vl"
 #include <wobject/xstring.hpp>
 #include <xcontrol/xtreeview.hpp>
 #include <xcontrol/xdwgrid.hpp>
@@ -11,7 +6,8 @@
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
-//use "dev:xpage[SysUser.vx]"
+
+#include "SysUser.hpp"
 
 using xml = KXMLDOMDocument;
 class __declspec(dllexport) AddUser : public xwin
@@ -51,8 +47,7 @@
 	int AppendItem(xml x, KXMLDOMElement r, xstring item) {
 		var e = x.createElement(item);
 		//xcontrol xc = GetControl(item);
-		control xc = new control;
-		xc.setNativePointer(GetControl(item));
+		xcontrol xc = GetControl(item);
 		e.text() = xc.GetText();
 		r.appendChild(e);
 		return 1;
@@ -60,14 +55,14 @@
 
 	int OnSave()
 	{
-		control xc = new control;
+		xcontrol xc = GetControl(L"UserName");
 		/*xc=GetControl(L"EmployeeNo");
 		if (xc.GetText()==L"")
 		{
 			alert(L"用户代码不能为空!");
 			return 0;
 		}*/
-		xc = GetControl(L"UserName");
+		
 		if (xc.GetText() == L"")
 		{
 			alert(L"用户名称不能为空!");
@@ -138,8 +133,7 @@
 
 	int ClearItem(xstring item)
 	{
-		control xc = new control;
-		xc.setNativePointer(GetControl(item));
+		xcontrol xc =GetControl(item);
 		xc.SetText(L"");
 		return 1;
 	}
@@ -191,8 +185,7 @@
 	}
 
 	int SetItem(xstring value, xstring item) {
-		control xc = new control;
-		xc.setNativePointer(GetControl(item));
+		xcontrol xc = GetControl(item);
 		xc.SetText(value);
 		return 1;
 	}

--
Gitblit v1.9.3