From 3680fd01aaa3238767302138fb85a97b228bb39d Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期三, 17 七月 2024 12:07:07 +0800
Subject: [PATCH] updae
---
jrj/project/business/SystemSettings/FlowTermImport.cpp | 115 +-
jrj/project/business/SystemSettings/LogList.cpp | 174 ++--
jrj/project/business/SystemSettings/TestRetrieveing.cpp | 45
jrj/project/business/SystemSettings/level.Customer.v3.cpp | 328 +++++----
jrj/project/business/SystemSettings/FlowTermSelect.cpp | 131 ++-
jrj/project/business/SystemSettings/SysLoginRecord.cpp | 88 +-
jrj/project/business/SystemSettings/view.assignadjust.cpp | 203 +++--
jrj/project/business/SystemSettings/Flow3.cpp | 428 ++++++------
jrj/project/business/SystemSettings/Developer.Synch.cpp | 301 ++++----
jrj/project/business/SystemSettings/maint.Level.Customer3.cpp | 62 +
jrj/project/business/SystemSettings/UserPassDlg.cpp | 108 +-
11 files changed, 1,071 insertions(+), 912 deletions(-)
diff --git a/jrj/project/business/SystemSettings/Developer.Synch.cpp b/jrj/project/business/SystemSettings/Developer.Synch.cpp
index ba7e601..8789e6e 100644
--- a/jrj/project/business/SystemSettings/Developer.Synch.cpp
+++ b/jrj/project/business/SystemSettings/Developer.Synch.cpp
@@ -1,45 +1,60 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class DeveloperSynch : public xframe
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) DeveloperSynch : public xframe
{
+ public:
xtreeview tv_gs;
xsedit dw_log;
- int[100] nItems;
+ int nItems;
int nCount;
- string sContent;
-
- string ProcessDevCmd(string cmd,string ext, string aurl="", bool needlogin=false)
+ xstring sContent;
+ public:
+ DeveloperSynch(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static DeveloperSynch* CreateInstance(void* implPtr, void* hWnd)
{
- if(aurl == "") aurl = GetServerUrl();
+ DeveloperSynch* pWin = new DeveloperSynch(implPtr, (HWND)hWnd);
+ return pWin;
+ }
+ xstring ProcessDevCmd(xstring cmd,xstring ext, xstring aurl=L"", bool needlogin=false)
+ {
+ if(aurl == L"") aurl = GetServerUrl();
//alert(aurl);
- string d = xaserver::ProcessCmd(aurl,"uri.hxsoft.com/xaserver/developer "+cmd,ext,needlogin);
+ xstring d = xaserver::ProcessCmd(aurl,L"uri.hxsoft.com/xaserver/developer "+cmd,ext,needlogin);
return d;
}
- string ProcessDevCmd2(string cmd,string ext, string aurl="", bool needlogin=false)
+ xstring ProcessDevCmd2(xstring cmd,xstring ext, xstring aurl=L"", bool needlogin=false)
{
- if(aurl == "") aurl = GetServerUrl();
+ if(aurl == L"") aurl = GetServerUrl();
//alert(aurl);
- string d = xaserver::ProcessCmd(aurl,"uri.hxsoft.com/xaserver/dev:"+cmd,ext,needlogin);
+ xstring d = xaserver::ProcessCmd(aurl,L"uri.hxsoft.com/xaserver/dev:"+cmd,ext,needlogin);
return d;
}
int GetProjectItem(int hItem)
{
int pitem = hItem;
- string typ;
+ xstring typ;
while(true)
{
- int h = xtreeview::GetItemData(tv_gs.GetId(), pitem);
- msxml::IXMLDOMElement e = trust(h as msxml::IXMLDOMElement);
- typ = GetEleString(e, "@tagname");
- if(typ=="project")break;
- pitem = xtreeview::GetParentItem(tv_gs.GetId(), pitem);
+ int h =tv_gs.GetItemData(tv_gs.GetId(), pitem);
+ KXMLDOMElement e = trust(h as KXMLDOMElement);
+ typ = GetEleString(e, L"@tagname");
+ if(typ==L"project")break;
+ pitem =tv_gs.GetParentItem(tv_gs.GetId(), pitem);
if(pitem<=0)break;
}
return pitem;
@@ -51,30 +66,30 @@
int hP2Item = hItem;
while(true)
{
- hDomainItem = xtreeview::GetParentItem(tv_gs.GetId(), hP2Item);
+ hDomainItem =tv_gs.GetParentItem(tv_gs.GetId(), hP2Item);
if(xtreeview::GetParentItem(tv_gs.GetId(), hDomainItem)<=0)break;
hP2Item = hDomainItem;
}
return hP2Item;
}
- string GetItemGuid(int hItem)
+ xstring GetItemGuid(int hItem)
{
- int h = xtreeview::GetItemData(tv_gs.GetId(), hItem);
- msxml::IXMLDOMElement e = trust(h as msxml::IXMLDOMElement);
- string guid = e.GetAttribute("guid");
+ int h =tv_gs.GetItemData(tv_gs.GetId(), hItem);
+ KXMLDOMElement e = trust(h as KXMLDOMElement);
+ xstring guid = e.GetAttribute(L"guid");
return guid;
}
xaserverarg GetDataArg(int hItem, xaserverarg arg)
{
- int h = xtreeview::GetItemData(tv_gs.GetId(), hItem);
- msxml::IXMLDOMElement e = trust(h as msxml::IXMLDOMElement);
- string node = GetEleString(e, "@tagname");
+ int h =tv_gs.GetItemData(tv_gs.GetId(), hItem);
+ KXMLDOMElement e = trust(h as KXMLDOMElement);
+ xstring node = GetEleString(e, L"@tagname");
//WriteLog(e.xml);
- if(node=="File" || node=="file")
+ if(node==L"File" || node==L"file")
{
- string caption = e.getAttribute("caption");
+ xstring caption = e.getAttribute(L"caption");
int hP2Item = 0;
int hDomainItem = 0;
@@ -84,35 +99,35 @@
}else
{
hP2Item = GetP2Item(hItem);
- hDomainItem = xtreeview::GetParentItem(tv_gs.GetId(), hP2Item);
+ hDomainItem =tv_gs.GetParentItem(tv_gs.GetId(), hP2Item);
}
//find project folder
- string prjguid="";
- int pitem = this.GetProjectItem(hItem);
+ xstring prjguid=L"";
+ int pitem = GetProjectItem(hItem);
if(pitem > 0)
prjguid = GetItemGuid(pitem);
- //xaserverarg arg = new xaserverarg;
- //arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("project.guid",prjguid);
+ //xaserverarg arg ;
+ //;
+ arg.AddArg(L"project.guid",prjguid);
if(hP2Item)
{
if(hP2Item != hItem)
{
- string guid = e.getAttribute("guid");
- arg.AddArg("guid",guid);
+ xstring guid = e.getAttribute(L"guid");
+ arg.AddArg(L"guid",guid);
}
- string guid2 = GetItemGuid(hP2Item);
- arg.AddArg("root.guid",guid2);
+ xstring guid2 = GetItemGuid(hP2Item);
+ arg.AddArg(L"root.guid",guid2);
}else if(hDomainItem > 0)
{
- string guid3 = GetItemGuid(hDomainItem);
- arg.AddArg("domain.guid",guid3);
+ xstring guid3 = GetItemGuid(hDomainItem);
+ arg.AddArg(L"domain.guid",guid3);
}
return 1;
}
- else if(node=="folder" || node=="project")
+ else if(node==L"folder" || node==L"project")
return 2;
else
return 0;
@@ -120,103 +135,103 @@
int SaveData(int hItem)
{
- xcontrol xc = GetControl("surl");
- string surl = xc.GetText();
- if(surl == "")
+ xcontrol xc = GetControl(L"surl");
+ xstring surl = xc.GetText();
+ if(surl == L"")
{
- alert("请输入同步服务器地址");
+ alert(L"请输入同步服务器地址");
return 1;
}
- string name = xtreeview::GetItemLabel(tv_gs.GetId(), hItem);
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
+ xstring name =tv_gs.GetItemLabel(hItem);
+ xaserverarg arg ;
+ ;
int ret = GetDataArg(hItem, arg);
//alert(arg.GetString());
if(ret == 0)
{
- WriteLog(name+" 失败, 原因:获取工程或文件夹失败!");
+ WriteLog(name+L" 失败, 原因:获取工程或文件夹失败!");
return -1;
}
else if(ret == 2)
{
ret = SynchFolder(hItem);
if(ret == -1)
- WriteLog(name+" 失败, 原因:获取文件数据失败!");
+ WriteLog(name+L" 失败, 原因:获取文件数据失败!");
else if(ret == 0)
- WriteLog(name+" 失败, 原因:复制文件失败!");
+ WriteLog(name+L" 失败, 原因:复制文件失败!");
else
WriteLog(name);
return -1;
}
SynchFolder(hItem);
- arg.AddArg("__name",name);
- arg.AddArg("__url",surl);
+ arg.AddArg(L"__name",name);
+ arg.AddArg(L"__url",surl);
synchServer(arg);
- if(name.right(3) == ".vx" || name.right(5) == ".xpage")
+ if(name.right(3) == L".vx" || name.right(5) == L".xpage")
{
- arg.AddArg("__name",name + "[Code]");
- arg.AddArg("iscode","yes");
+ arg.AddArg(L"__name",name + L"[Code]");
+ arg.AddArg(L"iscode",L"yes");
synchServer(arg);
}
return 1;
}
- string GetFolderPath(int hItem)
+ xstring GetFolderPath(int hItem)
{
int k = hItem;
- if(k == 0) return "";
- string src = "";
- //string name = "";
+ if(k == 0) return L"";
+ xstring src = L"";
+ //xstring name = L"";
while(k > 0)
{
- int h = xtreeview::GetItemData(tv_gs.GetId(), k);
- k = xtreeview::GetParentItem(tv_gs.GetId(), k);
- msxml::IXMLDOMElement e = trust(h as msxml::IXMLDOMElement);
- string node = GetEleString(e, "@tagname");
- if(node != "File" && node != "file")
+ int h =tv_gs.GetItemData(tv_gs.GetId(), k);
+ k =tv_gs.GetParentItem(tv_gs.GetId(), k);
+ KXMLDOMElement e = trust(h as KXMLDOMElement);
+ xstring node = GetEleString(e, L"@tagname");
+ if(node != L"File" && node != L"file")
{
- string tmp = GetEleString(e, "@src");
- //if(name == "") name = GetEleString(e, "@caption");
- if(tmp != "")
+ xstring tmp = GetEleString(e, L"@src");
+ //if(name == L"") name = GetEleString(e, L"@caption");
+ if(tmp != L"")
{
SynchFolder(k);
- if(src == "") src = tmp;
+ if(src == L"") src = tmp;
else
{
int j = 1;
- int s = tmp.length();
- string t = tmp.right(j).left(1);
- while(t != "\\" && j < s)
+ int s = tmp.length()();
+ xstring t = tmp.right(j).left(1);
+ while(t != L"\\" && j < s)
{
//WriteLog(t);
j++;
t = tmp.right(j).left(1);
}
if(j >= s)
- src = tmp+ "\\" + src;
+ src = tmp+ L"\\" + src;
else
- src = tmp.left(s - j)+ "\\" + src;
+ src = tmp.left(s - j)+ L"\\" + src;
}
}
}
}
- if(src == "")
+ if(src == L"")
{
- //WriteLog(name+" 同步失败, 原因:获取文件数据失败0!");
- return "";
+ //WriteLog(name+L" 同步失败, 原因:获取文件数据失败0!");
+ return L"";
}
- //if(src.left(9) =="Projects\\") src = src.mid(9, src.length());
- src = "\\" + src;//.replace("Projects\\","");
+ //if(src.left(9) ==L"Projects\\") src = src.mid(9, src.length()());
+ src = L"\\" + src;//.replace(L"Projects\\",L"");
//WriteLog(src);
return src;
}
int SynchFolder(int hItem)
{
- string src = GetFolderPath(hItem);
- if(src== "") return -1;
- if(xaserver::FileCopy("devfolder8001", src, "devfolder5001", src) != 1)
+ xstring src = GetFolderPath(hItem);
+ if(src== L"") return -1;
+ if(xaserver::FileCopy(L"devfolder8001", src, L"devfolder5001", src) != 1)
return 0;
//WriteLog(src);
return 1;
@@ -224,34 +239,34 @@
int synchServer(xaserverarg arg)
{
- string name = arg.GetArgString("__name");
- string surl = arg.GetArgString("__url");
- string d = ProcessDevCmd("getobject",arg.GetString());
- if(d == "")
+ xstring name = arg.GetArgString(L"__name");
+ xstring surl = arg.GetArgString(L"__url");
+ xstring d = ProcessDevCmd(L"getobject",arg.GetString());
+ if(d == L"")
{
- WriteLog(name+" 失败, 原因:获取文件数据失败!");
+ WriteLog(name+L" 失败, 原因:获取文件数据失败!");
return -1;
}
//WriteLog(d);
- arg.AddArg("content",d);
- ProcessDevCmd("saveobject",arg.GetString(), surl,true);
+ arg.AddArg(L"content",d);
+ ProcessDevCmd(L"saveobject",arg.GetString(), surl,true);
WriteLog(name);
return 1;
}
- int WriteLog(string str)
+ int WriteLog(xstring str)
{
- if(sContent == "")
+ if(sContent == L"")
sContent = str;
else
- sContent += "\r\n" + str;
+ sContent += L"\r\n" + str;
//alert(sContent);
- dw_log.SetContent(sContent, "");
+ dw_log.SetContent(sContent, L"");
return 1;
}
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
SetAgent();
@@ -262,7 +277,7 @@
{
if(nCount >99)
{
- alert("同时同步的数量不能大于100个!");
+ alert(L"同时同步的数量不能大于100个!");
return 1;
}
nItems[nCount] = hItem;
@@ -290,17 +305,17 @@
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- if(comdid != "synch") return 1;
+ if(comdid != L"synch") return 1;
- int hCursor = xutil::SetCursorWait();
- sContent = "";
+ HCURSOR hCursor = xutil::SetCursorWait();
+ sContent = L"";
for(int i=0; i<nCount; i++)
{
int p = nItems[i];
- //int h = xtreeview::GetItemData(tv_gs.GetId(), p);
- //msxml::IXMLDOMElement e = trust(h as msxml::IXMLDOMElement);
+ //int h =tv_gs.GetItemData(tv_gs.GetId(), p);
+ //KXMLDOMElement e = trust(h as KXMLDOMElement);
//alert(e.xml);
SaveData(p);
xtreeview::SetChecked(tv_gs.GetId(), p,0);
@@ -310,13 +325,16 @@
return 0;
}
- int OnTreeCheckBoxSel(ref TNotifyEvent evt,int p)
+ int OnTreeCheckBoxSel(TEvent* evt, LPARAM p)
{
- ref TVNNMHDR nmtv = trust(evt.pnmh as ref TVNNMHDR);
+ TVNNMHDR* nmtv = (TVNNMHDR*)evt->notify.pnmh;
+
int hItem = nmtv.FromItem;
- int hCursor = xutil::SetCursorWait();
+
+ HCURSOR hCursor = xutil::SetCursorWait();
int hwnd = nmtv.hwndFrom;
- int c = 1 - xtreeview::GetChecked(hwnd, hItem);
+
+ int c = 1 -tv_gs.GetChecked(hwnd, hItem);
if(c == 1)
Add(hItem);
else
@@ -326,52 +344,52 @@
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&DeveloperSynch::OnXCommand);
//获取焦点事件,用于重置工具条
- //AttachEvent("WM_SETFOCUS",OnSetFocus);
- AttachEvent("DevExplorer","TVN_CHECKBOXSEL",OnTreeCheckBoxSel);
- AttachEvent("DevExplorer", "TVN_ITEMEXPANDING",OnTreeExpanding);
+ //AttachEvent(L"WM_SETFOCUS",OnSetFocus);
+ AttachEvent(L"DevExplorer",L"TVN_CHECKBOXSEL", (FEvent)&DeveloperSynch::OnTreeCheckBoxSel);
+ AttachEvent(L"DevExplorer", L"TVN_ITEMEXPANDING", (FEvent)&DeveloperSynch::OnTreeExpanding);
return 1;
}
- int OnTreeExpanding(ref TNotifyEvent evt,int lparam)
+ int OnTreeExpanding(TEvent* evt, LPARAM lparam)
{
- ref NMTREEVIEW nmtv = trust(evt.pnmh as ref NMTREEVIEW);
+ TVNNMHDR* nmtv = (TVNNMHDR*)evt->notify.pnmh;
int hItem = nmtv.itemNew.hItem;
int cItem=xtreeview::GetChildItem(tv_gs.GetId(), hItem);
if(cItem > 0) return 1;
- int p = xtreeview::GetItemData(tv_gs.GetId(), hItem);
- msxml::IXMLDOMElement ele = trust(p as msxml::IXMLDOMElement);
- string src =GetEleString(ele, "@src");
- string tagname =GetEleString(ele, "@tagname");
- if (src == "" || tagname == "file" || tagname == "File") return 1;
+ int p =tv_gs.GetItemData(tv_gs.GetId(), hItem);
+ KXMLDOMElement ele = trust(p as KXMLDOMElement);
+ xstring src =GetEleString(ele, L"@src");
+ xstring tagname =GetEleString(ele, L"@tagname");
+ if (src == L"" || tagname == L"file" || tagname == L"File") return 1;
OnSetTree(hItem, GetFolderPath(hItem));
return 1;
}
- int OnSetTree(int pItem, msxml::IXMLDOMElement e)
+ int OnSetTree(int pItem, KXMLDOMElement e)
{
- msxml::IXMLDOMNodeList li=e.selectNodes("*");
+ KXMLDOMNodeList li=e.selectNodes(L"*");
int i=0;
- int s=li.length;
+ int s=li.length();
for (i=0;i<s;i++){
- msxml::IXMLDOMElement ele= li.item(s - i - 1);
- string caption = GetEleString(ele, "@caption");
- string src =GetEleString(ele, "@src");
- string image =GetEleString(ele, "@image");
+ KXMLDOMElement ele= li.item(s - i - 1);
+ xstring caption = GetEleString(ele, L"@caption");
+ xstring src =GetEleString(ele, L"@src");
+ xstring image =GetEleString(ele, L"@image");
int p = trust(ele as int);
int hItem=xtreeview::InsertItem(tv_gs.GetId(), pItem,0,caption,p,image.toInt());
- string tagname =GetEleString(ele, "@tagname");
- if (src != "" && tagname != "file" && tagname != "File")
+ xstring tagname =GetEleString(ele, L"@tagname");
+ if (src != L"" && tagname != L"file" && tagname != L"File")
xtreeview::SetItemChild1(tv_gs.GetId(), hItem,1);
OnSetTree(hItem, ele);
}
@@ -379,19 +397,19 @@
return 1;
}
- int OnSetTree(int hItem, string src)
+ int OnSetTree(int hItem, xstring src)
{
xml x=new xml;
- x.setNativePointer(xml::CreateInstance());
- xaserverarg arg=new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("src",src);
- if(xaserver::ExecXQuery(GetServerUrl(),"[Developer.Tree.xq]",arg.GetString(),x)!=1)
+
+ xaserverarg arg;
+ ;
+ arg.AddArg(L"src",src);
+ if(xaserver::ExecXQuery(GetServerUrl(),L"[Developer.Tree.xq]",arg.GetString(),x)!=1)
{
- alert("读取节点失败!");
+ alert(L"读取节点失败!");
return 1;
}
- msxml::IXMLDOMElement e = x.GetXmlDoc().documentElement;
+ KXMLDOMElement e = x.documentElement();
OnSetTree(hItem, e);
return 1;
}
@@ -399,8 +417,8 @@
int onload()
{
nCount = 0;
- tv_gs = GetControl("DevExplorer");
- dw_log = GetControl("xlog");
+ tv_gs = GetControl(L"DevExplorer");
+ dw_log = GetControl(L"xlog");
OnAttachEvent();
return 1;
@@ -408,8 +426,7 @@
int onloaded()
{
- OnSetTree(0, "Projects/projects.xhw");
+ OnSetTree(0, L"Projects/projects.xhw");
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/Flow3.cpp b/jrj/project/business/SystemSettings/Flow3.cpp
index 53605d6..b12854a 100644
--- a/jrj/project/business/SystemSettings/Flow3.cpp
+++ b/jrj/project/business/SystemSettings/Flow3.cpp
@@ -1,12 +1,18 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
-use "base.view.vd"
-use "xflowchart.wobject.wface.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class flow : public xframe
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) flow : public xframe
{
+ public:
xtreeview tv_1;
xlayersheet tab_1;
xdwgrid dw_flow;
@@ -17,133 +23,139 @@
xdwgrid dw_scene;
xdwgrid dw_buttonright;
xdwgrid dw_datafieldright;
- string flowid;
+ xstring flowid;
xtreeview tv_folder;
xnode m_agentNode; //Agent Condition
-
- string GetSheetType(int index)
+ public:
+ flow(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static flow* CreateInstance(void* implPtr, void* hWnd)
{
- if (index == 0) return "flowitem";
- else if (index == 1) return "state";
- else if (index == 2) return "actionrole";
- else if (index == 3) return "button";
- else if (index == 4) return "role";
- else if (index == 5) return "bill";
- else if (index == 6) return "scene";
- else if (index ==7) return "fieldrole";
- else return "unkown";
+ flow* pWin = new flow(implPtr, (HWND)hWnd);
+ return pWin;
+ }
+ xstring GetSheetType(int index)
+ {
+ if (index == 0) return L"flowitem";
+ else if (index == 1) return L"state";
+ else if (index == 2) return L"actionrole";
+ else if (index == 3) return L"button";
+ else if (index == 4) return L"role";
+ else if (index == 5) return L"bill";
+ else if (index == 6) return L"scene";
+ else if (index ==7) return L"fieldrole";
+ else return L"unkown";
}
xdwgrid GetSheetDwgrid(int index)
{
- string typ = GetSheetType(index);
- if(typ=="flowitem") return dw_flow;
- if(typ=="actionrole") return dw_buttonright;
- if(typ=="state") return dw_state;
- if(typ=="button") return dw_button;
- if(typ=="role") return dw_role;
- if(typ=="bill") return dw_bill;
- if(typ=="scene") return dw_scene;
- if(typ=="fieldrole") return dw_datafieldright;
+ xstring typ = GetSheetType(index);
+ if(typ==L"flowitem") return dw_flow;
+ if(typ==L"actionrole") return dw_buttonright;
+ if(typ==L"state") return dw_state;
+ if(typ==L"button") return dw_button;
+ if(typ==L"role") return dw_role;
+ if(typ==L"bill") return dw_bill;
+ if(typ==L"scene") return dw_scene;
+ if(typ==L"fieldrole") return dw_datafieldright;
return 0;
}
xdwgrid GetSheetDbmap(int index)
{
- string typ = GetSheetType(index);
- if(typ=="flowitem") return "flow.dbmap";
- if(typ=="actionrole") return "workflow.actionrole.dbmap";
- if(typ=="state") return "state.dbmap";
- if(typ=="button") return "button.dbmap";
- if(typ=="role") return "role.dbmap";
- if(typ=="bill") return "bill.dbmap";
- if(typ=="scene") return "scene.dbmap";
- if(typ=="fieldrole") return "workflow.datarole.dbmap";
+ xstring typ = GetSheetType(index);
+ if(typ==L"flowitem") return "flow.dbmap";
+ if(typ==L"actionrole") return "workflow.actionrole.dbmap";
+ if(typ==L"state") return "state.dbmap";
+ if(typ==L"button") return "button.dbmap";
+ if(typ==L"role") return "role.dbmap";
+ if(typ==L"bill") return "bill.dbmap";
+ if(typ==L"scene") return "scene.dbmap";
+ if(typ==L"fieldrole") return "workflow.datarole.dbmap";
return 0;
}
- string GetDwname(string typ)
+ xstring GetDwname(xstring typ)
{
- if(typ=="flowitem") return "/sale/view/Flow3/template/flow";
- if(typ=="actionrole") return "/sale/view/Flow3/template/buttonright";
- if(typ=="state") return "/sale/view/Flow3/template/state";
- if(typ=="button") return "/sale/view/Flow3/template/button";
- if(typ=="role") return "/sale/view/Flow3/template/role";
- if(typ=="bill") return "/sale/view/Flow3/template/bill";
- if(typ=="scene") return "/sale/view/Flow3/template/scene";
- if(typ=="fieldrole") return "/sale/view/Flow3/template/datafieldright";
- return "";
+ if(typ==L"flowitem") return L"/sale/view/Flow3/template/flow";
+ if(typ==L"actionrole") return L"/sale/view/Flow3/template/buttonright";
+ if(typ==L"state") return L"/sale/view/Flow3/template/state";
+ if(typ==L"button") return L"/sale/view/Flow3/template/button";
+ if(typ==L"role") return L"/sale/view/Flow3/template/role";
+ if(typ==L"bill") return L"/sale/view/Flow3/template/bill";
+ if(typ==L"scene") return L"/sale/view/Flow3/template/scene";
+ if(typ==L"fieldrole") return L"/sale/view/Flow3/template/datafieldright";
+ return L"";
}
-
int SetAgent()
{
- string xfNodeAgentArea = "agentarea";
+ xstring xfNodeAgentArea = L"agentarea";
xnode anode = GetAgentNode(xfNodeAgentArea);
if(m_agentNode)
{
- SetAgentNodeContent (anode,m_agentNode);
+ SetAgentNode (anode,m_agentNode);
}
else
{
- msxml::IXMLDOMElement xframeElement = GetElement();
- msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*");
+ KXMLDOMElement xframeElement = GetElement();
+ KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*");
if(agent)
{
- string s = agent.xml;
- m_agentNode = SetAgentNodeContent (anode,s);
+ xstring s = agent.xml();
+ m_agentNode = SetAgentNode (anode,s);
}
}
return 1;
}
int OnSave()
{
- if(flowid=="") return 1;
+ if(flowid==L"") return 1;
- string sdbmap;
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
+ xstring sdbmap;
+ xml x ;
+
int index = tab_1.GetSheetIndex();
- sdbmap = GetSheetDbmap(index);
+ sdbmap = (xstring)GetSheetDbmap(index);
xdwgrid dw_list = GetSheetDwgrid(index);
- dw_list.DwUpdateAllToEx(x.GetXmlDoc());
- //trace(x.GetXml());
+ dw_list.DwUpdateAllToEx(x);
+ //trace(x.xml());
- msxml::IXMLDOMNodeList ls = x.GetXmlDoc().documentElement.SelectNodes("*[@update.modify='1' and @update.new='1']");
- int len = ls.length;
+ KXMLDOMNodeList ls = x.documentElement().selectNodes(L"*[@update.modify='1' and @update.new='1']");
+ int len = ls.length();
for(int k=0;k<len;k++)
{
- msxml::IXMLDOMElement e;
- if(ls.item(k).selectSingleNode("flowID"))
+ KXMLDOMElement e;
+ if(ls.item(k).selectSingleNode(L"flowID"))
{
- e = ls.item(k).selectSingleNode("flowID");
- e.setAttribute("update.modify","1");
- e.text = flowid;
+ e = ls.item(k).selectSingleNode(L"flowID");
+ e.setAttribute(L"update.modify",L"1");
+ e.text() = flowid;
}else
{
- e = x.GetXmlDoc().createElement("flowID");
- e.setAttribute("update.modify","1");
- e.text = flowid;
+ e = x.createElement(L"flowID");
+ e.setAttribute(L"update.modify",L"1");
+ e.text() = flowid;
ls.item(k).appendChild(e);
}
}
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("content",x.GetXml());
- arg.AddArg("sdbmap",sdbmap);
- trace(x.GetXml());
- if(url::get("/sale/data/Flow3/save/flow", arg.GetString(),x)!=1)
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"content",x.xml());
+ arg.AddArg(L"sdbmap",sdbmap);
+ trace(x.xml());
+ if(xurl::get(L"/sale/data/Flow3/save/flow", arg.GetString(),x)!=1)
{
- string error = x.GetXmlDoc().text;
- alert("err:"+error);
+ xstring error = x.text();
+ alert(L"err:"+error);
return 1;
}
dw_list.ResetUpdateStatus();
- //alert(x.GetXml());
- alert("保存成功!");
+ //alert(x.xml());
+ alert(L"保存成功!");
return 1;
}
@@ -174,7 +186,7 @@
}
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
SetAgent();
@@ -184,80 +196,80 @@
return 1;
}
- int OnClicked(ref TNotifyEvent evt,int p)
- {
- ref DWNMHDR hdr = evt.pnmh;
+ int OnClicked(TEvent* evt, int p)
+ {
+ DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
int row = hdr.row;
- string colname=hdr.colname;
+ xstring colname=hdr.colname;
//trace(colname);
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
+ xaserverarg arg ;
+ ;
- string comdid ="";
- string data="";
- string display="";
+ xstring comdid =L"";
+ xstring data=L"";
+ xstring display=L"";
xdwgrid dw_list;
int index = tab_1.GetSheetIndex();
dw_list = GetSheetDwgrid(index);
- arg.AddArg("sdata","");
- arg.AddArg("flowid",flowid);
+ arg.AddArg(L"sdata",L"");
+ arg.AddArg(L"flowid",flowid);
- if(colname=="billID")
+ if(colname==L"billID")
{
- arg.AddArg("stype","bill");
- arg.AddArg("datacolumn","billID");
- arg.AddArg("displaycolumn","billName");
- arg.AddArg("dwname","/sale/view/Flow3/template/bill");
+ arg.AddArg(L"stype",L"bill");
+ arg.AddArg(L"datacolumn",L"billID");
+ arg.AddArg(L"displaycolumn",L"billName");
+ arg.AddArg(L"dwname",L"/sale/view/Flow3/template/bill");
}
- else if(colname=="stateSource")
+ else if(colname==L"stateSource")
{
- arg.AddArg("stype","state");
- arg.AddArg("datacolumn","stateID");
- arg.AddArg("displaycolumn","stateName");
- arg.AddArg("dwname","/sale/view/Flow3/template/state");
+ arg.AddArg(L"stype",L"state");
+ arg.AddArg(L"datacolumn",L"stateID");
+ arg.AddArg(L"displaycolumn",L"stateName");
+ arg.AddArg(L"dwname",L"/sale/view/Flow3/template/state");
}
- else if(colname=="state")
+ else if(colname==L"state")
{
- arg.AddArg("stype","state");
- arg.AddArg("datacolumn","stateID");
- arg.AddArg("displaycolumn","stateName");
- arg.AddArg("dwname","/sale/view/Flow3/template/state");
+ arg.AddArg(L"stype",L"state");
+ arg.AddArg(L"datacolumn",L"stateID");
+ arg.AddArg(L"displaycolumn",L"stateName");
+ arg.AddArg(L"dwname",L"/sale/view/Flow3/template/state");
}
- else if(colname=="stateTarget")
+ else if(colname==L"stateTarget")
{
- arg.AddArg("stype","state");
- arg.AddArg("datacolumn","stateID");
- arg.AddArg("displaycolumn","stateName");
- arg.AddArg("dwname","/sale/view/Flow3/template/state");
+ arg.AddArg(L"stype",L"state");
+ arg.AddArg(L"datacolumn",L"stateID");
+ arg.AddArg(L"displaycolumn",L"stateName");
+ arg.AddArg(L"dwname",L"/sale/view/Flow3/template/state");
}
- else if(colname=="roles")
+ else if(colname==L"roles")
{
- arg.AddArg("stype","role");
- arg.AddArg("datacolumn","roleName");
- arg.AddArg("displaycolumn","roleName");
- arg.AddArg("dwname","/sale/view/Flow3/template/role");
+ arg.AddArg(L"stype",L"role");
+ arg.AddArg(L"datacolumn",L"roleName");
+ arg.AddArg(L"displaycolumn",L"roleName");
+ arg.AddArg(L"dwname",L"/sale/view/Flow3/template/role");
}
- else if(colname=="flowAction")
+ else if(colname==L"flowAction")
{
- arg.AddArg("stype","button");
- arg.AddArg("datacolumn","buttonName");
- arg.AddArg("displaycolumn","buttonName");
- arg.AddArg("dwname","/sale/view/Flow3/template/button");
+ arg.AddArg(L"stype",L"button");
+ arg.AddArg(L"datacolumn",L"buttonName");
+ arg.AddArg(L"displaycolumn",L"buttonName");
+ arg.AddArg(L"dwname",L"/sale/view/Flow3/template/button");
}
else
return 1;
- OpenWindow("dev:xpage[FlowTermSelect.vx]",cast(arg as int));
- comdid = arg.GetArgString("comdid");
+ OpenWindow(L"dev:xpage[FlowTermSelect.vx]",arg);
+ comdid = arg.GetArgString(L"comdid");
- if(comdid=="xmOk")
+ if(comdid==L"xmOk")
{
- data = arg.GetArgString("data");
- display = arg.GetArgString("display");
+ data = arg.GetArgString(L"data");
+ display = arg.GetArgString(L"display");
dw_list.SetItemDisplayString(row,colname,display);
dw_list.SetItemString(row,colname,data);
dw_list.Redraw();
@@ -271,40 +283,40 @@
int i = tab_1.GetSheetIndex();
xdwgrid dw_list = GetSheetDwgrid(i);
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.SetArg("stype",GetSheetType(i),"string");
- arg.SetArg("sdata","ddd","string");
- arg.SetArg("flowID",flowid,"string");
+ xaserverarg arg ;
+ ;
+ arg.SetArg(L"stype",GetSheetType(i),L"xstring");
+ arg.SetArg(L"sdata",L"ddd",L"xstring");
+ arg.SetArg(L"flowID",flowid,L"xstring");
int obj = cast(dw_list as int);
- arg.SetArg("dwobj",obj.toString(),"string");
- arg.SetArg("dwname",GetDwname(GetSheetType(i)),"string");
- OpenWindow("dev:xpage[FlowTermImport.vx]",cast(arg as int));
+ arg.SetArg(L"dwobj",obj.toString(),L"xstring");
+ arg.SetArg(L"dwname",GetDwname(GetSheetType(i)),L"xstring");
+ OpenWindow(L"dev:xpage[FlowTermImport.vx]",arg);
return 1;
}
int OnRetrieve()
{
- if(flowid=="") return 1;
+ if(flowid==L"") return 1;
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
+ xml x ;
+
+ xaserverarg arg ;
+ ;
//int i = tab_1.GetSheetIndex();
for(int i=0;i<7;i++)
{
//alert(i.toString());
- arg.SetArg("stype",GetSheetType(i),"string");
- arg.SetArg("sdata","ddd","string");
- arg.SetArg("flowID",flowid,"string");
+ arg.SetArg(L"stype",GetSheetType(i),L"xstring");
+ arg.SetArg(L"sdata",L"ddd",L"xstring");
+ arg.SetArg(L"flowID",flowid,L"xstring");
//trace(arg.GetString());
- if (getUrl("/sale/data/Flow3/retrieve/flowex",arg.GetString(),x)!=1)
+ if (getUrl(L"/sale/data/Flow3/retrieve/flowex",arg.GetString(),x)!=1)
{
- //trace(x.GetXmlDoc().text);
+ //trace(x.text());
//return -1;
continue;
}
@@ -316,14 +328,15 @@
return 1;
}
- int OnTreeSelChanged(ref TNotifyEvent evt,int p)
+ int OnTreeSelChanged(TEvent* evt, int p)
{
- ref NMTREEVIEW nmtv = cast(evt.pnmh as NMTREEVIEW);
- int hItem = nmtv.itemNew.hItem;
- msxml::IXMLDOMElement e = cast(tv_folder.GetItemData(hItem) as msxml::IXMLDOMElement);
- flowid = e.getAttribute("flowID");
+ NMTREEVIEW& nmtv = *(NMTREEVIEW*)evt->notify.pnmh;
+
+ HTREEITEM hItem = nmtv.itemNew.hItem;
+ KXMLDOMElement& e = *(KXMLDOMElement*)tv_1.GetItemData(hItem);
+ flowid = e.getAttribute(L"flowID");
- int hCursor = xutil::SetCursorWait();
+ HCURSOR hCursor = xutil::SetCursorWait();
SetFlowChart(e);
OnRetrieve();
xutil::RestoreCursor(hCursor);
@@ -331,70 +344,70 @@
return 1;
}
- int OnTabSelectSheet(ref TNotifyEvent evt,int p)
+ int OnTabSelectSheet(TEvent* evt, int p)
{
//OnRetrieve();
return 1;
}
- int SetFlowChart(msxml::IXMLDOMElement e)
+ int SetFlowChart(KXMLDOMElement e)
{
- string flowUrl = e.getAttribute("flowchart");
- xflowchart flowchart = GetControl("flowchart");
- xml f = new xml;
- f.setNativePointer(xml::CreateInstance());
- if(flowUrl != "")
+ xstring flowUrl = e.getAttribute(L"flowchart");
+ xflowchart flowchart = GetControl(L"flowchart");
+ xml f ;
+
+ if(flowUrl != L"")
{
- if(xaserver::FetchXml(flowUrl,"",f)==1)
+ if(xaserver::FetchXml(flowUrl,L"",f)==1)
{
- flowchart.LoadEx(f.GetXmlDoc().documentElement);
+ flowchart.LoadEx(f.documentElement());
}
}else
{
- f.LoadXml("<sheet/>");
- flowchart.LoadEx(f.GetXmlDoc().documentElement);
+ f.loadXML(L"<sheet/>");
+ flowchart.LoadEx(f.documentElement());
}
return 1;
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- if (comdid == "xmSave")
+ if (comdid == L"xmSave")
return OnSave();
- if (comdid == "xmAddrow")
+ if (comdid == L"xmAddrow")
return OnAddrow();
- if (comdid == "xmInsertrow")
+ if (comdid == L"xmInsertrow")
return OnInsertrow();
- if (comdid == "xmDeleterow")
+ if (comdid == L"xmDeleterow")
return OnDeleterow();
- if (comdid == "xmImport")
+ if (comdid == L"xmImport")
return OnImport();
return 0;
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&flow::OnXCommand);
//获取焦点事件,用于重置工具条
- AttachEvent("WM_SETFOCUS",OnSetFocus);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&flow::OnSetFocus);
- AttachEvent("tv_folder", "TVN_SELCHANGED",OnTreeSelChanged);
- AttachEvent("tab_1","LYSN_SELECTEDSHEET",OnTabSelectSheet);
- AttachEvent("dw_flow","DWV_CLICKED",OnClicked);
- AttachEvent("dw_buttonright","DWV_CLICKED",OnClicked);
- AttachEvent("dw_button","DWV_CLICKED",OnClicked);
- AttachEvent("dw_state","DWV_CLICKED",OnClicked);
+ AttachEvent(L"tv_folder", L"TVN_SELCHANGED", (FEvent)&flow::OnTreeSelChanged);
+ AttachEvent(L"tab_1",L"LYSN_SELECTEDSHEET", (FEvent)&flow::OnTabSelectSheet);
+ AttachEvent(L"dw_flow",L"DWV_CLICKED", (FEvent)&flow::OnClicked);
+ AttachEvent(L"dw_buttonright",L"DWV_CLICKED", (FEvent)&flow::OnClicked);
+ AttachEvent(L"dw_button",L"DWV_CLICKED", (FEvent)&flow::OnClicked);
+ AttachEvent(L"dw_state",L"DWV_CLICKED", (FEvent)&flow::OnClicked);
return 1;
}
@@ -402,18 +415,18 @@
int CreateFlowFloder()
{
- xml x = ViewObject::RetrieveData("/sale/data/flow3/flowfolder");
+ xml x = ViewObject::RetrieveData(L"/sale/data/flow3/flowfolder");
if(x)
{
- msxml::IXMLDOMNodeList nlist = x.GetXmlDoc().SelectNodes("//item");
- int len = nlist.length;
+ KXMLDOMNodeList nlist = x.selectNodes(L"//item");
+ int len = nlist.length();
int hItem = 0;
for (int i = 0; i < len; i++)
{
- msxml::IXMLDOMElement e = nlist.item(i);
- string name = e.getAttribute("flowName");
- string no = e.getAttribute("flowNo");
- string label = name;//no.trim() + " " + name;
+ KXMLDOMElement e = nlist.item(i);
+ xstring name = e.getAttribute(L"flowName");
+ xstring no = e.getAttribute(L"flowNo");
+ xstring label = name;//no.trim() + L" " + name;
int h= tv_folder.InsertChildItem(hItem,label, trust(e as int),22);
//tv_folder.SetItemChild(h,1);
}
@@ -424,28 +437,28 @@
int onload()
{
- flowid = "";
- tv_folder = GetControl("tv_folder");
+ flowid = L"";
+ tv_folder = GetControl(L"tv_folder");
CreateFlowFloder();
- tv_1 = GetControl("tv_1");
- tab_1 = GetControl("tab_1");
- dw_flow = GetControl("dw_flow");
- dw_flow.openUrl("/sale/view/Flow3/template/flow");
- dw_state = GetControl("dw_state");
- dw_state.openUrl("/sale/view/Flow3/template/state");
- dw_button = GetControl("dw_button");
- dw_button.openUrl("/sale/view/Flow3/template/button");
- dw_role = GetControl("dw_role");
- dw_role.openUrl("/sale/view/Flow3/template/role");
- dw_bill = GetControl("dw_bill");
- dw_bill.openUrl("/sale/view/Flow3/template/bill");
- dw_scene = GetControl("dw_scene");
- dw_scene.openUrl("/sale/view/Flow3/template/scene");
- dw_buttonright = GetControl("dw_buttonright");
- dw_buttonright.openUrl("/sale/view/Flow3/template/buttonright");
- dw_datafieldright = GetControl("dw_datafieldright");
- dw_datafieldright.openUrl("/sale/view/Flow3/template/datafieldright");
+ tv_1 = GetControl(L"tv_1");
+ tab_1 = GetControl(L"tab_1");
+ dw_flow = GetControl(L"dw_flow");
+ dw_flow.openUrl(L"/sale/view/Flow3/template/flow");
+ dw_state = GetControl(L"dw_state");
+ dw_state.openUrl(L"/sale/view/Flow3/template/state");
+ dw_button = GetControl(L"dw_button");
+ dw_button.openUrl(L"/sale/view/Flow3/template/button");
+ dw_role = GetControl(L"dw_role");
+ dw_role.openUrl(L"/sale/view/Flow3/template/role");
+ dw_bill = GetControl(L"dw_bill");
+ dw_bill.openUrl(L"/sale/view/Flow3/template/bill");
+ dw_scene = GetControl(L"dw_scene");
+ dw_scene.openUrl(L"/sale/view/Flow3/template/scene");
+ dw_buttonright = GetControl(L"dw_buttonright");
+ dw_buttonright.openUrl(L"/sale/view/Flow3/template/buttonright");
+ dw_datafieldright = GetControl(L"dw_datafieldright");
+ dw_datafieldright.openUrl(L"/sale/view/Flow3/template/datafieldright");
OnAttachEvent();
@@ -460,5 +473,4 @@
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/FlowTermImport.cpp b/jrj/project/business/SystemSettings/FlowTermImport.cpp
index 4579e84..13cdf5c 100644
--- a/jrj/project/business/SystemSettings/FlowTermImport.cpp
+++ b/jrj/project/business/SystemSettings/FlowTermImport.cpp
@@ -1,56 +1,71 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class FlowTermImport : public xframe
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) FlowTermImport : public xframe
{
+ public:
xdwgrid dw_list;
- string stype;
- string sdata;
- string flowid;
- string datacolumn;
- string displaycolumn;
+ xstring stype;
+ xstring sdata;
+ xstring flowid;
+ xstring datacolumn;
+ xstring displaycolumn;
xdwgrid dw_obj;
xnode m_agentNode; //Agent Condition
-
+ public:
+ FlowTermImport(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static FlowTermImport* CreateInstance(void* implPtr, void* hWnd)
+ {
+ FlowTermImport* pWin = new FlowTermImport(implPtr, (HWND)hWnd);
+ return pWin;
+ }
int SetAgent()
{
- string xfNodeAgentArea = "agentarea";
+ xstring xfNodeAgentArea = L"agentarea";
xnode anode = GetAgentNode(xfNodeAgentArea);
if(m_agentNode)
{
- SetAgentNodeContent (anode,m_agentNode);
+ SetAgentNode (anode,m_agentNode);
}
else
{
- msxml::IXMLDOMElement xframeElement = GetElement();
- msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*");
+ KXMLDOMElement xframeElement = GetElement();
+ KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*");
if(agent)
{
- string s = agent.xml;
- m_agentNode = SetAgentNodeContent (anode,s);
+ xstring s = agent.xml();
+ m_agentNode = SetAgentNode (anode,s);
}
}
return 1;
}
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
//SetAgent();
return 1;
}
- int OnOK(string comdid)
+ int OnOK(xstring comdid)
{
int row = dw_list.GetNextSelectRow(1);
if(row < 1 && dw_list.GetRowCount()==1) row = 1;
if (row<1)
{
- alert("请选择项!");
+ alert(L"请选择项!");
return 1;
}
@@ -60,9 +75,9 @@
int columnCount = dw_obj.GetColumnCount();
for(int i=1;i<=columnCount;i++)
{
- if(dw_list.GetColumnName(i)=="guid") continue;
+ if(dw_list.GetColumnName(i)==L"guid") continue;
dw_obj.SetItemString(nrow,i,dw_list.GetItemString(row,i));
- if(dw_list.GetItemDisplayString(row,i)!="")
+ if(dw_list.GetItemDisplayString(row,i)!=L"")
dw_obj.SetItemDisplayString(nrow,i,dw_list.GetItemDisplayString(row,i));
}
row = dw_list.GetNextSelectRow(row + 1);
@@ -73,14 +88,14 @@
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- if (comdid=="xmOk")
+ if (comdid==L"xmOk")
{
OnOK(comdid);
return 1;
}
- else if (comdid=="xmCancel")
+ else if (comdid==L"xmCancel")
{
CloseWindow();
return 1;
@@ -89,33 +104,34 @@
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&FlowTermImport::OnXCommand);
//获取焦点事件,用于重置工具条
- AttachEvent("WM_SETFOCUS",OnSetFocus);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&FlowTermImport::OnSetFocus);
+ return 1;
}
int OnRetrieve()
{
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
+ xml x ;
- arg.AddArg("stype",stype);
- arg.AddArg("sdata",sdata);
- arg.AddArg("flowID",flowid);
+ xaserverarg arg ;
+ ;
+
+ arg.AddArg(L"stype",stype);
+ arg.AddArg(L"sdata",sdata);
+ arg.AddArg(L"flowID",flowid);
- if (getUrl("/sale/data/Flow3/retrieve/flowimport",arg.GetString(),x)!=1)
+ if (getUrl(L"/sale/data/Flow3/retrieve/flowimport",arg.GetString(),x)!=1)
{
- trace(x.GetXmlDoc().text);
+ trace(x.text());
return -1;
}else
{
@@ -128,18 +144,18 @@
int onload()
{
-
- dw_list = GetControl("dw_list");
- //dw_list.openUrl("xxx");
- if(GetParam())
+ SetArg();
+ dw_list = GetControl(L"dw_list");
+ //dw_list.openUrl(L"xxx");
+ if(GetWinParam())
{
- xaserverarg arg = GetParam();
- stype = arg.GetArgString("stype");
- sdata = arg.GetArgString("sdata");
- flowid = arg.GetArgString("flowid");
+ xaserverarg arg = GetArg();
+ stype = arg.GetArgString(L"stype");
+ sdata = arg.GetArgString(L"sdata");
+ flowid = arg.GetArgString(L"flowid");
- string dwname = arg.GetArgString("dwname");
- int dwobj = arg.GetArgString("dwobj").toInt();
+ xstring dwname = arg.GetArgString(L"dwname");
+ int dwobj = arg.GetArgString(L"dwobj").toInt();
dw_obj = cast(dwobj as xdwgrid);
dw_list.openUrl(dwname);
@@ -158,5 +174,4 @@
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/FlowTermSelect.cpp b/jrj/project/business/SystemSettings/FlowTermSelect.cpp
index 29f7b09..ce9d2bb 100644
--- a/jrj/project/business/SystemSettings/FlowTermSelect.cpp
+++ b/jrj/project/business/SystemSettings/FlowTermSelect.cpp
@@ -1,70 +1,85 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class FlowTermSelect : public xframe
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) FlowTermSelect : public xframe
{
+ public:
xdwgrid dw_list;
- string stype;
- string sdata;
- string flowid;
- string datacolumn;
- string displaycolumn;
+ xstring stype;
+ xstring sdata;
+ xstring flowid;
+ xstring datacolumn;
+ xstring displaycolumn;
xnode m_agentNode; //Agent Condition
-
+ public:
+ FlowTermSelect(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static FlowTermSelect* CreateInstance(void* implPtr, void* hWnd)
+ {
+ FlowTermSelect* pWin = new FlowTermSelect(implPtr, (HWND)hWnd);
+ return pWin;
+ }
int SetAgent()
{
- string xfNodeAgentArea = "agentarea";
+ xstring xfNodeAgentArea = L"agentarea";
xnode anode = GetAgentNode(xfNodeAgentArea);
if(m_agentNode)
{
- SetAgentNodeContent (anode,m_agentNode);
+ SetAgentNode (anode,m_agentNode);
}
else
{
- msxml::IXMLDOMElement xframeElement = GetElement();
- msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*");
+ KXMLDOMElement xframeElement = GetElement();
+ KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*");
if(agent)
{
- string s = agent.xml;
- m_agentNode = SetAgentNodeContent (anode,s);
+ xstring s = agent.xml();
+ m_agentNode = SetAgentNode (anode,s);
}
}
return 1;
}
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
//SetAgent();
return 1;
}
- int OnOK(string comdid)
+ int OnOK(xstring comdid)
{
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg = GetParam();
- arg.AddArg("comdid",comdid);
+ xaserverarg arg ;
+ arg = GetArg();
+
+ arg.AddArg(L"comdid",comdid);
int row = dw_list.GetNextSelectRow(1);
if(row < 1 && dw_list.GetRowCount()==1) row = 1;
if (row<1)
{
- alert("请选择项!");
+ alert(L"请选择项!");
return 1;
}
while (row>0)
{
- msxml::IXMLDOMElement e = dw_list.GetRowElement(row);
- string data = e.selectSingleNode(datacolumn).text+"";
- string display = e.selectSingleNode(displaycolumn).text+"";
- arg.AddArg("data",data);
- arg.AddArg("display",display);
+ KXMLDOMElement e = dw_list.GetRowElement(row);
+ xstring data = e.selectSingleNode(datacolumn).text()+(xstring)L"";
+ xstring display = e.selectSingleNode(displaycolumn).text()+ (xstring)L"";
+ arg.AddArg(L"data",data);
+ arg.AddArg(L"display",display);
row = dw_list.GetNextSelectRow(row + 1);
}
CloseWindow();
@@ -72,14 +87,14 @@
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- if (comdid=="xmOk")
+ if (comdid==L"xmOk")
{
OnOK(comdid);
return 1;
}
- else if (comdid=="xmCancel")
+ else if (comdid==L"xmCancel")
{
CloseWindow();
return 1;
@@ -88,33 +103,34 @@
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&FlowTermSelect::OnXCommand);
//获取焦点事件,用于重置工具条
- AttachEvent("WM_SETFOCUS",OnSetFocus);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&FlowTermSelect::OnSetFocus);
+ return 1;
}
int OnRetrieve()
{
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
+ xml x ;
- arg.AddArg("stype",stype);
- arg.AddArg("sdata",sdata);
- arg.AddArg("flowID",flowid);
+ xaserverarg arg ;
+ ;
+
+ arg.AddArg(L"stype",stype);
+ arg.AddArg(L"sdata",sdata);
+ arg.AddArg(L"flowID",flowid);
- if (getUrl("/sale/data/Flow3/retrieve/flowex",arg.GetString(),x)!=1)
+ if (getUrl(L"/sale/data/Flow3/retrieve/flowex",arg.GetString(),x)!=1)
{
- trace(x.GetXmlDoc().text);
+ trace(x.text());
return -1;
}else
{
@@ -127,20 +143,20 @@
int onload()
{
-
- dw_list = GetControl("dw_list");
- //dw_list.openUrl("xxx");
- if(GetParam())
+ SetArg();
+ dw_list = GetControl(L"dw_list");
+ //dw_list.openUrl(L"xxx");
+ if(GetWinParam())
{
- xaserverarg arg = GetParam();
- stype = arg.GetArgString("stype");
- sdata = arg.GetArgString("sdata");
- flowid = arg.GetArgString("flowid");
+ xaserverarg arg = GetArg();
+ stype = arg.GetArgString(L"stype");
+ sdata = arg.GetArgString(L"sdata");
+ flowid = arg.GetArgString(L"flowid");
- datacolumn = arg.GetArgString("datacolumn");
- displaycolumn = arg.GetArgString("displaycolumn");
+ datacolumn = arg.GetArgString(L"datacolumn");
+ displaycolumn = arg.GetArgString(L"displaycolumn");
- string dwname = arg.GetArgString("dwname");
+ xstring dwname = arg.GetArgString(L"dwname");
dw_list.openUrl(dwname);
OnRetrieve();
dw_list.SetSelectionMode(1);
@@ -157,5 +173,4 @@
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/LogList.cpp b/jrj/project/business/SystemSettings/LogList.cpp
index f781cf6..07f77fb 100644
--- a/jrj/project/business/SystemSettings/LogList.cpp
+++ b/jrj/project/business/SystemSettings/LogList.cpp
@@ -1,41 +1,56 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class ViewLogList : public xwin
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) ViewLogList : public xwin
{
+ public:
xdwgrid dw_list;
xoffice dw_office;
xcell dw_cell;
xnode m_agentNode; //Agent Condition
- string m_category;
- string argStr;
- string searchStr;
-
+ xstring m_category;
+ xstring argStr;
+ xstring searchStr;
+ public:
+ ViewLogList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {}
+ public:
+ static ViewLogList* CreateInstance(void* implPtr, void* hWnd)
+ {
+ ViewLogList* pWin = new ViewLogList(implPtr, (HWND)hWnd);
+ return pWin;
+ }
int SetAgent()
{
- string xfNodeAgentArea = "agentarea";
+ xstring xfNodeAgentArea = L"agentarea";
xnode anode = GetAgentNode(xfNodeAgentArea);
if(m_agentNode)
{
- SetAgentNodeContent (anode,m_agentNode);
+ SetAgentNode (anode,m_agentNode);
}
else
{
- msxml::IXMLDOMElement xframeElement = GetElement();
- msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*");
+ KXMLDOMElement xframeElement = GetElement();
+ KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*");
if(agent)
{
- string s = agent.xml;
- m_agentNode = SetAgentNodeContent (anode,s);
+ xstring s = agent.xml();
+ m_agentNode = SetAgentNode (anode,s);
}
}
return 1;
}
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
SetAgent();
@@ -43,63 +58,62 @@
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- int hCursor = 0;
- if(comdid=="xmQuery")
+ HCURSOR hCursor = 0;
+ if(comdid==L"xmQuery")
{
- xaserverarg ar = new xaserverarg;
- ar.setNativePointer(ar.CreateInstance());
- ar.AddArg("argurl","/sale/view/Total3/arg/LogListItem");
- if(argStr !="")
- ar.AddArg("arg",argStr);
- OpenWindow("dev:xpage[view.total.arg.vx]",cast(ar as int));
- string arstr = ar.GetArgString("arg");
- if(arstr != "" && ar.GetArgString("action")=="ok")
+ xaserverarg ar ;
+
+ ar.AddArg(L"argurl",L"/sale/view/Total3/arg/LogListItem");
+ if(argStr !=L"")
+ ar.AddArg(L"arg",argStr);
+ OpenWindow(L"dev:xpage[view.total.arg.vx]",ar);
+ xstring arstr = ar.GetArgString(L"arg");
+ if(arstr != L"" && ar.GetArgString(L"action")==L"ok")
{
argStr = arstr;
hCursor = xutil::SetCursorWait();
- OnRetrieve("/sale/data/Total3/total/GDNTotal/Item/LogList",argStr);
+ OnRetrieve(L"/sale/data/Total3/total/GDNTotal/Item/LogList",argStr);
xutil::RestoreCursor(hCursor);
}
else
{
- argStr="";
- OnRetrieve("/sale/data/Total3/total/GDNTotal/Item/LogList",argStr);
+ argStr=L"";
+ OnRetrieve(L"/sale/data/Total3/total/GDNTotal/Item/LogList",argStr);
}
return 1;
}
- if(comdid=="xmAnalysis")
+ if(comdid==L"xmAnalysis")
{
hCursor = xutil::SetCursorWait();
- string str = dw_list.DataAnalysis("");
- xaserverarg arg=new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("html", str);
- int obj = cast(dw_list as int);
- arg.AddArg("obj",obj.toString());
- OpenWindow("dev:xpage[data.vanalysis.vx]", cast(arg as int));
+ xstring str = dw_list.DataAnalysis(L"");
+ xaserverarg arg;
+ ;
+ arg.AddArg(L"html", str);
+
+ OpenWindow(L"dev:xpage[data.vanalysis.vx]", arg);
xutil::RestoreCursor(hCursor);
return 1;
}
- if(comdid=="xmSearch") return OnSearch();
+ if(comdid==L"xmSearch") return OnSearch();
return 0;
}
int OnSearch()
{
- xaserverarg arg=new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("text", searchStr);
- OpenWindow("dev:xpage[search.dialog.vx]", cast(arg as int));
- string str = arg.GetArgString("text");
+ xaserverarg arg;
+ ;
+ arg.AddArg(L"text", searchStr);
+ OpenWindow(L"dev:xpage[search.dialog.vx]", arg);
+ xstring str = arg.GetArgString(L"text");
if(str != searchStr)
{
searchStr = str;
- dw_list.Filter("*",searchStr);
+ dw_list.Filter(L"*",searchStr);
return 1;
}
return 1;
@@ -107,16 +121,16 @@
- int OnCombboChanged(ref TCommandEvent evt,int lParam)
+ int OnCombboChanged(TEvent* evt, LPARAM lParam)
{
- int h = xcombobox::GetCurSel(evt.hCtrl);
+ int h = xcombobox::GetCurSel(evt->command.hCtrl);
if(h > -1)
{
- int hCursor = xutil::SetCursorWait();
- msxml::IXMLDOMElement e = xcombobox::GetItemData(evt.hCtrl, h);
+ HCURSOR hCursor = xutil::SetCursorWait();
+ KXMLDOMElement e = xcombobox::GetItemData(evt->command.hCtrl, h);
- win32::PostMessage(GetHWND(),0x401,"xmQuery",0);
- //OnCmdDispatch("xmQuery");
+ PostMessage(GetHWND(),0x401,(LPARAM)L"xmQuery",0);
+ //OnCmdDispatch(L"xmQuery");
xutil::RestoreCursor(hCursor);
}
return 1;
@@ -125,16 +139,16 @@
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
- int OnDWClick(ref TNotifyEvent evt,int p)
+ int OnDWClick(TEvent* evt, int p)
{
- ref DWNMHDR hdr = trust(evt.pnmh as ref DWNMHDR);
- string value = hdr.data;
- string colname = hdr.colname;
+ DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
+ xstring value = hdr.data;
+ xstring colname = hdr.colname;
int row = hdr.row;
if(row < 1) return 1;
@@ -145,32 +159,33 @@
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&ViewLogList::OnXCommand);
//获取焦点事件,用于重置工具条
- AttachEvent("WM_SETFOCUS",OnSetFocus);
- AttachEvent("cb_report","CBN_SELCHANGE",OnCombboChanged);
- AttachEvent("dw_report","DWV_CLICKED",OnDWClick);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewLogList::OnSetFocus);
+ AttachEvent(L"cb_report",L"CBN_SELCHANGE", (FEvent)&ViewLogList::OnCombboChanged);
+ AttachEvent(L"dw_report",L"DWV_CLICKED", (FEvent)&ViewLogList::OnDWClick);
+ return 1;
}
- int OnRetrieve(string dataurl, string argstr)
+ int OnRetrieve(xstring dataurl, xstring argstr)
{
dw_list.Reset();
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("arg",argstr);
+ xml x ;
+
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"arg",argstr);
//alert(argstr);
- if (url::get(dataurl,arg.GetString(),x)!=1)
+ if (xurl::get(dataurl,arg.GetString(),x)!=1)
{
- //alert(x.GetXml());
- trace(x.GetXmlDoc().text);
+ //alert(x.xml());
+ trace(x.text());
dw_list.Redraw();
return -1;
}
- //alert(x.GetXml());
+ //alert(x.xml());
dw_list.Retrieve(x);
dw_list.Redraw();
dw_list.SetReadOnly(true);
@@ -180,13 +195,13 @@
int onload()
{
- dw_list = GetControl("dw_report");
- dw_office = GetControl("dw_office");
- dw_cell = GetControl("dw_cell");
- dw_list.openUrl("/sale/view/Total3/template/business/gdn/LogList/ship/full");
+ dw_list = GetControl(L"dw_report");
+ dw_office = GetControl(L"dw_office");
+ dw_cell = GetControl(L"dw_cell");
+ dw_list.openUrl(L"/sale/view/Total3/template/business/gdn/LogList/ship/full");
- argStr ="";
- xcombobox xc = GetControl("cb_report");
+ argStr =L"";
+ xcombobox xc = GetControl(L"cb_report");
OnAttachEvent();
@@ -196,8 +211,7 @@
int onloaded()
{
SetAgent();
- OnCmdDispatch("xmQuery");
+ OnCmdDispatch(L"xmQuery");
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/SysLoginRecord.cpp b/jrj/project/business/SystemSettings/SysLoginRecord.cpp
index 64f2570..72012a6 100644
--- a/jrj/project/business/SystemSettings/SysLoginRecord.cpp
+++ b/jrj/project/business/SystemSettings/SysLoginRecord.cpp
@@ -1,77 +1,90 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
-use "base.view.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit vbusiness
-[
- class SysLoginRecord : public frame
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) SysLoginRecord : public xframe
{
+ public:
xdwgrid dw_logrecord;
xdwtable dw_arg;
+ public:
+ SysLoginRecord(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static SysLoginRecord* CreateInstance(void* implPtr, void* hWnd)
+ {
+ SysLoginRecord* pWin = new SysLoginRecord(implPtr, (HWND)hWnd);
+ return pWin;
+ }
int OnRetrieve()
{
- xcontrol xc_text =GetControl("QueryTxt");
- xcontrol xc_cbx = GetControl("cbx_type");
- string ls_querytxt;
- string ls_querytype;
+ xcontrol xc_text =GetControl(L"QueryTxt");
+ xcontrol xc_cbx = GetControl(L"cbx_type");
+ xstring ls_querytxt;
+ xstring ls_querytype;
ls_querytxt = xc_text.GetText();
ls_querytype = xc_cbx.GetText();
- xml x = new xml;
- x.setNativePointer(x.CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("sType",ls_querytype);
- arg.AddArg("QueryText",ls_querytxt);
- arg.AddArg("QueryArg",GetQueryArg());
+ xml x ;
+ xaserverarg arg ;
+ arg.AddArg(L"sType",ls_querytype);
+ arg.AddArg(L"QueryText",ls_querytxt);
+ arg.AddArg(L"QueryArg",GetQueryArg());
//alert(ls_querytxt);
- if (url::get("/sale/data/Total3/total/GDNTotal/Item/GetSysLoginLog",arg.GetString(),x) == 1)
+ if (xurl::get(L"/sale/data/Total3/total/GDNTotal/Item/GetSysLoginLog",arg.GetString(),x) == 1)
{
- //trace(x.GetXml());
+ //trace(x.xml());
dw_logrecord.Retrieve(x);
dw_logrecord.Redraw();
dw_logrecord.SetSelectionMode(1);
}
else
- alert("查不到");
+ alert(L"查不到");
return 1;
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- int hCursor = xutil::SetCursorWait();
- if(comdid=="ContSearch")
+ HCURSOR hCursor = xutil::SetCursorWait();
+ if(comdid==L"ContSearch")
OnRetrieve();
return 0;
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int p)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
- string GetQueryArg()
+ xstring GetQueryArg()
{
dw_arg.AcceptText();
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
- dw_arg.DwUpdateAllTo(x.GetXmlDoc());
- return x.GetXml();
+ xml x ;
+
+ dw_arg.DwUpdateAllTo(x);
+ return x.xml();
}
int OnAttachEvent()
{
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&SysLoginRecord::OnXCommand);
return 1;
}
int onload()
{
- dw_logrecord = GetControl("dw_logrecord");
- dw_logrecord.openUrl("/sale/view/SysUser/template/SysLoginRecord");
- dw_arg = GetControl("dw_arg");
- dw_arg.openUrl("/sale/view/AR/template/queryarg");
+ dw_logrecord = GetControl(L"dw_logrecord");
+ dw_logrecord.openUrl(L"/sale/view/SysUser/template/SysLoginRecord");
+ dw_arg = GetControl(L"dw_arg");
+ dw_arg.openUrl(L"/sale/view/AR/template/queryarg");
dw_arg.SetColHeaderHeight(0);
dw_arg.SetRowSelectorWidth(0);
dw_arg.SetHScrollState(false);
@@ -80,10 +93,9 @@
}
int onloaded()
{
- //alert("xxx");
+ //alert(L"xxx");
OnAttachEvent();
//OnRetrieve();
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/TestRetrieveing.cpp b/jrj/project/business/SystemSettings/TestRetrieveing.cpp
index 65769bf..d61909f 100644
--- a/jrj/project/business/SystemSettings/TestRetrieveing.cpp
+++ b/jrj/project/business/SystemSettings/TestRetrieveing.cpp
@@ -1,25 +1,40 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class TestRetrieveingWin: public xframe
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) TestRetrieveingWin: public xframe
{
+ public:
//xdwgrid dw_list;
xnode m_agentNode; //Agent Condition
-
+ public:
+ TestRetrieveingWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static TestRetrieveingWin* CreateInstance(void* implPtr, void* hWnd)
+ {
+ TestRetrieveingWin* pWin = new TestRetrieveingWin(implPtr, (HWND)hWnd);
+ return pWin;
+ }
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
return 1;
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- if(comdid=="RetrieveFinished")
+ if(comdid==L"RetrieveFinished")
{
CloseWindow();
return 1;
@@ -28,17 +43,18 @@
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&TestRetrieveingWin::OnXCommand);
//获取焦点事件,用于重置工具条
- AttachEvent("WM_SETFOCUS",OnSetFocus);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&TestRetrieveingWin::OnSetFocus);
+ return 1;
}
int onload()
@@ -48,5 +64,4 @@
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/UserPassDlg.cpp b/jrj/project/business/SystemSettings/UserPassDlg.cpp
index 92aeffc..2dc14b5 100644
--- a/jrj/project/business/SystemSettings/UserPassDlg.cpp
+++ b/jrj/project/business/SystemSettings/UserPassDlg.cpp
@@ -1,38 +1,54 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class UserPassDlg : public xframe
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) UserPassDlg : public xframe
{
+ public:
//xdwgrid dw_list;
xnode m_agentNode; //Agent Condition
- static string MD5(string) native from "XUtil.dll" alias "?MD5@IXFUtil@XFrame@Hxsoft@@SAPA_WPA_W@Z";
+ static xstring MD5(xstring) native from "XUtil.dll" alias "?MD5@IXFUtil@XFrame@Hxsoft@@SAPA_WPA_W@Z";
+ public:
+ UserPassDlg(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static UserPassDlg* CreateInstance(void* implPtr, void* hWnd)
+ {
+ UserPassDlg* pWin = new UserPassDlg(implPtr, (HWND)hWnd);
+ return pWin;
+ }
int SetAgent()
{
- string xfNodeAgentArea = "agentarea";
+ xstring xfNodeAgentArea = L"agentarea";
xnode anode = GetAgentNode(xfNodeAgentArea);
if(m_agentNode)
{
- SetAgentNodeContent (anode,m_agentNode);
+ SetAgentNode (anode,m_agentNode);
}
else
{
- msxml::IXMLDOMElement xframeElement = GetElement();
- msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*");
+ KXMLDOMElement xframeElement = GetElement();
+ KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*");
if(agent)
{
- string s = agent.xml;
- m_agentNode = SetAgentNodeContent (anode,s);
+ xstring s = agent.xml();
+ m_agentNode = SetAgentNode (anode,s);
}
}
return 1;
}
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
SetAgent();
@@ -40,53 +56,53 @@
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- if(comdid=="xmCancel")
+ if(comdid==L"xmCancel")
{
CloseWindow();
return 1;
}
- else if(comdid=="xmOk")
+ else if(comdid==L"xmOk")
{
- if(GetControl("old_pass").GetText()=="")
+ if(xcontrol(GetControl(L"old_pass")).GetText()==L"")
{
- alert("请输入旧口令!");
- win32::SetFocus(GetControl("old_pass").GetId());
+ alert(L"请输入旧口令!");
+ SetFocus(xcontrol(GetControl(L"old_pass")).GetId());
return 1;
}
- string ostr = GetControl("old_pass").GetText();
- string str1 = GetControl("new_pass").GetText();
- string str2 = GetControl("new_pass1").GetText();
+ xstring ostr = xcontrol(GetControl(L"old_pass")).GetText();
+ xstring str1 = xcontrol(GetControl(L"new_pass")).GetText();
+ xstring str2 = xcontrol(GetControl(L"new_pass1")).GetText();
if(str1 != str2)
{
- alert("两遍新口令不一致!");
- win32::SetFocus(GetControl("new_pass1").GetId());
+ alert(L"两遍新口令不一致!");
+ SetFocus(xcontrol(GetControl(L"new_pass1")).GetId());
return 1;
}
- string oldpass = MD5(ostr);
- string newpass = MD5(str1);
+ xstring oldpass = MD5(ostr);
+ xstring newpass = MD5(str1);
- xml x=new xml;
- x.setNativePointer(x.CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("old_password",oldpass);
- arg.AddArg("new_password",newpass);
+ xml x;
- if(getUrl("/sale/data/SysUser/update/password",arg.GetString(),x)!=1)
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"old_password",oldpass);
+ arg.AddArg(L"new_password",newpass);
+
+ if(getUrl(L"/sale/data/SysUser/update/password",arg.GetString(),x)!=1)
{
- alert("修改失败");
+ alert(L"修改失败");
}
else{
- if(x.GetXmlDoc().selectSingleNode("error"))
+ if(x.selectSingleNode(L"error"))
{
- alert(x.GetXmlDoc().selectSingleNode("error").text);
+ alert(x.selectSingleNode(L"error").text());
return 1;
}
- win32::MessageBox(GetHWND(),"修改口令成功!","提示",0);
+ MessageBox(GetHWND(),L"修改口令成功!",L"提示",0);
CloseWindow();
}
return 1;
@@ -95,26 +111,27 @@
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&UserPassDlg::OnXCommand);
//获取焦点事件,用于重置工具条
- AttachEvent("WM_SETFOCUS",OnSetFocus);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&UserPassDlg::OnSetFocus);
+ return 1;
}
int onload()
{
//const int EM_SETPASSWORDCHAR =0x00CC;
- //win32::SendMessage(GetControl("old_pass").GetId(),EM_SETPASSWORDCHAR,42,0);
- //win32::SendMessage(GetControl("new_pass").GetId(),EM_SETPASSWORDCHAR,42,0);
- //win32::SendMessage(GetControl("new_pass1").GetId(),EM_SETPASSWORDCHAR,42,0);
+ //win32::SendMessage(GetControl(L"old_pass").GetId(),EM_SETPASSWORDCHAR,42,0);
+ //win32::SendMessage(GetControl(L"new_pass").GetId(),EM_SETPASSWORDCHAR,42,0);
+ //win32::SendMessage(GetControl(L"new_pass1").GetId(),EM_SETPASSWORDCHAR,42,0);
OnAttachEvent();
@@ -127,5 +144,4 @@
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/level.Customer.v3.cpp b/jrj/project/business/SystemSettings/level.Customer.v3.cpp
index a3615e3..9326ae6 100644
--- a/jrj/project/business/SystemSettings/level.Customer.v3.cpp
+++ b/jrj/project/business/SystemSettings/level.Customer.v3.cpp
@@ -1,45 +1,60 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
-class levelCustomerv3 : public listwin
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+class __declspec(dllexport) levelCustomerv3 : public listwin
{
+public:
xdwgrid dw_goods;
xtreeview tv_1;
xcombobox ddlb_1;
int changeddlb;
- string m_sType; //type
- string m_sTypeTxt; //选中树的data
-// string m_searchtxt;
+ xstring m_sType; //type
+ xstring m_sTypeTxt; //选中树的data
+// xstring m_searchtxt;
int PIndex;
xnode m_agentNode; //Agent Condition
- string m_agentCond; //Agent Node
+ xstring m_agentCond; //Agent Node
-
+public:
+ levelCustomerv3(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {}
+public:
+ static levelCustomerv3* CreateInstance(void* implPtr, void* hWnd)
+ {
+ levelCustomerv3* pWin = new levelCustomerv3(implPtr, (HWND)hWnd);
+ return pWin;
+ }
int OnPreRetrieve()
{
- xml x = new xml;
- x.setNativePointer(xml ::CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("pageindex", PIndex.toString()); //第几页
- arg.AddArg("pagenumber", m_pageNumber.toString()); //每页数量
- arg.AddArg("QueryTxt",m_QueryTxt );
- arg.AddArg("sType", m_sType);//没有参数
- arg.AddArg("sTypeTxt", m_sTypeTxt);//没有参数
+ xml x ;
- if(getUrl("/sale/data/"+GetEntityName(1)+"/entity/list",arg.GetString(),x)!=1)
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"pageindex", xstring(PIndex)); //第几页
+ arg.AddArg(L"pagenumber", xstring(m_pageNumber)); //每页数量
+ arg.AddArg(L"QueryTxt",m_QueryTxt );
+ arg.AddArg(L"sType", m_sType);//没有参数
+ arg.AddArg(L"sTypeTxt", m_sTypeTxt);//没有参数
+
+ if(getUrl(L"/sale/data/"+GetEntityName(1)+L"/entity/list",arg.GetString(),x)!=1)
{
- alert("出现错误请联系管理员!");
+ alert(L"出现错误请联系管理员!");
return 0;
}else
{
- msxml::IXMLDOMElement e=x.GetXmlDoc().documentElement;
- if(listwin::dw_pages.ptr_native_ && e.selectSingleNode("@TotalPage"))
+ KXMLDOMElement e=x.documentElement();
+ if(listwin::dw_pages.ptr_native_ && e.selectSingleNode(L"@TotalPage"))
{
- string s=e.selectSingleNode("@TotalPage").text; //总数量
+ xstring s=e.selectSingleNode(L"@TotalPage").text(); //总数量
listwin::dw_pages.SetMaxPage(s.toInt());
}
listwin::dw_list.Retrieve(x);
@@ -49,22 +64,23 @@
return 1;
}
- int OnChangePages(ref TNotifyEvent evt,int p)
+ int OnChangePages(TEvent* evt, int p)
{
- ref PAGENMHDR h = evt.pnmh;
+ PAGENMHDR& h = *(PAGENMHDR*)evt->notify.pnmh;
+
int c = h.cur;
- int hCursor = xutil::SetCursorWait();
+ HCURSOR hCursor = xutil::SetCursorWait();
OnRetrieve();
PIndex=c;
xutil::RestoreCursor(hCursor);
return 1;
}
- int ViewUpdate(int pr,string updateItem,xaserverarg arg)
+ int ViewUpdate(int pr,xstring updateItem,xaserverarg arg)
{
- if(updateItem == "refresh")
+ if(updateItem == L"refresh")
{
- xdwpages zz = this.GetControl("pages");
+ xdwpages zz = GetControl(L"pages");
int h = zz.SetCurPage(1);
OnRetrieve();
}
@@ -72,20 +88,20 @@
}
//树选择
- int OnTreeSelChanged(ref TNotifyEvent evt,int p)
+ int OnTreeSelChanged(TEvent* evt, int p)
{
if (changeddlb != 1)
{
- int wid = tv_1.GetId();
- int h=xtreeview::GetSelectedItem(wid);
- msxml::IXMLDOMElement e = xtreeview::GetItemData(wid,h);
- string t = e.SelectSingleNode("@type").text;
- m_sType=t+"";
- string txt = e.SelectSingleNode("@code").text;
- if (txt == "")
- txt = e.SelectSingleNode("@name").text;
- m_sTypeTxt= txt+"";
+ HTREEITEM h=tv_1.GetSelectedItem();
+ KXMLDOMElement e = tv_1.GetItemData(h);
+
+ xstring t = e.selectSingleNode(L"@type").text();
+ m_sType=t+L"";
+ xstring txt = e.selectSingleNode(L"@code").text();
+ if (txt == L"")
+ txt = e.selectSingleNode(L"@name").text();
+ m_sTypeTxt= txt+L"";
PIndex= 1;
OnRetrieve();
@@ -93,53 +109,55 @@
return 1;
}
- int createSubTree(int wid,int h, msxml::IXMLDOMElement ele)
+ int createSubTree(HTREEITEM h, KXMLDOMElement ele)
{
- msxml::IXMLDOMNodeList nlist=ele.SelectNodes("item");
+ KXMLDOMNodeList nlist=ele.selectNodes(L"item");
int i;
- int s=nlist.length;
+ int s=nlist.length();
if (s>0)
for (i=0; i<s; i++)
{
- msxml::IXMLDOMElement e=nlist.item(i);
- string name=e.SelectSingleNode("@name").text;
- int hw=xtreeview::InsertChildItem(wid,h,name,trust(e as int),15);
- createSubTree(wid,hw, e);
+ KXMLDOMElement* e = new KXMLDOMElement(nlist.item(i));
+ xstring name = e->selectSingleNode(L"@name").text();
+ HTREEITEM hw = tv_1.InsertChildItem(h, name, (LPARAM)e, 15);
+ createSubTree(hw, *e);
}
return 1;
}
- int OnCreateTree(string sType)
+
+ int OnCreateTree(xstring sType)
{
- int wid = tv_1.GetId();
- while (xtreeview::GetRootItem(wid)>0)
- xtreeview::DeleteItem(wid,xtreeview::GetRootItem(wid));
- xml x = new xml;
- x.setNativePointer(x.CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("sType",sType);
- if(getUrl("/sale/data/"+GetEntityName(1)+"/pref/list/tree",arg.GetString(),x)!=1)
+ while (tv_1.GetRootItem()>0)
+ tv_1.DeleteItem(tv_1.GetRootItem());
+
+ xml x ;
+
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"sType",sType);
+ if(getUrl(L"/sale/data/"+GetEntityName(1)+L"/pref/list/tree",arg.GetString(),x)!=1)
{
- trace(x.GetXmlDoc().text);
+ trace(x.text());
return -1;
}else
{
- msxml::IXMLDOMNodeList nlist=x.GetXmlDoc().SelectNodes("root/item");
- int len = nlist.length;
+ KXMLDOMNodeList nlist=x.selectNodes(L"root/item");
+ int len = nlist.length();
if (len >0)
{
int i;
for (i=0;i <len; i++)
{
- msxml::IXMLDOMElement e = nlist.item(i);
- string name = e.SelectSingleNode("@name").text;
- int h = xtreeview::InsertChildItem(wid,0,name,trust(e as int),15);
- createSubTree(wid,h,e);
- xtreeview::ExpandItem(wid,h);
+ KXMLDOMElement* e = new KXMLDOMElement(nlist.item(i));
+ xstring name = e->selectSingleNode(L"@name").text();
+ HTREEITEM hw = tv_1.InsertChildItem(0, name, (LPARAM)e, 15);
+
+ createSubTree(hw, *e);
+ tv_1.ExpandItem(hw);
}
- xtreeview::ExpandItem(wid,0);
+ tv_1.ExpandItem(0);
}
}
@@ -147,17 +165,17 @@
}
//xcombobox下拉
- int OnSelectDdlb(ref TNotifyEvent evt,int p)
+ int OnSelectDdlb(TEvent* evt, int p)
{
- changeddlb=1;
- int wid = ddlb_1.GetId();
- int CB_GETCURSEL = 0x0147;
- int nIndex = win32::SendMessage(wid,CB_GETCURSEL,0,0);
- msxml::IXMLDOMElement e = ddlb_1.GetElement();
- msxml::IXMLDOMElement e2 = e.selectSingleNode("item["+(nIndex+1).toString()+"]");
- string text=e2.selectSingleNode("@element").text;
+ changeddlb = 1;
+
+ int CB_GETCURSEL = 0x0147;
+ int nIndex = SendMessageW(ddlb_1.GetHWND(), CB_GETCURSEL, 0, 0);
+ KXMLDOMElement e = ddlb_1.GetElement();//GetitemData(wid,nIndex);//ddlb_1.GetElement();
+ KXMLDOMElement e2 = e.selectSingleNode(L"item[" + xstring((nIndex + 1)) + L"]");
+ xstring text = e2.selectSingleNode(L"@element").text();
OnCreateTree(text);
- changeddlb=0;
+ changeddlb = 0;
return 1;
}
@@ -171,20 +189,20 @@
}
}
- msxml::IXMLDOMElement e = listwin::dw_list.GetRowElement(row);
- string sguid = e.SelectSingleNode("@guid").text;
- string sName = e.selectSingleNode("Name").text+"";
+ KXMLDOMElement e = listwin::dw_list.GetRowElement(row);
+ xstring sguid = e.selectSingleNode(L"@guid").text();
+ xstring sName = e.selectSingleNode(L"Name").text()+(xstring)L"";
int MB_YESNO = 0x00000004;
int IDYES = 6;
- if(win32::MessageBox(GetHWND(),"确认要删除客户 "+sName+" 的信息吗?","提示",MB_YESNO)!=IDYES) return 1;
- xml x = new xml;
- x.setNativePointer(x.CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("guid",sguid);
- if (url::post("/sale/data/"+GetEntityName(1)+"/entity/delete",arg.GetString(),x) != 1)
+ if(MessageBox(GetHWND(),L"确认要删除客户 "+sName+L" 的信息吗?",L"提示",MB_YESNO)!=IDYES) return 1;
+ xml x ;
+
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"guid",sguid);
+ if (xurl::post(L"/sale/data/"+GetEntityName(1)+L"/entity/delete",arg.GetString(),x) != 1)
{
- string error = x.GetXmlDoc().text;
+ xstring error = x.text();
trace(error);
}
else
@@ -203,7 +221,7 @@
return 1;
}
- int OnRClick(ref TNotifyEvent evt,int p)
+ int OnRClick(TEvent* evt, int p)
{
return 1;
}
@@ -214,66 +232,66 @@
//设置层级弹出窗与保存
int OnLevelCustomer()
{
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- OpenWindow("dev:xpage[maint.Level.Customer3.vx]", cast(arg as int));
+ xaserverarg arg ;
+ ;
+ OpenWindow(L"dev:xpage[maint.Level.Customer3.vx]", arg);
- xml ux = new xml;
- ux.setNativePointer(ux.CreateInstance());
- ux.LoadXml("<Partys/>");
- msxml::IXMLDOMElement ele = ux.GetXmlDoc().documentElement;
+ xml ux ;
+
+ ux.loadXML(L"<Partys/>");
+ KXMLDOMElement ele = ux.documentElement();
- if(arg.GetArgString("ok")=="true")
+ if(arg.GetArgString(L"ok")==L"true")
{
- xml x = new xml;
- x.setNativePointer(x.CreateInstance());
- x.LoadXml(arg.GetArgString("arg"));
- msxml::IXMLDOMElement uele = x.GetXmlDoc().documentElement;
- string ParentPartyID = uele.selectSingleNode("//ParentPartyID").text;
- string ParentPartyName = "";
- string GroupPartyID = uele.selectSingleNode("//GroupPartyID").text;
- string GroupPartyName = "";
+ xml x ;
- if( uele.selectSingleNode("//ParentPartyID/@_displaystring"))
- ParentPartyName = uele.selectSingleNode("//ParentPartyID/@_displaystring").text;
- if(uele.selectSingleNode("//GroupPartyID/@_displaystring"))
- GroupPartyName = uele.selectSingleNode("//GroupPartyID/@_displaystring").text;
+ x.loadXML(arg.GetArgString(L"arg"));
+ KXMLDOMElement uele = x.documentElement();
+ xstring ParentPartyID = uele.selectSingleNode(L"//ParentPartyID").text();
+ xstring ParentPartyName = L"";
+ xstring GroupPartyID = uele.selectSingleNode(L"//GroupPartyID").text();
+ xstring GroupPartyName = L"";
+
+ if( uele.selectSingleNode(L"//ParentPartyID/@_displaystring"))
+ ParentPartyName = uele.selectSingleNode(L"//ParentPartyID/@_displaystring").text();
+ if(uele.selectSingleNode(L"//GroupPartyID/@_displaystring"))
+ GroupPartyName = uele.selectSingleNode(L"//GroupPartyID/@_displaystring").text();
int row = dw_list.GetNextSelectRow(1);
while(row > 0)
{
- dw_list.SetItemString(row,"ParentPartyID",ParentPartyID);
- dw_list.SetItemDisplayString(row,"ParentPartyID",ParentPartyName);
- dw_list.SetItemString(row,"GroupPartyID",GroupPartyID);
- dw_list.SetItemDisplayString(row,"GroupPartyID",GroupPartyName);
+ dw_list.SetItemString(row,L"ParentPartyID",ParentPartyID);
+ dw_list.SetItemDisplayString(row,L"ParentPartyID",ParentPartyName);
+ dw_list.SetItemString(row,L"GroupPartyID",GroupPartyID);
+ dw_list.SetItemDisplayString(row,L"GroupPartyID",GroupPartyName);
ele.appendChild(dw_list.GetRowElement(row).cloneNode(-1));
row = dw_list.GetNextSelectRow(row + 1);
}
- dw_list.RedrawEx();
- arg.AddArg("content",ele.xml);
- if (getUrl("/sale/data/CustomerV3/level/update",arg.GetString(),x)!=1)
+ dw_list.Redraw();
+ arg.AddArg(L"content",ele.xml());
+ if (getUrl(L"/sale/data/CustomerV3/level/update",arg.GetString(),x)!=1)
{
- trace(x.GetXmlDoc().text);
- alert("设置错误!");
+ trace(x.text());
+ alert(L"设置错误!");
return -1;
}else
{
- alert("设置成功!");
+ alert(L"设置成功!");
}
}
return 1;
}
- int PreOnCmdDispatch(string comdid)
+ int PreOnCmdDispatch(xstring comdid)
{
- if(comdid.find("action:LogOff",0)>=0) return OnLogOff();
- if(comdid.find("action:bill.delete",0)>=0) return OnDeleteRow();
- //if(comdid=="action:search1") return GridSearch();
- if(comdid=="action:bill.refresh")
+ if(comdid.find(L"action:LogOff",0)>=0) return OnLogOff();
+ if(comdid.find(L"action:bill.delete",0)>=0) return OnDeleteRow();
+ //if(comdid==L"action:search1") return GridSearch();
+ if(comdid==L"action:bill.refresh")
{
return OnRetrieve();
}
- if(comdid=="action:level.customer")
+ if(comdid==L"action:level.customer")
{
return OnLevelCustomer();
}
@@ -281,21 +299,20 @@
return 1;
}
- int OnRowChangedEx(ref TNotifyEvent evt,int p)
+ int OnRowChangedEx(TEvent* evt, int p)
{
- alert("999");
- ref DWNMHDR hdr =cast(evt.pnmh as ref DWNMHDR);
+ DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
int row = hdr.row;
- msxml::IXMLDOMElement ele = listwin::dw_list.GetRowElement(row);
- string entity = ele.selectSingleNode("CustomerID").text;
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("EntityID",entity);
- if (getUrl("/sale/data/CustomerV3/entity/customeritem",arg.GetString(),x)!=1)
+ KXMLDOMElement ele = listwin::dw_list.GetRowElement(row);
+ xstring entity = ele.selectSingleNode(L"CustomerID").text();
+ xml x ;
+
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"EntityID",entity);
+ if (getUrl(L"/sale/data/CustomerV3/entity/customeritem",arg.GetString(),x)!=1)
{
- trace(x.GetXmlDoc().text);
+ trace(x.text());
return -1;
}else
{
@@ -310,12 +327,12 @@
int PostOnAttachEvent()
{
//获得树的选择事件
- AttachEvent("tv_1", "TVN_SELCHANGED",OnTreeSelChanged);
- AttachEvent("cbx_1","CBN_SELCHANGE",OnSelectDdlb);
- AttachEvent("pages","PAGE_CLICK",OnChangePages);
- AttachEvent("dw_list","DWV_RCLICKED",OnRClick);//鼠标右键
- //AttachEvent("dw_list","DWV_CLICKED",OnClick);//鼠标右键
- AttachEvent("dw_list","DWV_ROWFOCUSCHANGED",OnRowChangedEx);
+ AttachEvent(L"tv_1", L"TVN_SELCHANGED", (FEvent)&levelCustomerv3::OnTreeSelChanged);
+ AttachEvent(L"cbx_1",L"CBN_SELCHANGE", (FEvent)&levelCustomerv3::OnSelectDdlb);
+ AttachEvent(L"pages",L"PAGE_CLICK", (FEvent)&levelCustomerv3::OnChangePages);
+ AttachEvent(L"dw_list",L"DWV_RCLICKED", (FEvent)&levelCustomerv3::OnRClick);//鼠标右键
+ //AttachEvent(L"dw_list",L"DWV_CLICKED",OnClick);//鼠标右键
+ AttachEvent(L"dw_list",L"DWV_ROWFOCUSCHANGED", (FEvent)&levelCustomerv3::OnRowChangedEx);
return 1;
}
@@ -323,19 +340,19 @@
int onload()
{
PIndex=1;
- listwin::m_QueryTxt =""; //查询条件
- m_sType=""; //type
- m_sTypeTxt=""; //选中树的data
+ listwin::m_QueryTxt =L""; //查询条件
+ m_sType=L""; //type
+ m_sTypeTxt=L""; //选中树的data
listwin::onload();
- tv_1 = this.GetControl("tv_1");
- ddlb_1 = this.GetControl("cbx_1");
+ tv_1 = GetControl(L"tv_1");
+ ddlb_1 = GetControl(L"cbx_1");
changeddlb = 0;
- OnCreateTree("Source");
- dw_goods = GetControl("dw_goods");
- dw_goods.openUrl("/sale/view/CustomerV3/template/customer/customeritem");
+ OnCreateTree(L"Source");
+ dw_goods = GetControl(L"dw_goods");
+ dw_goods.openUrl(L"/sale/view/CustomerV3/template/customer/customeritem");
return 1;
}
@@ -344,16 +361,15 @@
{
listwin::onloaded();
- string EntityID;
+ xstring EntityID;
int row = dw_list.GetRow();
- if(row<0 || row>dw_list.GetRowCount()) return "";
- msxml::IXMLDOMElement ele = dw_list.GetRowElement(row);
- string id = listwin::m_configDoc.selectSingleNode("//entity/EntityID[1]").text;
+ if(row<0 || row>dw_list.GetRowCount()) return (xstring)L"";
+ KXMLDOMElement ele = dw_list.GetRowElement(row);
+ xstring id = listwin::m_configDoc.selectSingleNode(L"//entity/EntityID[1]").text();
if(ele.selectSingleNode(id))
- EntityID = ele.selectSingleNode(id).text;
+ EntityID = ele.selectSingleNode(id).text();
return 1;
}
-};
-]
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/maint.Level.Customer3.cpp b/jrj/project/business/SystemSettings/maint.Level.Customer3.cpp
index 3938f6f..4416535 100644
--- a/jrj/project/business/SystemSettings/maint.Level.Customer3.cpp
+++ b/jrj/project/business/SystemSettings/maint.Level.Customer3.cpp
@@ -1,35 +1,50 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class MaintLevelCustomerWin : public xframe
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) MaintLevelCustomerWin : public xframe
{
+ public:
xdwtable dw_arg;
xaserverarg arg;
-
- //命令发布函数
- int OnCmdDispatch(string comdid)
+ public:
+ MaintLevelCustomerWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static MaintLevelCustomerWin* CreateInstance(void* implPtr, void* hWnd)
{
- if(comdid=="xmOk")
+ MaintLevelCustomerWin* pWin = new MaintLevelCustomerWin(implPtr, (HWND)hWnd);
+ return pWin;
+ }
+ //命令发布函数
+ int OnCmdDispatch(xstring comdid)
+ {
+ if(comdid==L"xmOk")
{
- xml x = new xml;
- x.setNativePointer(x.CreateInstance());
+ xml x ;
+
dw_arg.AcceptText();
- dw_arg.DwUpdateAllTo(x.GetXmlDoc());
+ dw_arg.DwUpdateAllTo(x);
if(arg)
{
- arg.AddArg("arg",x.GetXml());
- arg.AddArg("ok","true");
+ arg.AddArg(L"arg",x.xml());
+ arg.AddArg(L"ok",L"true");
}
CloseWindow();
return 1;
}
- else if(comdid=="xmCancel")
+ else if(comdid==L"xmCancel")
{
- if(arg)arg.AddArg("ok","false");
+ if(arg)arg.AddArg(L"ok",L"false");
CloseWindow();
return 1;
}
@@ -37,24 +52,26 @@
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&MaintLevelCustomerWin::OnXCommand);
+ return 1;
}
int onload()
{
- dw_arg = GetControl("dw_arg");
+ SetArg();
+ dw_arg = GetControl(L"dw_arg");
- if(GetParam())arg = GetParam();
+ if(GetWinParam())arg = GetArg();
- string dw = "/sale/view/CustomerV3/template/customer/level.maint";
+ xstring dw = L"/sale/view/CustomerV3/template/customer/level.maint";
dw_arg.openUrl(dw);
dw_arg.SetColHeaderHeight(0);
@@ -69,4 +86,3 @@
}
};
-]
\ No newline at end of file
diff --git a/jrj/project/business/SystemSettings/view.assignadjust.cpp b/jrj/project/business/SystemSettings/view.assignadjust.cpp
index f11d11a..326e9c8 100644
--- a/jrj/project/business/SystemSettings/view.assignadjust.cpp
+++ b/jrj/project/business/SystemSettings/view.assignadjust.cpp
@@ -1,37 +1,49 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
-use "base.view.vd"
-use "datastore_bind.vd"
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+#include <wobject/xdouble.hpp>
+#include <xcontrol/xlayersheet.hpp>
+#include <xcontrol/xdatetimepick.hpp>
-unit trade
-[
- class AssignAdjustWin : public xframe
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) AssignAdjustWin : public xframe
{
+ public:
xdwgrid dw_list;
xnode m_agentNode; //Agent Condition
- msxml::IXMLDOMElement rptEle;
- string argStr;
- string searchStr;
+ KXMLDOMElement rptEle;
+ xstring argStr;
+ xstring searchStr;
int hWndRetrieveTip;
bool dataretrieveing;
-
+ public:
+ AssignAdjustWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static AssignAdjustWin* CreateInstance(void* implPtr, void* hWnd)
+ {
+ AssignAdjustWin* pWin = new AssignAdjustWin(implPtr, (HWND)hWnd);
+ return pWin;
+ }
int SetAgent()
{
- string xfNodeAgentArea = "agentarea";
+ xstring xfNodeAgentArea = L"agentarea";
xnode anode = GetAgentNode(xfNodeAgentArea);
if(m_agentNode)
{
- SetAgentNodeContent (anode,m_agentNode);
+ SetAgentNode (anode,m_agentNode);
}
else
{
- msxml::IXMLDOMElement xframeElement = GetElement();
- msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*");
+ KXMLDOMElement xframeElement = GetElement();
+ KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*");
if(agent)
{
- string s = agent.xml;
- m_agentNode = SetAgentNodeContent (anode,s);
+ xstring s = agent.xml();
+ m_agentNode = SetAgentNode (anode,s);
}
}
return 1;
@@ -39,40 +51,40 @@
int OnSave()
{
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
+ xml x ;
+
dw_list.AcceptText();
- dw_list.DwUpdateAllToEx(x.GetXmlDoc());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(xaserverarg::CreateInstance());
+ dw_list.DwUpdateAllToEx(x);
+ xaserverarg arg ;
+
- xml x0 = ViewObject::MakeXml();
- x0.LoadXml("<data/>");
- msxml::IXMLDOMNodeList t = x.GetXmlDoc().selectNodes("data/node()[(@update.new='1') or (@update.modify='1') or (@update.delete='1') ]");
- msxml::IXMLDOMElement e1= x0.GetXmlDoc().documentElement;
+ xml x0;
+ x0.loadXML(L"<data/>");
+ KXMLDOMNodeList t = x.selectNodes(L"data/node()[(@update.new='1') or (@update.modify='1') or (@update.delete='1') ]");
+ KXMLDOMElement e1= x0.documentElement();
- string val0 = x.GetXml();
- for(int i=0; i < t.length; i++)
+ xstring val0 = x.xml();
+ for(int i=0; i < t.length(); i++)
{
- msxml::IXMLDOMElement e= t.item(i);
+ KXMLDOMElement e= t.item(i);
e1.appendChild(e);
}
- x = ViewObject::RetrieveData(rptEle.getAttribute("update"),"content",x0.GetXml());
- string str = x.GetXmlDoc().documentElement.getAttribute("text");
- if(str == "true")
+ x = ViewObject::RetrieveData(rptEle.getAttribute(L"update"),L"content",x0.xml());
+ xstring str = x.documentElement().getAttribute(L"text");
+ if(str == L"true")
{
dw_list.ResetUpdateStatus();
- alert("保存成功!");
+ alert(L"保存成功!");
}else
{
- alert("保存失败!");
+ alert(L"保存失败!");
}
return 1;
}
//焦点激活处理函数
- int OnSetFocus(ref TEvent evt,int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//重置工具条
SetAgent();
@@ -83,13 +95,13 @@
{
dw_list.AcceptText();
int row = dw_list.GetNextSelectRow(1);
- string SalespersonID = dw_list.GetItemString(row, "SalespersonID");
- string Sales = dw_list.GetItemDisplayString(row, "SalespersonID");
+ xstring SalespersonID = dw_list.GetItemString(row, L"SalespersonID");
+ xstring Sales = dw_list.GetItemDisplayString(row, L"SalespersonID");
while(row > 0 && row <= dw_list.GetRowCount())
{
row = dw_list.GetNextSelectRow(row + 1);
- dw_list.SetItemString(row, "SalespersonID", SalespersonID);
- dw_list.SetItemDisplayString(row, "SalespersonID", Sales);
+ dw_list.SetItemString(row, L"SalespersonID", SalespersonID);
+ dw_list.SetItemDisplayString(row, L"SalespersonID", Sales);
}
dw_list.Redraw();
@@ -98,63 +110,62 @@
int OnSearch()
{
- xaserverarg arg=new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("text", searchStr);
- OpenWindow("dev:xpage[search.dialog.vx]", cast(arg as int));
- string str = arg.GetArgString("text");
+ xaserverarg arg;
+ ;
+ arg.AddArg(L"text", searchStr);
+ OpenWindow(L"dev:xpage[search.dialog.vx]", arg);
+ xstring str = arg.GetArgString(L"text");
if(str != searchStr)
{
searchStr = str;
- dw_list.Filter("*",searchStr);
+ dw_list.Filter(L"*",searchStr);
return 1;
}
return 1;
}
//命令发布函数
- int OnCmdDispatch(string comdid)
+ int OnCmdDispatch(xstring comdid)
{
- if(comdid=="xmSave")return OnSave();
- if(comdid=="xmMultiDeal")return OnMultiDeal();
- if(comdid=="xmSearch") return OnSearch();
- if(comdid=="xmAnalysis")
+ if(comdid==L"xmSave")return OnSave();
+ if(comdid==L"xmMultiDeal")return OnMultiDeal();
+ if(comdid==L"xmSearch") return OnSearch();
+ if(comdid==L"xmAnalysis")
{
//hCursor = xutil::SetCursorWait();
- string str = dw_list.DataAnalysis("");
- xaserverarg arg=new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("html", str);
- int obj = cast(dw_list as int);
- arg.AddArg("obj",obj.toString());
- OpenWindow("dev:xpage[data.vanalysis.vx]", cast(arg as int));
+ xstring str = dw_list.DataAnalysis(L"");
+ xaserverarg arg;
+ ;
+ arg.AddArg(L"html", str);
+
+ OpenWindow(L"dev:xpage[data.vanalysis.vx]", arg);
//xutil::RestoreCursor(hCursor);
return 1;
}
- if(comdid=="xmQuery")
+ if(comdid==L"xmQuery")
{
if(rptEle)
{
- string argUrl = rptEle.getAttribute("arg");
- if(argUrl !="")
+ xstring argUrl = rptEle.getAttribute(L"arg");
+ if(argUrl !=L"")
{
- xaserverarg ar = new xaserverarg;
- ar.setNativePointer(ar.CreateInstance());
- ar.AddArg("argurl",argUrl);
- if(argStr !="")
- ar.AddArg("arg",argStr);
- OpenWindow("dev:xpage[view.total.arg.vx]",cast(ar as int));
- string arstr = ar.GetArgString("arg");
- if(arstr != "" && ar.GetArgString("action")=="ok")
+ xaserverarg ar ;
+
+ ar.AddArg(L"argurl",argUrl);
+ if(argStr !=L"")
+ ar.AddArg(L"arg",argStr);
+ OpenWindow(L"dev:xpage[view.total.arg.vx]",ar);
+ xstring arstr = ar.GetArgString(L"arg");
+ if(arstr != L"" && ar.GetArgString(L"action")==L"ok")
{
argStr = arstr;
- OnRetrieve(rptEle.getAttribute("data"),argStr);
+ OnRetrieve(rptEle.getAttribute(L"data"),argStr);
}
}
else
{
- argStr="";
- OnRetrieve(rptEle.getAttribute("data"),argStr);
+ argStr=L"";
+ OnRetrieve(rptEle.getAttribute(L"data"),argStr);
}
}
return 1;
@@ -163,32 +174,33 @@
}
//命令处理事件
- int OnXCommand(ref TXCommandEvent evt,int param)
+ int OnXCommand(TEvent* evt, LPARAM param)
{
- return OnCmdDispatch(evt.pStrID);
+ return OnCmdDispatch(evt->xcommand.pStrID);
}
int OnAttachEvent()
{
//绑定工具条点击事件
- AttachEvent("WM_XCOMMAND",OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&AssignAdjustWin::OnXCommand);
//获取焦点事件,用于重置工具条
- AttachEvent("WM_SETFOCUS",OnSetFocus);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&AssignAdjustWin::OnSetFocus);
- AttachEvent("cb_report","CBN_SELCHANGE",OnCombboChanged);
+ AttachEvent(L"cb_report",L"CBN_SELCHANGE", (FEvent)&AssignAdjustWin::OnCombboChanged);
+ return 1;
}
- int OnCombboChanged(ref TCommandEvent evt,int lParam)
+ int OnCombboChanged(TEvent* evt, LPARAM lParam)
{
- int h = xcombobox::GetCurSel(evt.hCtrl);
+ int h = xcombobox::GetCurSel(evt->command.hCtrl);
if(h > -1) ShowList(h);
return 1;
}
- int SwitchReport(msxml::IXMLDOMElement e)
+ int SwitchReport(KXMLDOMElement e)
{
rptEle = e;
- string dwname = e.getAttribute("template");
+ xstring dwname = e.getAttribute(L"template");
dw_list.openUrl(dwname);
dw_list.Redraw();
return 1;
@@ -196,43 +208,43 @@
int ShowList(int h)
{
- msxml::IXMLDOMElement xframeElement = GetElement();
- msxml::IXMLDOMElement e = xframeElement.selectSingleNode("//xcombobox[@name='cb_report']/item["+(h+1).toString()+"]");
+ KXMLDOMElement xframeElement = GetElement();
+ KXMLDOMElement e = xframeElement.selectSingleNode(L"//xcombobox[@name='cb_report']/item["+(h+1).toString()+L"]");
if(e) SwitchReport(e);
- win32::PostMessage(GetHWND(),0x401,"xmQuery",0);
+ PostMessage(GetHWND(),0x401,(LPARAM)L"xmQuery",0);
return 1;
}
int ShowRetrieveingTip()
{
dataretrieveing = true;
- xwin pwin = OpenWindow("dev:xpage[TestRetrieveing.vx]",0);
+ xwin pwin = OpenWindow(L"dev:xpage[TestRetrieveing.vx]",0);
hWndRetrieveTip =pwin.GetHWND();
return 1;
}
int CloseRetrieveTip()
{
dataretrieveing = false;
- win32::SendMessage(hWndRetrieveTip,0x401,"RetrieveFinished",0);
+ SendMessage(hWndRetrieveTip,0x401, (LPARAM)L"RetrieveFinished",0);
hWndRetrieveTip = 0;
return 1;
}
- int OnRetrieve(string dataurl, string argstr)
+ int OnRetrieve(xstring dataurl, xstring argstr)
{
if(!rptEle) return 0;
dw_list.Reset();
- xml x = new xml;
- x.setNativePointer(xml::CreateInstance());
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg("arg",argstr);
- if (url::get(dataurl,arg.GetString(),x)!=1)
+ xml x ;
+
+ xaserverarg arg ;
+ ;
+ arg.AddArg(L"arg",argstr);
+ if (xurl::get(dataurl,arg.GetString(),x)!=1)
{
- trace("错误信息="+x.GetXmlDoc().text);
+ trace(L"错误信息=L"+(xstring)x.text());
dw_list.Redraw();
return -1;
}else
@@ -248,7 +260,7 @@
int onload()
{
rptEle = 0;
- dw_list = GetControl("dw_list");
+ dw_list = GetControl(L"dw_list");
OnAttachEvent();
hWndRetrieveTip = 0;
@@ -263,5 +275,4 @@
return 1;
}
- };
-]
\ No newline at end of file
+ };
\ No newline at end of file
--
Gitblit v1.9.3