|  |  | 
 |  |  | 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> | 
 |  |  | 
 |  |  |  | 
 |  |  | #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 | 
 |  |  | 
 |  |  |       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"用户名称不能为空!"); | 
 |  |  | 
 |  |  |       xaserverarg arg; | 
 |  |  |  | 
 |  |  |       x.loadXML(L"<SysUser/>"); | 
 |  |  |       var r = x.documentElement(); | 
 |  |  |       auto r = x.documentElement(); | 
 |  |  |       xstring guid; | 
 |  |  |       xstring guid1; | 
 |  |  |       if (p.note == L"修改") | 
 |  |  | 
 |  |  |  | 
 |  |  |    int ClearItem(xstring item) | 
 |  |  |    { | 
 |  |  |       control xc = new control; | 
 |  |  |       xc.setNativePointer(GetControl(item)); | 
 |  |  |       xcontrol xc =GetControl(item); | 
 |  |  |       xc.SetText(L""); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int SetItem(xstring value, xstring item) { | 
 |  |  |       control xc = new control; | 
 |  |  |       xc.setNativePointer(GetControl(item)); | 
 |  |  |       xcontrol xc = GetControl(item); | 
 |  |  |       xc.SetText(value); | 
 |  |  |       return 1; | 
 |  |  |    } |