From e5283a4d5114c95a43b0096f562e53a665b0c4e7 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 18 七月 2024 15:57:49 +0800
Subject: [PATCH] update quote
---
jrj/project/business/SO/Product.Select.SO.cpp | 48 +++++++++++++++++++-----------------------------
1 files changed, 19 insertions(+), 29 deletions(-)
diff --git a/jrj/project/business/SO/Product.Select.SO.cpp b/jrj/project/business/SO/Product.Select.SO.cpp
index 90126fe..42a24f9 100644
--- a/jrj/project/business/SO/Product.Select.SO.cpp
+++ b/jrj/project/business/SO/Product.Select.SO.cpp
@@ -17,7 +17,7 @@
class __declspec(dllexport) ProductSelectSOWin : public xwin
{
public:
- int hObject = 0;
+ HWND hObject = 0;
xstring CustomerID;
xstring CustomerName;
@@ -528,7 +528,7 @@
int ItemMaint()
{
HTREEITEM hItem = tv_folder.GetSelectedItem();
- KXMLDOMElement& e = *(KXMLDOMElement*)tv_folder.GetItemData(hItem);
+ KXMLDOMElement& e = tv_folder.GetItemData(hItem);
//xstring no = e.getAttribute(L"no");
//if(no==L"") return 1;
xstring guid = e.getAttribute(L"guid");
@@ -556,7 +556,7 @@
HTREEITEM hItem = tv_folder.GetSelectedItem();
- KXMLDOMElement& e = *(KXMLDOMElement*)tv_folder.GetItemData(hItem);
+ KXMLDOMElement& e = tv_folder.GetItemData(hItem);
//alert(e.xml);
@@ -672,7 +672,7 @@
dw_list.Redraw();
impStr = L"";
- SendMessageW(hObject, 0x401, ls_nos, 0);
+ SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0);
alert(L"转入完成!");
return 1;
}
@@ -833,7 +833,7 @@
}
else if (comdid == L"xmRertieve")
{
- int hItem1 = tv_folder.GetSelectedItem();
+ HTREEITEM hItem1 = tv_folder.GetSelectedItem();
KXMLDOMElement e2 = tv_folder.GetItemData(hItem1);
xstring no1 = e2.getAttribute(L"no");
xml x2 = vcontrol::RetrieveData(L"/sale/data/SO/goods/usergoods/listex1", L"parent", no1);
@@ -1035,7 +1035,7 @@
xcontrol query = GetControl(L"sl_search");
xstring queryString = query.GetText();
-
+ xshtml xs;
if (name == L"购物车")
{
if (agentFor != L"goodscar")SwitchLayer(L"goodscarsheet", L"sheetframe");
@@ -1043,7 +1043,8 @@
if (selectname != name)
{
- KXMLDOMElement e1 = cast(tv_folder.GetItemData(hItem) as KXMLDOMElement);
+
+ KXMLDOMElement& e1 = tv_folder.GetItemData(hItem);
xstring str = e1.getAttribute(L"no");
if (str.find(L"Customer1:") == 0 || str.find(L"Customer:") == 0 || str.find(L"SO:") == 0 || str.find(L"Quote:") == 0)
{
@@ -1104,7 +1105,7 @@
no = e.getAttribute(L"guid");
}
- dw_list.SetDataObject(ProductLibraryView::GetMaintListForm3(no).GetXmlDoc());
+ dw_list.SetDataObject(ProductLibraryView::GetMaintListForm3(no).xml());
dw_list = GetControl(L"dw_list");
dw_list.SetReadOnly(true);
@@ -1197,7 +1198,7 @@
int row = hdr.row;
xstring col = hdr.colname;
- xstring str = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"QuoteLineID");
+ xstring str = dwc_list.GetItemString(row, L"QuoteLineID");
if (str != L"")
str = L"ql:" + str;
else if (dwc_list.GetItemString(row, L"SKUNo") != L"")
@@ -1224,8 +1225,8 @@
DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
int row = hdr.row;
xstring ls_nos = L"ImportXml:";
- xstring str = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"SOLineID");
- xstring str1 = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"EnquiryPriceListID");
+ xstring str = dwc_list.GetItemString(row, L"SOLineID");
+ xstring str1 =dwc_list.GetItemString(row, L"EnquiryPriceListID");
if (str1 != L"")
str += L"el:" + str1;
else if (str != L"")
@@ -1241,7 +1242,7 @@
dw_list.Redraw();
dwc_list.Redraw();
impStr = L"";
- win32::SendMessage(hObject, 0x401, ls_nos, 0);
+ SendMessageW(hObject, 0x401, (LPARAM)ls_nos, 0);
xutil::RestoreCursor(hCursor);
CloseWindow();
@@ -1264,10 +1265,12 @@
AttachEvent(L"dwc_list", L"DWV_CLICKED", (FEvent)&ProductSelectSOWin::OnDwcClicked);
AttachEvent(L"dwc_list", L"DWV_DOUBLECLICKED", (FEvent)&ProductSelectSOWin::OnImport);
+ return 1;
}
int onload()
{
+ SetArg();
agentFor = L"goodslib";
OnAttachEvent();
@@ -1276,29 +1279,18 @@
dw_list = GetControl(L"dw_list");
dwc_list = GetControl(L"dwc_list");
- xaserverarg arg;
+ xaserverarg arg = GetArg();
CustomerID = L"";
CustomerName = L"";
hObject = 0;
if (arg)
{
- hObject = (int)arg.GetArgString(L"HWND");
+ hObject = (HWND)arg.GetParam(L"HWND");
CustomerID = arg.GetArgString(L"CustomerID");
}
InitialFolder();
- g_xdoc_product = new xdataset;
- g_xdoc_product.Init();
- xbind bindproduct = new xbind;
- bindproduct.bindEx(dw_list, g_xdoc_product, L"");
-
- g_xdoc_shoppingcart = new xdataset;
- g_xdoc_shoppingcart.Init();
-
- xbind bindcart = new xbind;
- bindcart.bindEx(dwc_list, g_xdoc_shoppingcart, L"");
-
- dw_list.SetDataObject(ProductLibraryView::GetMaintListForm3(L"").GetXmlDoc());
+ dw_list.SetDataObject(ProductLibraryView::GetMaintListForm3(L"").xml());
dw_list = GetControl(L"dw_list");
dw_list.SetReadOnly(true);
@@ -1311,9 +1303,7 @@
xs.SetContent(makeHtml(1));
}
- //xtreeview::ExpandItem(tv_folder.GetId(),
- // xtreeview::GetNextItem(tv_folder.GetId(),xtreeview::GetRootItem(tv_folder.GetId())));
- xtreeview::ExpandItem(tv_folder.GetId(), xtreeview::GetRootItem(tv_folder.GetId()));
+ tv_folder.ExpandItem(tv_folder.GetRootItem());
dw_list.SetSelectionMode(3);
dwc_list.SetSelectionMode(3);
--
Gitblit v1.9.3