| | |
| | | return 1; |
| | | } |
| | | |
| | | int OnItemChanged(TEvent*, LPARAM p) |
| | | int OnItemChanged(TEvent* evt, LPARAM p) |
| | | { |
| | | ref DWNMHDR hdr = trust(evt.pnmh as ref DWNMHDR); |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | xstring colname = hdr.colname; |
| | | xstring value = hdr.data; |
| | | int row = hdr.row; |
| | |
| | | int startRow = getItemHeadRow(dw_cell); |
| | | |
| | | //没有找到商品行的标题 |
| | | if (startRow < 1) return L""; |
| | | if (startRow < 1) return 0; |
| | | startRow++; |
| | | |
| | | int colItemNo = getItemCol(dw_cell, startRow - 1, L"我司型号,ItemNo"); |
| | |
| | | int ProcessItemImage(xstring goodsno, int row) |
| | | { |
| | | xml xp ; |
| | | xp.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg_pic ; |
| | | arg_pic.setNativePointer(arg_pic.CreateInstance()); |
| | | arg_pic.AddArg(L"SKUNo", goodsno); |
| | | |
| | | ximageview im = GetControl(L"frame:im1"); |
| | | im.ResetEx(); |
| | | im.Reset(); |
| | | xstring res = L"/sale/data/productlibrary3/pref/picture/imagelistskuno"; |
| | | if (xurl::get(res, arg_pic.GetString(), xp) != 1) |
| | | { |
| | |
| | | int ProcessItemImage1(xstring goodsno, int row) |
| | | { |
| | | xml xp ; |
| | | xp.setNativePointer(xml::CreateInstance()); |
| | | xaserverarg arg_pic ; |
| | | arg_pic.setNativePointer(arg_pic.CreateInstance()); |
| | | arg_pic.AddArg(L"GoodsNo", goodsno); |
| | | |
| | | ximageview im = GetControl(L"frame:im1"); |
| | | im.ResetEx(); |
| | | im.Reset(); |
| | | xstring res = L"/sale/data/ProductLibrary3/pref/picture/imagelistItemNo"; |
| | | if (xurl::get(res, arg_pic.GetString(), xp) != 1) |
| | | { |
| | |
| | | im.AddImages(picname,goodsno);*/ |
| | | if (ip == 0) |
| | | { |
| | | xstring appPath = GetModuleTmpPath(); |
| | | xstring appPath = xutil::GetModuleTmpPath(); |
| | | xaserver::CreateDirectory(appPath); |
| | | xaserver::DownLoadFile(GetServerUrl(), L"/business/products/chanpin/" + id.left(2) + L"/" + name, name, appPath + L"/" + name); |
| | | |
| | |
| | | { |
| | | xstring suserid = publiccode::GetUser().id; |
| | | xaserverarg args ; |
| | | args.setNativePointer(args.CreateInstance()); |
| | | |
| | | if (comdid == L"xmNew") |
| | | OpenWindow(L"dev:xpage[TONewSelectDlg.vx]", cast(args as int)); |
| | | OpenWindow(L"dev:xpage[TONewSelectDlg.vx]", args); |
| | | else |
| | | OpenWindow(L"dev:xpage[TOSelectDlg.vx]", cast(args as int)); |
| | | OpenWindow(L"dev:xpage[TOSelectDlg.vx]", args); |
| | | fileid = args.GetArgString(L"id"); |
| | | templateID = args.GetArgString(L"templateID"); |
| | | xstring myaction = args.GetArgString(L"action"); |
| | |
| | | |
| | | args.AddArg(L"src", L"data/QuoteFile/" + suserid); |
| | | args.AddArg(L"process", L"path"); |
| | | OpenWindow(L"dev:xpage[trade.document.selectdlg.vx]", cast(args as int)); |
| | | OpenWindow(L"dev:xpage[trade.document.selectdlg.vx]", args); |
| | | if (args.GetArgString(L"result") == L"ok") |
| | | { |
| | | xstring u = args.GetArgString(L"src"); |
| | |
| | | |
| | | xaserver::LoadUrl(GetServerUrl(), u, L"", x); |
| | | trace(x.xml()); |
| | | dw_cell.LoadTemplateEx(x.documentElement); |
| | | dw_cell.LoadTemplateEx(x.documentElement()); |
| | | dw_cell.Redraw(); |
| | | filename = args.GetArgString(L"filename"); |
| | | fileid = args.GetArgString(L"ID"); |
| | |
| | | if (action == L"purch") |
| | | { |
| | | int crow = dw_cell.GetRow(); |
| | | xstring cmd = comdid.mid(3, comdid.length()); |
| | | if (getRowID(dw_cell, crow) == L"") SendCtrlCmd(dw_cell, cmd); |
| | | return 1; |
| | | } |
| | |
| | | Item += L"<ModifyDate>" + sdate + L"</ModifyDate>"; |
| | | |
| | | Item += L"</Item>"; |
| | | } |
| | | if (hasNew) |
| | | { |
| | | xstring newItem = L"<data>" + Item + L"</data>"; |
| | | trace(newItem); |
| | | if (OnSaveNewItem(newItem) == -1) return 1; |
| | | |
| | | if (hasNew) |
| | | { |
| | | xstring newItem = L"<data>" + Item + L"</data>"; |
| | | trace(newItem); |
| | | if (OnSaveNewItem(newItem) == -1) return 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | xstring str = x.documentElement.getAttribute(L"text"); |
| | | xstring str = x.documentElement().getAttribute(L"text"); |
| | | if (str == L"true") |
| | | { |
| | | dw_goods.ResetUpdateStatus(); |
| | |
| | | if (pos >= 0) |
| | | { |
| | | pos1 = content.find(L"</display>", pos); |
| | | str = content.mid(pos1 + L"</display>".length(), 9999999); |
| | | str = content.mid(pos1 + xstring(L"</display>").length(), 9999999); |
| | | content = content.left(pos) + str; |
| | | } |
| | | else |
| | |
| | | if (pos >= 0) |
| | | { |
| | | pos1 = content.find(L"</display>", pos); |
| | | str = content.mid(pos1 + L"</display>".length(), 9999999); |
| | | str = content.mid(pos1 + xstring(L"</display>").length(), 9999999); |
| | | content = content.left(pos) + str; |
| | | } |
| | | else |
| | |
| | | |
| | | xml x ; |
| | | xaserverarg args ; |
| | | args.setNativePointer(args.CreateInstance()); |
| | | args.AddArg(L"myurl", myurl); |
| | | args.AddArg(L"name", sfilename); |
| | | args.AddArg(L"filepath", sname); |