¶Ô±ÈÐÂÎļþ |
| | |
| | | #include <wobject/xstring.hpp> |
| | | #include <xcontrol/xtreeview.hpp> |
| | | #include <xcontrol/xdwgrid.hpp> |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | #include "vbusiness/vframe/frame.vframe.vbusiness.hpp" |
| | | |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) ViewTotalArgWin : public xframe |
| | | { |
| | | public: |
| | | xdwtable dw_arg; |
| | | xaserverarg arg; |
| | | xnode m_agentNode; //Agent Condition |
| | | public: |
| | | ViewTotalArgWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} |
| | | public: |
| | | static ViewTotalArgWin* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | | ViewTotalArgWin* pWin = new ViewTotalArgWin(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | /*int SetAgent() |
| | | { |
| | | string xfNodeAgentArea = L"agentarea"; |
| | | xnode anode = GetAgentNode(xfNodeAgentArea); |
| | | if(m_agentNode) |
| | | { |
| | | SetAgentNodeContent (anode,m_agentNode); |
| | | } |
| | | else |
| | | { |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | msxml::IXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*"); |
| | | if(agent) |
| | | { |
| | | string s = agent.xml; |
| | | m_agentNode = SetAgentNodeContent (anode,s); |
| | | } |
| | | } |
| | | return 1; |
| | | }*/ |
| | | |
| | | //ç¦ç¹æ¿æ´»å¤ç彿° |
| | | int OnSetFocus(TEvent * evt, int param) |
| | | { |
| | | //é置工å
·æ¡ |
| | | //SetAgent(); |
| | | return 1; |
| | | } |
| | | |
| | | //å½ä»¤åå¸å½æ° |
| | | int OnCmdDispatch(string comdid) |
| | | { |
| | | if (comdid == L"xmOk") |
| | | { |
| | | xml x; |
| | | |
| | | dw_arg.AcceptText(); |
| | | dw_arg.DwUpdateAllTo(x); |
| | | //trace(L"--------" + x.xml()); |
| | | arg.AddArg(L"arg", x.xml()); |
| | | arg.AddArg(L"action", L"ok"); |
| | | CloseWindow(); |
| | | |
| | | return 1; |
| | | } |
| | | else if (comdid == L"xmCancel") |
| | | { |
| | | arg.AddArg(L"action", L"cancel"); |
| | | CloseWindow(); |
| | | return 1; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | //å½ä»¤å¤çäºä»¶ |
| | | int OnXCommand(TEvent* evt, int param) |
| | | { |
| | | return OnCmdDispatch(evt->xcommand.pStrID); |
| | | } |
| | | |
| | | int OnAttachEvent() |
| | | { |
| | | //ç»å®å·¥å
·æ¡ç¹å»äºä»¶ |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&ViewTotalArgWin::OnXCommand); |
| | | //è·åç¦ç¹äºä»¶ï¼ç¨äºé置工å
·æ¡ |
| | | AttachEvent(L"WM_SETFOCUS", (FEvent)&ViewTotalArgWin::OnSetFocus); |
| | | return 1; |
| | | } |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | | dw_arg = GetControl(L"dw_arg"); |
| | | |
| | | if (GetWinParam()) |
| | | { |
| | | arg = GetArg(); |
| | | string dw = arg.GetArgString(L"argurl"); |
| | | dw_arg.openUrl(dw); |
| | | |
| | | dw_arg.SetColHeaderHeight(0); |
| | | dw_arg.SetRowSelectorWidth(0); |
| | | dw_arg.SetHScrollState(false); |
| | | dw_arg.SetVScrollState(false); |
| | | |
| | | string d = arg.GetArgString(L"arg"); |
| | | if (d != L"") |
| | | { |
| | | xml x ; |
| | | |
| | | x.loadXML(d); |
| | | dw_arg.Retrieve(x); |
| | | } |
| | | } |
| | | dw_arg.SetEditUpperMode(true); |
| | | dw_arg.SetItemString(1, L"QuoteSuccess/type", L"æ¯"); |
| | | dw_arg.SetItemString(1, L"ApprovalStatusName", L"6"); |
| | | dw_arg.SetItemDisplayString(1, L"ApprovalStatusName", L"å·²å®¡æ ¸"); |
| | | dw_arg.SetItemString(1, L"GDN.ETD/type", L"æ¥æèå´"); |
| | | dw_arg.SetItemString(1, L"QuoteSuccess/type", L"æ¯"); |
| | | |
| | | OnAttachEvent(); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | int onloaded() |
| | | { |
| | | //SetAgent(); |
| | | |
| | | return 1; |
| | | } |
| | | }; |