| | |
| | | class __declspec(dllexport) ProductSelectSOWin : public xwin |
| | | { |
| | | public: |
| | | int hObject = 0; |
| | | HWND hObject = 0; |
| | | xstring CustomerID; |
| | | xstring CustomerName; |
| | | |
| | |
| | | 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"); |
| | |
| | | |
| | | HTREEITEM hItem = tv_folder.GetSelectedItem(); |
| | | |
| | | KXMLDOMElement& e = *(KXMLDOMElement*)tv_folder.GetItemData(hItem); |
| | | KXMLDOMElement& e = tv_folder.GetItemData(hItem); |
| | | |
| | | |
| | | //alert(e.xml); |
| | |
| | | dw_list.Redraw(); |
| | | impStr = L""; |
| | | |
| | | SendMessage(hObject, 0x401, ls_nos, 0); |
| | | SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0); |
| | | alert(L"转入完成!"); |
| | | return 1; |
| | | } |
| | |
| | | if (selectname != name) |
| | | { |
| | | |
| | | KXMLDOMElement& e1 = *(KXMLDOMElement*)tv_folder.GetItemData(hItem); |
| | | 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) |
| | | { |
| | |
| | | dwc_list.openUrl(L"/sale/view/ProductLibrary/template/cart/goodssolist"); |
| | | } |
| | | dwc_list.SetReadOnly(true); |
| | | trace(str + L"+++++L" + queryString); |
| | | g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(str, queryString)); |
| | | |
| | | } |
| | |
| | | int OnDwcClicked(TEvent* evt, LPARAM p) |
| | | { |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | char ch; |
| | | 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"") |
| | |
| | | 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 = dw_list.GetItemString(row, L"SOLineID"); |
| | | xstring str1 =dw_list.GetItemString(row, L"EnquiryPriceListID"); |
| | | if (str1 != L"") |
| | | str += L"el:" + str1; |
| | | else if (str != L"") |
| | | str = L"sl:" + str; |
| | | else if (dwc_list.GetItemString(row, L"SKUNo") != L"") |
| | | str = dwc_list.GetItemString(row, L"SKUNo"); |
| | | else if (dw_list.GetItemString(row, L"SKUNo") != L"") |
| | | str = dw_list.GetItemString(row, L"SKUNo"); |
| | | else |
| | | str = dwc_list.GetItemString(row, L"No"); |
| | | str = dw_list.GetItemString(row, L"No"); |
| | | ls_nos += str; |
| | | |
| | | dw_list.SelectRow(0, false); |
| | |
| | | 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(); |
| | |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | | agentFor = L"goodslib"; |
| | | |
| | | OnAttachEvent(); |
| | |
| | | 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"").xml()); |
| | | dw_list = GetControl(L"dw_list"); |
| | |
| | | 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); |