From 3d5183450ce30a21c5e89e3ec9b45c553372036e Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期四, 31 十月 2024 16:55:08 +0800
Subject: [PATCH] update
---
jrj/project/business/Enquiry/ViewPictures.cpp | 96 ++++++++++++++++++++++++++---------------------
1 files changed, 53 insertions(+), 43 deletions(-)
diff --git a/jrj/project/business/Enquiry/ViewPictures.cpp b/jrj/project/business/Enquiry/ViewPictures.cpp
index 7601ad7..677bffd 100644
--- a/jrj/project/business/Enquiry/ViewPictures.cpp
+++ b/jrj/project/business/Enquiry/ViewPictures.cpp
@@ -1,19 +1,31 @@
-use "xcontrol.vframe.vbusiness.vd"
-use "xbase.vframe.vbusiness.vd"
-use "multi.vbind.vbind.wface.vd"
-use "productlibrary.vd"
-use "shoppingcart.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>
+#include <xcontrol/ximageview.hpp>
-unit trade
-[
- class ViewPictures : public frame
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+ class __declspec(dllexport) ViewPictures : public xframe
{
- msxml::IXMLDOMElement imageElement;
- string m_customer;
-
- int OnCmdDispatch(string comdid)
+ public:
+ KXMLDOMElement imageElement;
+ xstring m_customer;
+ public:
+ ViewPictures(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static ViewPictures* CreateInstance(void* implPtr, void* hWnd)
{
- if (comdid == "xmClose")
+ ViewPictures* pWin = new ViewPictures(implPtr, (HWND)hWnd);
+ return pWin;
+ }
+ int OnCmdDispatch(xstring comdid)
+ {
+ if (comdid == L"xmClose")
{
CloseWindow();
return 1;
@@ -21,47 +33,47 @@
return 0;
}
- int OnXCommand(ref TXCommandEvent evt, int p)
+ 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)&ViewPictures::OnXCommand);
return 1;
}
- int OnShowImage(string skuid)
+ int OnShowImage(xstring skuid)
{
- imageview im = GetControl("im1");
+ ximageview im = GetControl(L"im1");
//im.RemoveImage();
- im.ResetEx();
+ im.Reset();
- xml xp = new xml;
- xp.setNativePointer(xml::CreateInstance());
- xaserverarg arg_pic = new xaserverarg;
- arg_pic.setNativePointer(arg_pic.CreateInstance());
- arg_pic.AddArg("SKUID", skuid);
- if (url::get("/sale/data/ProductLibrary3/pref/picture/imagelistSKU", arg_pic.GetString(), xp) != 1)
+ xml xp ;
+
+ xaserverarg arg_pic;
+
+ arg_pic.AddArg(L"SKUID", skuid);
+ if (xurl::get(L"/sale/data/ProductLibrary3/pref/picture/imagelistSKU", arg_pic.GetString(), xp) != 1)
{
- trace("xxx", xp.GetXml());
+ trace(L"error:" + xstring(xp.xml(), true));
}
else
{
- trace(skuid + "===== " + xp.GetXml());
- imageElement = xp.GetXmlDoc().documentElement;
- msxml::IXMLDOMNodeList nlistp = xp.GetXmlDoc().selectNodes("ImageList/image");
- int lenp = nlistp.length;
+ trace(skuid + L"===== L" + xp.xml());
+ imageElement = xp.documentElement();
+ KXMLDOMNodeList nlistp = xp.selectNodes(L"ImageList/image");
+ int lenp = nlistp.length();
for (int ip = 0; ip < lenp; ip++)
{
- msxml::IXMLDOMElement xitem = nlistp.item(ip);
- string picname = xitem.selectSingleNode("PicPath").text;
- string goodno = xitem.selectSingleNode("GoodsNo").text;
- if (picname == "/business/products/Thumbs//")
- picname = "/business/products/Thumbs/00/00000000-0000-0000-0000-000000000000.jpg";
- im.AddImages(picname, "");
+ KXMLDOMElement xitem = nlistp.item(ip);
+ xstring picname = xitem.selectSingleNode(L"PicPath").text();
+ xstring goodno = xitem.selectSingleNode(L"GoodsNo").text();
+ if (picname == L"/business/products/Thumbs//")
+ picname = L"/business/products/Thumbs/00/00000000-0000-0000-0000-000000000000.jpg";
+ im.AddImages(picname, L"");
}
im.Redraw();
//win32::SendMessage(im.GetId(),0x000f,0,1);
@@ -72,15 +84,13 @@
int onload()
{
+ SetArg();
OnAttachEvent();
- xaserverarg arg = new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- int p = GetParam();
- arg.setNativePointer(p);
- string skuid = arg.GetArgString("guid");
- string customerItemNo = arg.GetArgString("CustomerItemNo");
+ xaserverarg arg= GetArg();
+
+ xstring skuid = arg.GetArgString(L"guid");
+ xstring customerItemNo = arg.GetArgString(L"CustomerItemNo");
OnShowImage(skuid);
return 1;
}
};
-]
\ No newline at end of file
--
Gitblit v1.9.3