From 82f66d1ff1afcacc2d9331ce3662c3667e044976 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期五, 06 九月 2024 18:47:10 +0800
Subject: [PATCH] update
---
jrj/project/business/PO/Maint.PaperCard.PO.hpp | 0
jrj/project/business/SystemSettings/SysUser.hpp | 8 +-
jrj/project/business/SystemSettings/Buglist.Developer.hxsoft.cpp | 31 +++++----
jrj/xframe/vbusiness/vframe/listex.vframe.vbusiness.hpp | 12 ++--
jrj/xframe/wobject/xnode.hpp | 9 +++
jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp | 14 ++--
jrj/ext-jrj/ext-jrj.vcxproj | 10 +-
jrj/project/business/SystemSettings/UserImport.cpp | 52 +++++++++--------
jrj/project/business/SystemSettings/SysUser.cpp | 7 +-
9 files changed, 80 insertions(+), 63 deletions(-)
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index 90e636e..8a8b177 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj
+++ b/jrj/ext-jrj/ext-jrj.vcxproj
@@ -978,11 +978,11 @@
</ClCompile>
<ClCompile Include="..\project\business\SystemSettings\BindComputer.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SystemSettings\Buglist.Developer.hxsoft.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SystemSettings\BugMaint.Developer.hxsoft.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -1039,8 +1039,8 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SystemSettings\UserImport.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\project\business\SystemSettings\UserPassDlg.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
diff --git a/jrj/project/business/PO/Maint.PaperCard.PO.hpp b/jrj/project/business/PO/Maint.PaperCard.PO.hpp
index df02308..217f5cf 100644
--- a/jrj/project/business/PO/Maint.PaperCard.PO.hpp
+++ b/jrj/project/business/PO/Maint.PaperCard.PO.hpp
Binary files differ
diff --git a/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp b/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp
index fbd16e2..0d6fd37 100644
--- a/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp
+++ b/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp
@@ -6,6 +6,7 @@
#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
#include "viewobject/view.base.hpp"
+#include "xcontrol/xshtml.hpp"
using xml = KXMLDOMDocument;
class __declspec(dllexport) BugMaintWin : public xframe
@@ -20,10 +21,10 @@
xstring m_ConnectID;
xcontrol m_Edit;
- htmlctrl m_Html;
+ xshtml m_Html;
xcombobox m_cb;
public:
- BugMaintWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ BugMaintWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd), m_Edit(nullptr){}
public:
static BugMaintWin* CreateInstance(void* implPtr, void* hWnd)
{
@@ -90,7 +91,7 @@
int AppendItem(xml x,KXMLDOMElement r,xstring name, xstring value)
{
KXMLDOMElement e = x.createElement(name);
- e.text() = value;
+ e.settext(value);
r.appendChild(e);
return 1;
}
@@ -132,7 +133,7 @@
l.setAttribute(L"caption", L""+tmp);
KXMLDOMElement b = x.createElement(L"xtoolbutton");
b.setAttribute(L"width", L"18");
- b.setAttribute(L"name", L"att_"+i.toString());
+ b.setAttribute(L"name", (xstring)L"att_"+xstring(i).c_str());
b.setAttribute(L"image", L"1,5");
e.appendChild(l);
e.appendChild(b);
@@ -151,8 +152,8 @@
{
xstring guid = publiccode::GetGuid();
xstring str = guid.left(2);
- xstring ret = xaserver::UploadFile(L"attachment"+str, guid+L".jpg".GetHWND(),L"",false);
- int nIndex = m_cb.AddItem(ret, guid+L".jpg");
+ xstring ret = xaserver::UploadFile(L"attachment"+str, guid+L".jpg",GetHWND(),L"",false);
+ int nIndex = m_cb.AddItem(ret.c_str(), (guid + L".jpg").c_str());
showAtt();
return 1;
}
@@ -261,6 +262,7 @@
int OnHtmlClick(TEvent* evt, int p)
{
+
ref HTMLNMHDR p = evt.pnmh;
const xstring d = m_Html.GetData(p.object);
if(d == L"") return -1;
diff --git a/jrj/project/business/SystemSettings/Buglist.Developer.hxsoft.cpp b/jrj/project/business/SystemSettings/Buglist.Developer.hxsoft.cpp
index 3624178..a415cb5 100644
--- a/jrj/project/business/SystemSettings/Buglist.Developer.hxsoft.cpp
+++ b/jrj/project/business/SystemSettings/Buglist.Developer.hxsoft.cpp
@@ -6,7 +6,7 @@
#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
#include "viewobject/view.base.hpp"
-
+#include "xcontrol/xshtml.hpp"
using xml = KXMLDOMDocument;
class __declspec(dllexport) BugListWin : public xframe
@@ -18,11 +18,11 @@
xstring m_EntityID;
xstring m_EntityType;
- htmlctrl m_Html;
+ xshtml m_Html;
xcontrol m_Edit;
xcombobox m_cb;
public:
- BugListWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ BugListWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd),m_Edit(nullptr) {}
public:
static BugListWin* CreateInstance(void* implPtr, void* hWnd)
{
@@ -61,13 +61,14 @@
return 1;
}
- static stdcall int GetModuleFileName(int hModule, xstring lpFileName, int nSize) native from "kernel32.dll" alias "GetModuleFileNameW";
- static stdcall int PathRemoveFileSpec(xstring lpFileName) native from "shlwapi.dll" alias "PathRemoveFileSpecW";
+ //static stdcall int GetModuleFileName(int hModule, xstring lpFileName, int nSize) native from "kernel32.dll" alias "GetModuleFileNameW";
+ //static stdcall int PathRemoveFileSpec(xstring lpFileName) native from "shlwapi.dll" alias "PathRemoveFileSpecW";
xstring GetModulePath()
{
- xstring str = L"";
- str = str.space(255);
+ //xstring str = L"";
+ //str = str.space(255);
+ wchar_t str[255];
GetModuleFileName(0, str, 250);
PathRemoveFileSpec(str);
return str;
@@ -75,11 +76,12 @@
xstring GetModuleTmpPath()
{
- xstring str = L"";
- str = str.space(255);
+ //xstring str = L"";
+ //str = str.space(255);
+ wchar_t str[255];
GetModuleFileName(0, str, 250);
PathRemoveFileSpec(str);
- xstring tmp = str + L"\\Temp";
+ xstring tmp = (xstring)str + L"\\Temp";
xaserver::CreateDirectory(tmp);
return tmp;
}
@@ -190,9 +192,10 @@
return 1;
}
- int OnHtmlClick(TEvent* evt, int p)
+ int OnHtmlClick(TEvent* evt, LPARAM p)
{
- ref HTMLNMHDR p = evt.pnmh;
+#if 0
+ HTMLNMHDR& p = *(HTMLNMHDR*)evt->notify.pnmh;
const xstring d = m_Html.GetData(p.object);
if (d == L"") return -1;
xstring file = d.mid(0, d.find(L"|##@@|", 0));
@@ -214,14 +217,14 @@
alert(L"文件打开失败2!");
return -1;
}
-
+#endif
return -1;
}
int AppendItem(xml x, KXMLDOMElement r, xstring name, xstring value)
{
KXMLDOMElement e = x.createElement(name);
- e.text() = value;
+ e.settext(value);
r.appendChild(e);
return 1;
}
diff --git a/jrj/project/business/SystemSettings/SysUser.cpp b/jrj/project/business/SystemSettings/SysUser.cpp
index 4155add..5b4161b 100644
--- a/jrj/project/business/SystemSettings/SysUser.cpp
+++ b/jrj/project/business/SystemSettings/SysUser.cpp
@@ -52,11 +52,11 @@
return 1;
}
- int SetEntityData(LPARAM p)
+ int SetEntityData(xaserverarg arg)
{
xml x;
- xaserverarg arg;
+ //xaserverarg arg;
xstring str = m_QueryTxt;
//trace(ele.xml);
@@ -117,7 +117,7 @@
alert(L"请选择职位!");
return 0;
}
- OpenWindow(L"dev:xpage[UserImport.vx]");
+ OpenWindow(L"dev:xpage[UserImport.vx]",(LPARAM)this);
//openUrl(L"系统用户.vface/xpage/SysUser/UserImport", this);
return 1;
}
@@ -326,7 +326,6 @@
x.loadXML(L"<Config/>");
m_configDoc = x;
rowSearch(L"系统用户.vface/template/SysUser/list");
- return 1;
GridSearchEx();
return 1;
diff --git a/jrj/project/business/SystemSettings/SysUser.hpp b/jrj/project/business/SystemSettings/SysUser.hpp
index 8fc26a6..1736fe2 100644
--- a/jrj/project/business/SystemSettings/SysUser.hpp
+++ b/jrj/project/business/SystemSettings/SysUser.hpp
@@ -54,11 +54,11 @@
return 1;
}
- int SetEntityData(LPARAM p)
+ int SetEntityData(xaserverarg arg)
{
xml x;
- xaserverarg arg;
+ //xaserverarg arg;
xstring str = m_QueryTxt;
//trace(ele.xml);
@@ -119,8 +119,8 @@
alert(L"请选择职位!");
return 0;
}
- OpenWindow(L"dev:xpage[UserImport.vx]");
- //openUrl(L"系统用户.vface/xpage/SysUser/UserImport", this);
+ OpenWindow(L"dev:xpage[UserImport.vx]",(LPARAM)this);
+ //OpenUrl(L"系统用户.vface/xpage/SysUser/UserImport", this);
return 1;
}
int OnSave()
diff --git a/jrj/project/business/SystemSettings/UserImport.cpp b/jrj/project/business/SystemSettings/UserImport.cpp
index 211a62c..572beb0 100644
--- a/jrj/project/business/SystemSettings/UserImport.cpp
+++ b/jrj/project/business/SystemSettings/UserImport.cpp
@@ -15,7 +15,7 @@
public:
- SysUser lw_obj;
+ SysUser* lw_obj;
xdwgrid dw_list;
xtreeview tv_org;
xnode m_agentNode; //Agent Condition
@@ -23,7 +23,7 @@
xstring m_sTxt;
xstring is_orgid;
public:
- UserImport(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ UserImport(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd), lw_obj(nullptr) {}
public:
static UserImport* CreateInstance(void* implPtr, void* hWnd)
{
@@ -82,9 +82,7 @@
{
if (GetWinParam())
{
- lw_obj = new SysUser;
- lw_obj.setNativePointer(GetParam());
- lw_obj = GetParam();
+ lw_obj = (SysUser*)GetWinParam();
}
else
return 0;
@@ -102,7 +100,7 @@
xstring sJobID, sJobName;
//int wid = lw_obj.tv_usergroup.GetId();
HTREEITEM hitem = tv_org.GetSelectedItem();
- KXMLDOMElement ele = tv_org.GetItemData(hitem);
+ //KXMLDOMElement ele = tv_org.GetItemData(hitem);
while (row > 0)
@@ -132,15 +130,15 @@
}
}*/
- int nRow = lw_obj.dw_user.InsertRow(0);
- lw_obj.dw_user.SetItemString(nRow, L"EmployeeNo", sEmployeeNo);
- lw_obj.dw_user.SetItemString(nRow, L"UserName", sOldEmpNo);
- lw_obj.dw_user.SetItemString(nRow, L"PassWord", sPassWord);
- lw_obj.dw_user.SetItemString(nRow, L"PersonID", sPersonID);
- lw_obj.dw_user.SetItemDisplayString(nRow, L"PersonID", sPersonName);
- lw_obj.dw_user.SetItemString(nRow, L"Status", L"Y");
- lw_obj.dw_user.SetItemDisplayString(nRow, L"Status", L"有效");
- lw_obj.dw_user.SetItemString(nRow, L"OldEmpNo", sOldEmpNo);
+ int nRow = lw_obj->dw_user.InsertRow(0);
+ lw_obj->dw_user.SetItemString(nRow, L"EmployeeNo", sEmployeeNo);
+ lw_obj->dw_user.SetItemString(nRow, L"UserName", sOldEmpNo);
+ lw_obj->dw_user.SetItemString(nRow, L"PassWord", sPassWord);
+ lw_obj->dw_user.SetItemString(nRow, L"PersonID", sPersonID);
+ lw_obj->dw_user.SetItemDisplayString(nRow, L"PersonID", sPersonName);
+ lw_obj->dw_user.SetItemString(nRow, L"Status", L"Y");
+ lw_obj->dw_user.SetItemDisplayString(nRow, L"Status", L"有效");
+ lw_obj->dw_user.SetItemString(nRow, L"OldEmpNo", sOldEmpNo);
/*
lw_obj.dw_user.SetItemString(nRow,L"PositionID",sPositionID);
lw_obj.dw_user.SetItemDisplayString(nRow,L"PositionID",sPositionName);
@@ -164,7 +162,7 @@
int OnSubTree(xstring id, HTREEITEM parentitem)
{
//int wid = tv_org.GetId();
- if (tv_org.GetChildItem( parentitem) > 0) return 1;
+ if (tv_org.GetChildItem( parentitem)) return 1;
xml x;
xaserverarg arg;
@@ -176,8 +174,8 @@
return -1;
}
//trace(x.xml());
- var list = x.selectNodes(L"//item");
- int i = 0, s = list.length;
+ auto list = x.selectNodes(L"//item");
+ int i = 0, s = list.length();
KXMLDOMElement xitem;
xstring sName;
xstring sguid;
@@ -191,15 +189,15 @@
sguid = xitem.selectSingleNode(L"id").text();
stype = xitem.selectSingleNode(L"typ").text();
//int curItem = tv_org.InsertChildItemEx(wid,parentitem,sName,xitem,15,4);
- int curItem = 0;
+ HTREEITEM curItem = 0;
if (stype == L"Org")
{
- curItem = tv_org.InsertChildItemEx(wid, parentitem, sName, xitem, 15, 4);
- tv_org.SetItemChild1(wid, curItem, 1);
+ curItem = tv_org.InsertChildItemEx( parentitem, sName, xitem, 15, 4);
+ tv_org.SetItemChild1(curItem, 1);
}
else
{
- curItem = tv_org.InsertChildItemEx(wid, parentitem, sName, xitem, 21, 21);
+ curItem = tv_org.InsertChildItemEx(parentitem, sName, xitem, 21, 21);
}
//OnSubTree(sguid,curItem);
}
@@ -214,12 +212,12 @@
//int wid = tv_org.GetId();
xml x;
- x.loadXML(L"<item><id>" + id + L"</id><no/><name>凤凰集团</name><typ>Org</typ></item>");
+ x.loadXML(L"<item><id>" + id + L"</id><no/><name>组织结构</name><typ>Org</typ></item>");
//KXMLDOMDocument root = x;
//KXMLDOMElement RDoc = x.documentElement();
//KXMLDOMElement ele = RDoc.SelectSingleNode(L"//Org");
KXMLDOMElement ele = x.selectSingleNode(L"//item");
- HTREEITEM hItem = tv_org.InsertChildItem( 0, L"凤凰集团", ele, 15, 4);
+ HTREEITEM hItem = tv_org.InsertChildItemEx( (HTREEITEM)0, L"组织结构", ele, 15, 4);
tv_org.SetItemChild1(hItem, 1);
return 1;
@@ -284,9 +282,15 @@
int OnCmdDispatch(xstring comdid)
{
if (comdid == L"cb_import")
+ {
OnOK();
+ return 1;
+ }
else if (comdid == L"cb_close")
+ {
CloseWindow();
+ return 1;
+ }
return 0;
}
diff --git a/jrj/xframe/vbusiness/vframe/listex.vframe.vbusiness.hpp b/jrj/xframe/vbusiness/vframe/listex.vframe.vbusiness.hpp
index f123891..dea137f 100644
--- a/jrj/xframe/vbusiness/vframe/listex.vframe.vbusiness.hpp
+++ b/jrj/xframe/vbusiness/vframe/listex.vframe.vbusiness.hpp
@@ -30,7 +30,7 @@
return m_this->alert(str);
}
- string GetServerUrl()
+ xstring GetServerUrl()
{
return L"";
}
@@ -50,7 +50,7 @@
return xurl::get(GetServerUrl(),aurl, para, x);
}
- string EditCombo(KXMLDOMElement d)
+ xstring EditCombo(KXMLDOMElement d)
{
if (d.selectSingleNode(L"datas")) {
KXMLDOMElement e = d.selectSingleNode(L"datas");
@@ -105,13 +105,13 @@
return L"";
}
- string EditDate(KXMLDOMElement e)
+ xstring EditDate(KXMLDOMElement e)
{
- string str = L"<xedit name='_cb_grid_value1' bind='_cb_grid_search'/><xlabel caption='~' width='8'/><xedit name='_cb_grid_value2' bind='_cb_grid_search'/>";
+ xstring str = L"<xedit name='_cb_grid_value1' bind='_cb_grid_search'/><xlabel caption='~' width='8'/><xedit name='_cb_grid_value2' bind='_cb_grid_search'/>";
return str;
}
- string EditSheet(KXMLDOMElement d)
+ xstring EditSheet(KXMLDOMElement d)
{
xstring str = L"<xedit name='_cb_grid_value1' bind='_cb_grid_search'/>";
if (d.selectSingleNode(L"@sheet")) {
@@ -153,7 +153,7 @@
return str;
}
- string EditTree(KXMLDOMElement e)
+ xstring EditTree(KXMLDOMElement e)
{
if (e.selectSingleNode(L"@xpage") && e.selectSingleNode(L"@column1") && e.selectSingleNode(L"@column2")) {
xstring xq = e.selectSingleNode(L"@xpage").text();
diff --git a/jrj/xframe/wobject/xnode.hpp b/jrj/xframe/wobject/xnode.hpp
index 00eda6e..8fad2b4 100644
--- a/jrj/xframe/wobject/xnode.hpp
+++ b/jrj/xframe/wobject/xnode.hpp
@@ -236,4 +236,13 @@
{
return getKNode()->SetLayerFlow(pNode,dwLayerFlow);
}
+
+ int SetWidthHeight(int width, int height)
+ {
+ return getKNode()->SetWidthHeight(width, height);
+ }
+ int MoveTo(LPTSTR Name)
+ {
+ return getKNode()->MoveTo(Name);
+ }
};
\ No newline at end of file
--
Gitblit v1.9.3