| | |
| | | xstring Up(xstring name) { |
| | | xstring str = name.mid(0, 2); |
| | | str = str.toUpper(); |
| | | return xaserver::UploadFile(L"product" + str, name + L".jpg", this.GetHWND(), L"", false); |
| | | return xaserver::UploadFile(L"product" + str, name + L".jpg", GetHWND(), L"", false); |
| | | } |
| | | |
| | | int OnAddImage() { |
| | |
| | | ext = L"jpg"; |
| | | |
| | | // 图片名加入数据库 |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | x.LoadXml(L"<Item update.new='1' update.modify='1' guid='" + id + L"'>" + |
| | | xml x ; |
| | | x.loadXML(L"<Item update.new='1' update.modify='1' guid='" + id + L"'>" + |
| | | "<ProductPictureID>" + id + L"</ProductPictureID>" + |
| | | "<OriginFile>" + originfile + L"</OriginFile>" + |
| | | "<FileExt>" + ext + L"</FileExt>" + |
| | |
| | | "</Item>" |
| | | ); |
| | | |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg(L"content", x.GetXml()); |
| | | if (url::get(L"/sale/data/ProductLibrary/image/update", arg.GetString(), x) != 1) |
| | | xaserverarg arg; |
| | | arg.AddArg(L"content", x.xml()); |
| | | if (xurl::get(L"/sale/data/ProductLibrary/image/update", arg.GetString(), x) != 1) |
| | | { |
| | | alert(x.text); |
| | | alert(x.text()); |
| | | return -1; |
| | | } |
| | | dw_list.SetItemString(row, L"pic", L"*"); |
| | |
| | | ext = L"jpg"; |
| | | |
| | | // 图片名加入数据库 |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | x.LoadXml(L"<Item update.new='1' update.modify='1' guid='" + id + L"'>" + |
| | | "<ProductPictureID>" + id + L"</ProductPictureID>" + |
| | | "<OriginFile>" + originfile + L"</OriginFile>" + |
| | | "<FileExt>" + ext + L"</FileExt>" + |
| | | "<SKUID>" + skuid + L"</SKUID>" + |
| | | "<CustomerItemNo>" + CustomerItemNo + L"</CustomerItemNo>" + |
| | | "<CustomerID>" + CustomerID + L"</CustomerID>" + |
| | | "<Name>[" + SKUNo.trim() + L"]</Name>" + |
| | | "<FileName>" + id + L".jpg</FileName>" + |
| | | "</Item>" |
| | | xml x; |
| | | x.loadXML(L"<Item update.new='1' update.modify='1' guid='" + id + L"'>" + |
| | | L"<ProductPictureID>" + id + L"</ProductPictureID>" + |
| | | L"<OriginFile>" + originfile + L"</OriginFile>" + |
| | | L"<FileExt>" + ext + L"</FileExt>" + |
| | | L"<SKUID>" + skuid + L"</SKUID>" + |
| | | L"<CustomerItemNo>" + CustomerItemNo + L"</CustomerItemNo>" + |
| | | L"<CustomerID>" + CustomerID + L"</CustomerID>" + |
| | | L"<Name>[" + SKUNo.trim() + L"]</Name>" + |
| | | L"<FileName>" + id + L".jpg</FileName>" + |
| | | L"</Item>" |
| | | ); |
| | | |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg(L"content", x.GetXml()); |
| | | if (url::get(L"/sale/data/ProductLibrary/image/update", arg.GetString(), x) != 1) |
| | | xaserverarg arg; |
| | | arg.AddArg(L"content", x.xml()); |
| | | if (xurl::get(L"/sale/data/ProductLibrary/image/update", arg.GetString(), x) != 1) |
| | | { |
| | | alert(x.text); |
| | | alert(x.text()); |
| | | return -1; |
| | | } |
| | | dwc_list.SetItemString(row, L"pic", L"*"); |
| | |
| | | if (count < 1) return 1; |
| | | |
| | | KXMLDOMNodeList images = imageElement.selectNodes(L"image"); |
| | | int length = images.length; |
| | | int length = images.length(); |
| | | if (length < index) return 1; |
| | | |
| | | int MB_OKCANCEL = 0x00000001; |