| | |
| | | ProductFetchNoWin* pWin = new ProductFetchNoWin(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | int SetAgent() |
| | | /*int SetAgent() |
| | | { |
| | | xstring xfNodeAgentArea = L"agentarea"; |
| | | xnode anode = GetAgentNode(xfNodeAgentArea); |
| | |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | }*/ |
| | | |
| | | int OnRowChanged(TEvent* evt, LPARAM p) |
| | | xstring GetEntityName(LPARAM pr) |
| | | { |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | int row = hdr.row; |
| | | |
| | | /* |
| | | htmlctrl xs = GetControl(L"html_detail"); |
| | | xstring html = makeHtml(row); |
| | | xs.SetContent(html); |
| | | xs.Redraw(); |
| | | |
| | | xstring id = g_xdoc_product.getData(0,L"data/Item",row,L"@guid"); |
| | | OnShowImage(id); |
| | | */ |
| | | |
| | | return 1; |
| | | return L"SampleNo"; |
| | | } |
| | | |
| | | xstring GetEntityID(LPARAM pr) |
| | | { |
| | | int row = dw_list.GetRow(); |
| | | xstring id = dw_list.GetItemString(row, L"SKUID"); |
| | | //alert(id); |
| | | return id; |
| | | } |
| | | |
| | | |
| | | |
| | | //焦点激活处理函数 |
| | | int OnSetFocus(TEvent* evt, LPARAM p) |
| | | { |
| | | //重置工具条 |
| | | //SetAgent(); |
| | | SetAgent(L"list", GetEntityID(1)); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | if (error.find(L"error") >= 0) |
| | | alert(L"提交失败"); |
| | | else |
| | | alert(L"提交成功!"); |
| | | SendNotice(); |
| | | trace(L"提交成功!"); |
| | | //SendNotice(); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | //命令发布函数 |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | if (comdid == L"xmSubmit") |
| | | if (comdid == L"xmSubmit" || L"action:bill.check.ask") |
| | | { |
| | | return OnSubmit(); |
| | | OnSubmit(); |
| | | ProcessFlowAction(L"action:bill.check.ask", 1); |
| | | return 1; |
| | | } |
| | | if (comdid == L"xmCancel") |
| | | { |
| | |
| | | return OnCmdDispatch(evt->xcommand.pStrID); |
| | | } |
| | | |
| | | int OnRowChanged(TEvent* evt, LPARAM p) |
| | | { |
| | | DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh; |
| | | int row = hdr.row; |
| | | SetAgent(L"list", dw_list.GetItemString(row, L"SKUID")); |
| | | return 1; |
| | | } |
| | | |
| | | int OnAttachEvent() |
| | | { |
| | | AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&ProductFetchNoWin::OnRowChanged); |
| | |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&ProductFetchNoWin::OnXCommand); |
| | | //获取焦点事件,用于重置工具条 |
| | | AttachEvent(L"WM_SETFOCUS", (FEvent)&ProductFetchNoWin::OnSetFocus); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | |
| | | |
| | | dw_list.Retrieve(x); |
| | | dw_list.Redraw(); |
| | | dw_list.SetReadOnly(true); |
| | | dw_list.SetSelectionMode(1); |
| | | } |
| | | } |
| | | OnAttachEvent(); |
| | |
| | | |
| | | int onloaded() |
| | | { |
| | | //SetAgent(); |
| | | SetAgent(L"list", GetEntityID(1)); |
| | | |
| | | return 1; |
| | | } |