From 6c8c9ddaeb2bc6245a374c9354296bcfc2d96c06 Mon Sep 17 00:00:00 2001 From: LiFan <2308045698@qq.com> Date: 星期二, 29 四月 2025 14:10:22 +0800 Subject: [PATCH] update --- jrj/project/business/SystemSettings/AddUser.cpp | 27 ++++++++++----------------- 1 files changed, 10 insertions(+), 17 deletions(-) diff --git a/jrj/project/business/SystemSettings/AddUser.cpp b/jrj/project/business/SystemSettings/AddUser.cpp index 4f10945..ad1f6aa 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 @@ -49,25 +45,24 @@ return 1; } int AppendItem(xml x, KXMLDOMElement r, xstring item) { - var e = x.createElement(item); + auto e = x.createElement(item); //xcontrol xc = GetControl(item); - control xc = new control; - xc.setNativePointer(GetControl(item)); - e.text() = xc.GetText(); + xcontrol xc = GetControl(item); + e.settext(xc.GetText()); r.appendChild(e); return 1; } 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"用户名称不能为空!"); @@ -78,7 +73,7 @@ xaserverarg arg; x.loadXML(L"<SysUser/>"); - var r = x.documentElement(); + auto r = x.documentElement(); xstring guid; xstring guid1; if (p.note == 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