From 60d53d90282f6a64908a9550b86eaf71ba9b4ff6 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 27 六月 2024 16:54:02 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/mis-prj
---
jrj/project/business/quote.enquiry.cpp | 205 +++++++++++++++++++++-----------------------------
1 files changed, 86 insertions(+), 119 deletions(-)
diff --git a/jrj/project/business/quote.enquiry.cpp b/jrj/project/business/quote.enquiry.cpp
index a71d3a2..5e5912d 100644
--- a/jrj/project/business/quote.enquiry.cpp
+++ b/jrj/project/business/quote.enquiry.cpp
@@ -2188,7 +2188,7 @@
}
//鐒︾偣婵�娲诲鐞嗗嚱鏁�
- int OnSetFocus(ref TEvent evt, int param)
+ int OnSetFocus(TEvent* evt, LPARAM param)
{
//閲嶇疆宸ュ叿鏉�
SetAgent();
@@ -2200,7 +2200,6 @@
xml x = ViewObject::RetrieveData(L"/sale/data/TO/template/param", L"TemplateID", id);
xml sheet ;
- sheet.setNativePointer(x.CreateInstance());
sheet.loadXML(x.selectSingleNode(L"data/*").xml);
dw_cell.LoadTemplate(sheet);
@@ -2257,30 +2256,6 @@
return 1;
}
-
- static stdcall int GetModuleFileName(int hModule, xstring lpFileName, int nSize) native from "kernel32.dll" alias "GetModuleFileNameW";
- static stdcall int PathRemoveFileSpec(xstring lpFileName) native from "shlwapi.dll" alias "PathRemoveFileSpecW";
-
- xstring GetModulePath()
- {
- xstring str = L"";
- str = str.space(255);
- GetModuleFileName(0, str, 250);
- PathRemoveFileSpec(str);
- return str;
- }
-
- xstring GetModuleTmpPath()
- {
- xstring str = L"";
- str = str.space(255);
- GetModuleFileName(0, str, 250);
- PathRemoveFileSpec(str);
- xstring tmp = str + L"\\Temp";
- xaserver::CreateDirectory(tmp);
- return tmp;
- }
-
xstring UploadImage(xstring guid)
{
return UploadImage(guid, L"");
@@ -2290,12 +2265,12 @@
{
xstring name = guid + L".jpg";
xstring str = name.mid(0, 2);
- str = str.upper();
+ str = str.toUpper();
int ret = 1;
if (filename != L"")
- ret = xaserver::Upload(L"product" + str, name, filename, this.GetHWND(), L"", false);
+ ret = xaserver::Upload(L"product" + str, name, filename, GetHWND(), L"", false);
else
- ret = xaserver::Upload(L"product" + str, name, this.GetHWND(), L"", false);
+ ret = xaserver::Upload(L"product" + str, name.c_str(), GetHWND(), L"", false);
if (ret == -1) return L"";
if (ret == 0)
{
@@ -2315,7 +2290,7 @@
}
xutil::SmallImage(appPath+L"\\"+name,appPath+L"\\"+L"x_"+name,120,120);
- int ret_1 = xaserver::Upload(L"product"+str, L"x_"+name,appPath+L"\\x_"+name, this.GetHWND(),L"",false);
+ int ret_1 = xaserver::Upload(L"product"+str, L"x_"+name,appPath+L"\\x_"+name, GetHWND(),L"",false);
//xaserver::DeleteFile(appPath+L"x_"+name);
//xaserver::DeleteFile(appPath+name);
if(ret_1 != 1)
@@ -2331,12 +2306,12 @@
{
xstring name = guid + L".jpg";
xstring str = name.mid(0, 2);
- str = str.upper();
+ str = str.toUpper();
int ret = 1;
if (filename != L"")
- ret = xaserver::Upload(L"product" + str, name, filename, this.GetHWND(), L"", false);
+ ret = xaserver::Upload(L"product" + str, name, filename, GetHWND(), L"", false);
else
- ret = xaserver::Upload(L"product" + str, name, this.GetHWND(), L"", false);
+ ret = xaserver::Upload(L"product" + str, name, GetHWND(), L"", false);
if (ret == -1) return L"";
if (ret == 0)
{
@@ -2354,7 +2329,7 @@
}
xutil::SmallImage(appPath + L"\\" + name, appPath + L"\\" + L"x_" + name, 120, 120);
- int ret_1 = xaserver::Upload(L"product" + str, L"x_" + name, appPath + L"\\x_" + name, this.GetHWND(), L"", false);
+ int ret_1 = xaserver::Upload(L"product" + str, L"x_" + name, appPath + L"\\x_" + name, GetHWND(), L"", false);
//xaserver::DeleteFile(appPath+L"x_"+name);
//xaserver::DeleteFile(appPath+name);
if (ret_1 != 1)
@@ -2617,24 +2592,23 @@
// "JPEG 鏂囦欢(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0鍏ㄩ儴鏂囦欢(*.*)\0*.*\0",
// "jpg");
- char[] szFileName = new char[4096];
- char[] szPath = new char[4096];
+ wchar_t szFileName[4096];
+ wchar_t szPath[4096];
szFileName[0] = 0;
szPath[0] = 0;
if (initFileName != L"")
{
int len = initFileName.length();
- char[] tmp = initFileName;
+ const wchar_t* tmp = initFileName.c_str();
for (int i = 0; i < len + 1; i++)
{
- //szFileName[i] = tmp[i];
szPath[i] = tmp[i];
}
}
int nFilterIndex = 1;
- ref OPENFILENAMEW ofn = new OPENFILENAMEW;
+ OPENFILENAMEW ofn;
ofn.lStructSize = 88;//sizeof(ofn);
ofn.hwndOwner = 0;
@@ -3121,7 +3095,7 @@
return 1;
}
- int OnCellSelectChanged(ref TNotifyEvent evt, int p)
+ int OnCellSelectChanged(TEvent*, LPARAM p)
{
/*ref DWNMHDR hdr = trust(evt.pnmh as ref DWNMHDR);
xstring colname=hdr.colname;
@@ -3132,7 +3106,7 @@
return 1;
}
- int OnItemChanged(ref TNotifyEvent evt, int p)
+ int OnItemChanged(TEvent*, LPARAM p)
{
ref DWNMHDR hdr = trust(evt.pnmh as ref DWNMHDR);
xstring colname = hdr.colname;
@@ -3289,14 +3263,14 @@
xstring res = L"/sale/data/productlibrary3/pref/picture/imagelistskuno";
if (xurl::get(res, arg_pic.GetString(), xp) != 1)
{
- trace(xp.GetXml());
+ trace(xp.xml());
return 1;
}
else
{
- //alert(xp.GetXml());
+ //alert(xp.xml());
ClearImageTerm(row, L"customer-photo");
- //alert(xp.GetXml());
+ //alert(xp.xml());
KXMLDOMNodeList nlistp = xp.selectNodes(L"ImageList/image");
int lenp = nlistp.length();
int ip = 0;
@@ -3349,13 +3323,13 @@
xstring res = L"/sale/data/ProductLibrary3/pref/picture/imagelistItemNo";
if (xurl::get(res, arg_pic.GetString(), xp) != 1)
{
- trace(xp.GetXml());
+ trace(xp.xml());
return 1;
}
else
{
ClearImageTerm(row, L"customer-photo");
- //alert(xp.GetXml());
+ //alert(xp.xml());
KXMLDOMNodeList nlistp = xp.selectNodes(L"ImageList/image");
int lenp = nlistp.length();
int ip = 0;
@@ -3735,7 +3709,7 @@
xstring GetExchangeRate(xstring pcur, xstring pdate)
{
- if (pcur.upper() == L"RMB") return L"1";
+ if (pcur.toUpper() == L"RMB") return L"1";
xstring exchangeRate = L"";
if (exchangeRate == L"") {
xml x = ViewObject::RetrieveData(L"/sale/data/GDN3/profit/param", L"item", L"cryrate");
@@ -3792,9 +3766,9 @@
return 1;
}
- int OnRowChanged(ref TNotifyEvent evt, int p)
+ int OnRowChanged(TEvent* evt, LPARAM p)
{
- ref DWNMHDR hdr = trust(evt.pnmh as ref DWNMHDR);
+ DWNMHDR& hdr = *(DWNMHDR * )evt->notify.pnmh;
int row = hdr.row;
return OnQuoteLineChanged(row);
@@ -3803,7 +3777,7 @@
int OnQuoteLineChanged(int row)
{
ximageview im = GetControl(L"im1");
- im.ResetEx();
+ im.Reset();
//xstring skuno = dw_goods.GetItemString(row,L"SKUNo");
//OnShowImage(skuno,row);
//im.Redraw();
@@ -3827,9 +3801,7 @@
ximageview im = GetControl(L"im1");
xml xp ;
- xp.setNativePointer(xml::CreateInstance());
xaserverarg arg_pic ;
- arg_pic.setNativePointer(arg_pic.CreateInstance());
arg_pic.AddArg(L"SKUNo", skuno);
xstring res = L"/sale/data/ProductLibrary3/pref/picture/imagelistSKUNo";
@@ -3846,7 +3818,7 @@
bool hasIamge = false;
if (xurl::get(res, arg_pic.GetString(), xp) != 1)
{
- trace(xp.GetXml());
+ trace(xp.xml());
return 1;
}
else
@@ -3869,18 +3841,18 @@
res = L"/sale/data/ProductLibrary3/pref/picture/imagelistSKUNo";
if (xurl::get(res, arg_pic.GetString(), xp) != 1)
{
- trace(xp.GetXml());
+ trace(xp.xml());
return 1;
}
else
{
- nlistp = xp.selectNodes(L"ImageList/image");
- lenp = nlistp.length();
- for (ip = 0; ip < lenp; ip++)
+ KXMLDOMNodeList nlistp = xp.selectNodes(L"ImageList/image");
+ long lenp = nlistp.length();
+ for (int ip = 0; ip < lenp; ip++)
{
- xitem = nlistp.item(ip);
- picname = xitem.selectSingleNode(L"PicPath").text();
- goodno = xitem.selectSingleNode(L"GoodsNo").text();
+ KXMLDOMNode 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, goodno);
@@ -3920,7 +3892,7 @@
int OnUpdateProcessed()
{
int ret = ProcessSendMessage(L"/task/quote/update-processed", taskid, L"", L"", false);
- win32::PostMessage(GetFrameWindow().GetHWND(), 0x401, L"xmRefreshTask", 0);
+ PostMessage(GetFrameWindow().GetHWND(), 0x401, (WPARAM)L"xmRefreshTask", 0);
return ret;
}
@@ -3993,9 +3965,8 @@
if (filename == L"" || saveas)
{
xaserverarg arg ;
-
arg.AddArg(L"src", myurl);
- OpenWindow(L"dev:xpage[trade.document.saveas.vx]", cast(arg as int));
+ OpenWindow(L"dev:xpage[trade.document.saveas.vx]", arg);
if (arg.GetArgString(L"result") == L"ok")
{
sfilename = arg.GetArgString(L"filename");
@@ -4009,7 +3980,7 @@
xstring sguid = publiccode::GetGuid();
xstring sname = sguid;
xstring str = sname.mid(0, 2);
- str = str.upper();
+ str = str.toUpper();
xstring suri = L"attachment" + str;
int ret = xaserver::UploadData(suri, sguid + L".jpg", content);
if (ret < 0)
@@ -4019,7 +3990,6 @@
}
xml x ;
-
xaserverarg args ;
args.setNativePointer(args.CreateInstance());
args.AddArg(L"myurl", myurl);
@@ -4040,7 +4010,7 @@
else
{
filename = sfilename;
- win32::SetWindowText(GetHWND(), L"鎶ヤ环鏂囦欢:" + filename);
+ SetWindowText(GetHWND(), L"鎶ヤ环鏂囦欢:" + filename);
alert(x.text());
}
@@ -4049,13 +4019,13 @@
int SendCtrlCmd(xcontrol xc, xstring cmd)
{
- win32::SendMessage(xc.GetId(), 0x401, cmd, 0);
+ SendMessage(xc.GetHWND(), 0x401, cmd, 0);
return 1;
}
- int OnCellClicked(ref TNotifyEvent evt, int p)
+ int OnCellClicked(TEvent* evt, LPARAM p)
{
- ref DWNMHDR dwhdr = cast(evt.pnmh as ref DWNMHDR);
+ DWNMHDR& dwhdr=*(DWNMHDR*)evt->notify.pnmh;
int row = dwhdr.row;
int col = dwhdr.col;
//xstring col = dwhdr.colname;
@@ -4091,7 +4061,7 @@
if (row < startRow + 1) return 1;
startRow++;
- trace(xstring(row) + L"---" + (startRow - 1).toString());
+ trace(xstring(row) + L"---" + xstring(startRow - 1));
int colItemNo = getItemCol(dw_cell, startRow - 1, L"鎴戝徃鍨嬪彿,ItemNo");
int colCustomerItemNo = getItemCol(dw_cell, startRow - 1, L"瀹㈡埛鍨嬪彿,Customer ItemNo,Customer Item No");
@@ -4159,13 +4129,13 @@
xstring pitems = L"";
for (int i = 0; i < count; i++)
{
- pitems += L"<row><鏄剧ず鍒�>" + items.item(i).selectSingleNode(L"Name").text + L"</鏄剧ず鍒�><鏁版嵁鍒�>"
- + items.item(i).selectSingleNode(L"Name").text + L"</鏁版嵁鍒�></row>";
+ pitems += (xstring)L"<row><鏄剧ず鍒�>" + items.item(i).selectSingleNode(L"Name").text() + L"</鏄剧ず鍒�><鏁版嵁鍒�>"
+ + items.item(i).selectSingleNode(L"Name").text() + L"</鏁版嵁鍒�></row>";
}
- xstring prop = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
- "<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems + L"</data>'/>" +
- "</cellprop>";
+ xstring prop = (xstring)L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
+ L"<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems + L"</data>'/>" +
+ L"</cellprop>";
dw_cell.SetCellProps(row, col, prop);
}
}
@@ -4229,24 +4199,24 @@
{
if (dw_cell.GetItemString(row, col) == L"")
dw_cell.SetItemString(row, col, L" ");
- xstring prop2 = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
- "<edit edittype='query' dddwxpageurl='' dddwdataurl='xquery:[Convert.quickcode.xq]?id=Supplier' dddwtemplateurl='dev:sheet[Supplier.v3.tpl/List]' dddwdatacolumn='Name' dddwdisplaycolumn='Name' dddwwidth='' dddwheight='' dddwautoselect='N' dddwshowbutton='鍚�' dddwcanedit='鏄�'/>" +
- "</cellprop>";
+ xstring prop2 = (xstring)L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
+ L"<edit edittype='query' dddwxpageurl='' dddwdataurl='xquery:[Convert.quickcode.xq]?id=Supplier' dddwtemplateurl='dev:sheet[Supplier.v3.tpl/List]' dddwdatacolumn='Name' dddwdisplaycolumn='Name' dddwwidth='' dddwheight='' dddwautoselect='N' dddwshowbutton='鍚�' dddwcanedit='鏄�'/>" +
+ L"</cellprop>";
dw_cell.SetCellProps(row, col, prop2);
dw_cell.Redraw();
}
else if (col == colTyp1 || col == colTyp || col == colTyp2 || col == colTyp3)
{
xstring pitems1 = L"";
- pitems1 += L"<row><鏄剧ず鍒�>鎴愬搧</鏄剧ず鍒�><鏁版嵁鍒�>"
+ pitems1 += (xstring)L"<row><鏄剧ず鍒�>鎴愬搧</鏄剧ず鍒�><鏁版嵁鍒�>"
+ L"鎴愬搧</鏁版嵁鍒�></row>";
- pitems1 += L"<row><鏄剧ず鍒�>鏁h揣</鏄剧ず鍒�><鏁版嵁鍒�>"
+ pitems1 += (xstring)L"<row><鏄剧ず鍒�>鏁h揣</鏄剧ず鍒�><鏁版嵁鍒�>"
+ L"鏁h揣</鏁版嵁鍒�></row>";
- pitems1 += L"<row><鏄剧ず鍒�>鍖呰</鏄剧ず鍒�><鏁版嵁鍒�>"
+ pitems1 += (xstring)L"<row><鏄剧ず鍒�>鍖呰</鏄剧ず鍒�><鏁版嵁鍒�>"
+ L"鍖呰</鏁版嵁鍒�></row>";
- xstring prop1 = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
- "<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems1 + L"</data>'/>" +
- "</cellprop>";
+ xstring prop1 = (xstring)L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
+ L"<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems1 + L"</data>'/>" +
+ L"</cellprop>";
dw_cell.SetCellProps(row, col, prop1);
}
}
@@ -4259,9 +4229,9 @@
}
- int OnCellClicked1(ref TNotifyEvent evt, int p)
+ int OnCellClicked1(TEvent* evt, LPARAM p)
{
- ref DWNMHDR dwhdr = cast(evt.pnmh as ref DWNMHDR);
+ DWNMHDR dwhdr = *(DWNMHDR*)evt->notify.pnmh;
int row = dwhdr.row;
int col = dwhdr.col;
//xstring col = dwhdr.colname;
@@ -4278,7 +4248,7 @@
if (row < startRow + 1) return 1;
startRow++;
- trace(xstring(row) + L"---" + (startRow - 1).toString());
+ trace(xstring(row) + L"---" + xstring(startRow - 1));
int colItemNo = getItemCol(dw_cell, startRow - 1, L"鎴戝徃鍨嬪彿,ItemNo");
int colCustomerItemNo = getItemCol(dw_cell, startRow - 1, L"瀹㈡埛鍨嬪彿,Customer ItemNo,Customer Item No");
@@ -4332,13 +4302,13 @@
xstring pitems = L"";
for (int i = 0; i < count; i++)
{
- pitems += L"<row><鏄剧ず鍒�>" + items.item(i).selectSingleNode(L"Name").text + L"</鏄剧ず鍒�><鏁版嵁鍒�>"
- + items.item(i).selectSingleNode(L"Name").text + L"</鏁版嵁鍒�></row>";
+ pitems += (xstring)L"<row><鏄剧ず鍒�>" + items.item(i).selectSingleNode(L"Name").text() + L"</鏄剧ず鍒�><鏁版嵁鍒�>"
+ + items.item(i).selectSingleNode(L"Name").text() + L"</鏁版嵁鍒�></row>";
}
- xstring prop = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
- "<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems + L"</data>'/>" +
- "</cellprop>";
+ xstring prop = (xstring)L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
+ L"<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems + L"</data>'/>" +
+ L"</cellprop>";
dw_cell.SetCellProps(row, col, prop);
}
if (col == colPackage)
@@ -4356,7 +4326,7 @@
xaserverarg argx ;
argx.setNativePointer(argx.CreateInstance());
argx.AddArg(L"GoodsNo", dw_cell.GetItemString(ARow, colItemNo));
- OpenWindow(L"dev:xpage[CustomerItemNoList.vx]", cast(argx as int));
+ OpenWindow(L"dev:xpage[CustomerItemNoList.vx]", argx);
if (argx.GetArgString(L"action") != L"ok")
{
ARow = row;
@@ -4424,11 +4394,12 @@
{
/*璁$畻浣撶Н*/
xstring desc = dw_cell.GetItemString(ARow, colVolDesc);
+ double v = 0.0;
if (desc == L"")
dw_cell.SetItemString(ARow, colVol, L"");
else
{
- double v = calcVol(desc) / 1000000.00;
+ v = calcVol(desc) / 1000000.00;
xstring str = xstring(v);
if (str.find(L".") >= 0) str = str.left(str.find(L".") + 5);
dw_cell.SetItemString(ARow, colVol, str);
@@ -4450,7 +4421,7 @@
if (qty1 != L"") qty = qty1.toDouble();
if (qty2 != L"") qty = qty * qty2.toDouble();
double ttl = 65.0 * qty / v;
- dw_cell.SetItemString(ARow, col40HQ, ttl.toInt().toString());
+ dw_cell.SetItemString(ARow, col40HQ, xstring((int)ttl));
}
}
@@ -4498,8 +4469,8 @@
pitems1 += (xstring)L"<row><鏄剧ず鍒�>鍖呰</鏄剧ず鍒�><鏁版嵁鍒�>"
+ L"鍖呰</鏁版嵁鍒�></row>";
xstring prop1 = (xstring)L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial='' cellsource='' fontstyle='' windowurl=''>" +
- "<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems1 + L"</data>'/>" +
- "</cellprop>";
+ L"<edit edittype='ddlb' ddlbdataurl='' ddlbxml='<data>" + pitems1 + L"</data>'/>" +
+ L"</cellprop>";
dw_cell.SetCellProps(row, col, prop1);
}
@@ -4583,18 +4554,18 @@
int OnAttachListon()
{
//缁戝畾宸ュ叿鏉$偣鍑讳簨浠�
- AttachEvent(L"WM_XCOMMAND", OnXCommand);
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&QuoteFileView::OnXCommand);
//鑾峰彇鐒︾偣浜嬩欢锛岀敤浜庨噸缃伐鍏锋潯
- AttachEvent(L"WM_SETFOCUS", OnSetFocus);
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&QuoteFileView::OnSetFocus);
- AttachEvent(L"frame:im1", L"IMG_LDBCLICK", OnImgDBClicked);
+ AttachEvent(L"frame:im1", L"IMG_LDBCLICK", (FEvent)&QuoteFileView::OnImgDBClicked);
- AttachEvent(L"dw_base", L"DWV_ITEMCHANGED", OnItemChanged);
- AttachEvent(L"dw_goods", L"DWV_ROWFOCUSCHANGED", OnRowChanged);
+ AttachEvent(L"dw_base", L"DWV_ITEMCHANGED", (FEvent)&QuoteFileView::OnItemChanged);
+ AttachEvent(L"dw_goods", L"DWV_ROWFOCUSCHANGED", (FEvent)&QuoteFileView::OnRowChanged);
- AttachEvent(L"dw_cell", L"DWV_CLICKED", OnCellClicked);
- AttachEvent(L"dw_cell", L"CELL_ITEMCHANGED", OnCellItemChanged);
- AttachEvent(L"dw_cell", L"CELL_SELECTCHANGED", OnCellSelectChanged);
+ AttachEvent(L"dw_cell", L"DWV_CLICKED", (FEvent)&QuoteFileView::OnCellClicked);
+ AttachEvent(L"dw_cell", L"CELL_ITEMCHANGED", (FEvent)&QuoteFileView::OnCellItemChanged);
+ AttachEvent(L"dw_cell", L"CELL_SELECTCHANGED", (FEvent)&QuoteFileView::OnCellSelectChanged);
return 1;
}
@@ -4769,9 +4740,8 @@
xstring templ = L"";
taskid = L"";
xaserverarg arg;
- if (GetParam()) {
- arg ;
- arg.setNativePointer(GetParam());
+ if (GetWinParam()) {
+ arg = GetArg();
templ = arg.GetArgString(L"template");
entityID = arg.GetArgString(L"EntityID");
taskid = arg.GetArgString(L"TaskID");
@@ -4872,7 +4842,7 @@
}
}
- OnAttachEvent();
+ OnAttachListon();
filename = L"";
/* #define LayerFlow_None 0x00000001 //not layer space
@@ -4994,7 +4964,7 @@
xaserverarg arg ;
arg.setNativePointer(xaserverarg::CreateInstance());
arg.AddArg(L"value", content);
- OpenWindow(L"dev:xpage[QuoteSupplierItem.vx]", cast(arg as int));
+ OpenWindow(L"dev:xpage[QuoteSupplierItem.vx]", arg);
return 1;
}
@@ -5002,15 +4972,14 @@
bool hasParty(xstring name)
{
xml x ;
-
xaserverarg arg ;
arg.setNativePointer(xaserverarg::CreateInstance());
arg.AddArg(L"Name", name);
if (getUrl(L"/sale/data/SupplierV3/HasParty", arg.GetString(), x) != 1)
{
- alert(L"error:" + x.xml());
+ alert((xstring)L"error:" + x.xml());
}
- xstring count = x.documentElement.getAttribute(L"count");
+ xstring count = x.documentElement().getAttribute(L"count");
if (count != L"0") return true;
return false;
@@ -5018,14 +4987,13 @@
int LoadPurcher()
{
- purcher ;
- purcher.setNativePointer(xml::CreateInstance());
+ xml purcher ;
xaserverarg arg ;
arg.setNativePointer(xaserverarg::CreateInstance());
arg.AddArg(L"id", L"閲囪喘鍛�");
if (getUrl(L"/sale/data/Quote/Purcher", arg.GetString(), purcher) != 1)
{
- alert(L"error:" + purcher.GetXml());
+ alert((xstring)L"error:" + purcher.xml());
}
return 1;
}
@@ -5048,9 +5016,8 @@
LoadPurcher();
xaserverarg arg;
- if (GetParam()) {
- arg ;
- arg.setNativePointer(GetParam());
+ if (GetWinParam()) {
+ arg = GetArg();
if (arg.GetArgString(L"bill.purchor") == L"1") OnNextPurch();
}
return 1;
--
Gitblit v1.9.3